summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-13 23:12:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-25 15:11:46 +0100
commit3af7f4ba996ad5a5ff475ade9f244cd9a7bfa0f2 (patch)
tree63227f96c751ec8eaca72d73830c625fbccab1d2
parenteabdc02b763c0b64c9717a7e69ce6de57827f042 (diff)
downloadpoky-3af7f4ba996ad5a5ff475ade9f244cd9a7bfa0f2.tar.gz
gcc-runtime: Fix build when using gold
If gold is enabled as the default linker, it errors trying to link to our dummy library empty file and this turns off things which should be present in libstdc++. For example, _GLIBCXX_HAVE_S_ISREG isn't defined and HAVE_S_ISREG in libstdc++-v3/config.h isn't set properly. Instead of just creating an empty file, create an empty elf binary instead which addresses the issue. (From OE-Core rev: f842dbc478cb007b5f3e2f016959e2b597a4d0be) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2070bcd10aa3a05c96c8501c6a8c1e129fb1d440) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index e9f2cf16e8..dc903c2b88 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,7 +68,8 @@ do_configure () {
68 # libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure 68 # libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure
69 # tests. Create a dummy empty lib for the purposes of configure. 69 # tests. Create a dummy empty lib for the purposes of configure.
70 mkdir -p ${WORKDIR}/dummylib 70 mkdir -p ${WORKDIR}/dummylib
71 touch ${WORKDIR}/dummylib/libstdc++.so 71 touch ${WORKDIR}/dummylib/dummylib.c
72 ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o ${WORKDIR}/dummylib/libstdc++.so
72 for d in libgcc ${RUNTIMETARGET}; do 73 for d in libgcc ${RUNTIMETARGET}; do
73 echo "Configuring $d" 74 echo "Configuring $d"
74 rm -rf ${B}/${TARGET_SYS}/$d/ 75 rm -rf ${B}/${TARGET_SYS}/$d/