summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-runtime.inc
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-03 23:34:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-03 09:05:17 +0000
commit34b0edb0d3120c32063ff7e3dd52be20d60401d5 (patch)
tree9e0f8171c2c1807b60eb95234d6e382b382d586a /meta/recipes-devtools/gcc/gcc-runtime.inc
parent47a2efa96d8ac29024dbc6a577457c5b53111949 (diff)
downloadopenembedded-core-contrib-34b0edb0d3120c32063ff7e3dd52be20d60401d5.tar.gz
gcc: Drop stdlib++ option patch
The patch to gcc to disable use of libstdc++ when configuring the library during gcc-runtime is old and there are perhaps better ways to do this now. If removed, most builds still "work" but incorrect values for things like atomic ops are found during configure. mips64 and ppc fail with on target simple tests of g++ in testimage. Instead we can create a dummy libstdc++ which allows the correct configure test results to be obtained. Discussed with upstream about the patch are ongoing, if accepted, we can switch back to the commandline option if it is added in future. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-runtime.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 4839a6687a..c39a0caf8a 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -64,7 +64,11 @@ DEBUG_PREFIX_MAP:class-target = " \
"
do_configure () {
- export CXX="${CXX} -nostdinc++ -nostdlib++"
+ export CXX="${CXX} -nostdinc++ -L${WORKDIR}/dummylib"
+ # libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure
+ # tests. Create a dummy empty lib for the purposes of configure.
+ mkdir -p ${WORKDIR}/dummylib
+ touch ${WORKDIR}/dummylib/libstdc++.so
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/${TARGET_SYS}/$d/
@@ -302,7 +306,7 @@ do_check() {
export DEJAGNU="${WORKDIR}/dejagnu/site.exp"
# HACK: this works around the configure setting CXX with -nostd* args
- sed -i 's/-nostdinc++ -nostdlib++//g' $(find ${B} -name testsuite_flags | head -1)
+ sed -i 's#-nostdinc++ -L${WORKDIR}/dummylib##g' $(find ${B} -name testsuite_flags | head -1)
if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then
# qemu user has issues allocating large amounts of memory