diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-12-03 23:34:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-05 12:26:35 +0000 |
commit | 2d940dd5bf68aecc5d2b95ee2e23fd3e01e980f1 (patch) | |
tree | 06f2daf02618adf36d24e83fb5f946b6f7a35c4b /meta/recipes-devtools/gcc/gcc-runtime.inc | |
parent | 472a99447fe0f89bbdb959c1d9b7f67f8a122935 (diff) | |
download | poky-2d940dd5bf68aecc5d2b95ee2e23fd3e01e980f1.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.
(From OE-Core rev: 34b0edb0d3120c32063ff7e3dd52be20d60401d5)
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.inc | 8 |
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 = " \ | |||
64 | " | 64 | " |
65 | 65 | ||
66 | do_configure () { | 66 | do_configure () { |
67 | export CXX="${CXX} -nostdinc++ -nostdlib++" | 67 | export CXX="${CXX} -nostdinc++ -L${WORKDIR}/dummylib" |
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. | ||
70 | mkdir -p ${WORKDIR}/dummylib | ||
71 | touch ${WORKDIR}/dummylib/libstdc++.so | ||
68 | for d in libgcc ${RUNTIMETARGET}; do | 72 | for d in libgcc ${RUNTIMETARGET}; do |
69 | echo "Configuring $d" | 73 | echo "Configuring $d" |
70 | rm -rf ${B}/${TARGET_SYS}/$d/ | 74 | rm -rf ${B}/${TARGET_SYS}/$d/ |
@@ -302,7 +306,7 @@ do_check() { | |||
302 | export DEJAGNU="${WORKDIR}/dejagnu/site.exp" | 306 | export DEJAGNU="${WORKDIR}/dejagnu/site.exp" |
303 | 307 | ||
304 | # HACK: this works around the configure setting CXX with -nostd* args | 308 | # HACK: this works around the configure setting CXX with -nostd* args |
305 | sed -i 's/-nostdinc++ -nostdlib++//g' $(find ${B} -name testsuite_flags | head -1) | 309 | sed -i 's#-nostdinc++ -L${WORKDIR}/dummylib##g' $(find ${B} -name testsuite_flags | head -1) |
306 | 310 | ||
307 | if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then | 311 | if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then |
308 | # qemu user has issues allocating large amounts of memory | 312 | # qemu user has issues allocating large amounts of memory |