Thread (7 messages) 7 messages, 4 authors, 2021-12-23

Re: [OE-core] [PATCH] gcc: Fix tm.h plugin header

From: Khem Raj <hidden>
Date: 2021-12-09 16:40:38

On Thu, Dec 9, 2021 at 7:40 AM Andrei Gherzan [off-list ref] wrote:
From: Andrei Gherzan <redacted>

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.
is it due to multilib support ? if so we might be ok since we may not
be using it
but really it will be good to check it with multilib builds of x86_64/x86
quoted hunk ↗ jump to hunk
Signed-off-by: Bernhard Rosenkränzer <redacted>
Signed-off-by: Andrei Gherzan <redacted>
---
 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


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159457): https://lists.openembedded.org/g/openembedded-core/message/159457
Mute This Topic: https://lists.openembedded.org/mt/87614108/1997914
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
-=-=-=-=-=-=-=-=-=-=-=-
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help