From: "Andrei Gherzan" <andrei@gherzan.com>
To: openembedded-core@lists.openembedded.org
Cc: andrei@gherzan.com, "Andrei Gherzan" <andrei.gherzan@huawei.com>,
"Bernhard Rosenkränzer" <bernhard.rosenkraenzer.ext@huawei.com>
Subject: [PATCH] gcc: Fix tm.h plugin header
Date: Thu, 9 Dec 2021 16:40:06 +0100 [thread overview]
Message-ID: <20211209154006.2323679-1-andrei@gherzan.com> (raw)
From: Andrei Gherzan <andrei.gherzan@huawei.com>
On x86-64, tm.h (needed to build gcc plugins) tries to include
config/i386/linux64.h, which isn't installed. Fortunately it also isn't
used, so simply removing the include statement is an ok fix.
Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com>
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 3 +++
meta/recipes-devtools/gcc/gcc-cross.inc | 3 +++
meta/recipes-devtools/gcc/gcc-target.inc | 3 +++
3 files changed, 9 insertions(+)
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 495dd9070b..a64fcc50ce 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -139,6 +139,9 @@ do_install () {
cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
+ # Fix a plugin header including a nonexistant (and unnecessary) header
+ sed -i -e '/config\/i386\/linux64\.h/d' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/plugin/include/tm.h
+
# install LTO linker plugins where binutils tools can find it
install -d ${D}${libdir}/bfd-plugins
ln -sf ${LIBRELPATH}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index 3ffa1f0c46..ac34d5116a 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -119,6 +119,9 @@ do_install () {
cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
+ # Fix a plugin header including a nonexistant (and unnecessary) header
+ sed -i -e '/config\/i386\/linux64\.h/d' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/plugin/include/tm.h
+
find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
# install LTO linker plugins where binutils tools can find it
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index bf55e692e6..4d087c5183 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -187,6 +187,9 @@ do_install () {
rm -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/plugin/include/auto-build.h
rm -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/plugin/include/bconfig.h
+ # Fix a plugin header including a nonexistant (and unnecessary) header
+ sed -i -e '/config\/i386\/linux64\.h/d' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/plugin/include/tm.h
+
cd ${D}${bindir}
# We care about g++ not c++
--
2.25.1
next reply other threads:[~2021-12-09 15:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 15:40 Andrei Gherzan [this message]
2021-12-09 16:40 ` [OE-core] [PATCH] gcc: Fix tm.h plugin header Khem Raj
2021-12-09 18:39 ` Andrei Gherzan
2021-12-20 1:39 ` Bernhard Rosenkränzer
2021-12-21 11:56 ` [OE-core] " Andrei Gherzan
2021-12-21 12:04 ` Richard Purdie
2021-12-23 12:28 ` Andrei Gherzan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211209154006.2323679-1-andrei@gherzan.com \
--to=andrei@gherzan.com \
--cc=andrei.gherzan@huawei.com \
--cc=bernhard.rosenkraenzer.ext@huawei.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox