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-14 23:22:10 +0100
commit028ecb0c265fa495071cbcca10587c0ba60cf538 (patch)
tree7493114a142f73ce65d41cece1a1c59afe8231ed
parent442d79a39bf4e4ec8d41cd0195105b444fc583f6 (diff)
downloadpoky-028ecb0c265fa495071cbcca10587c0ba60cf538.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: 2070bcd10aa3a05c96c8501c6a8c1e129fb1d440) 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 c39a0caf8a..7e920df2d3 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/