]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
gcc-runtime: Use static dummy libstdc++
authorKhem Raj <raj.khem@gmail.com>
Sun, 24 Jul 2022 15:10:21 +0000 (08:10 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Jul 2022 21:57:54 +0000 (22:57 +0100)
some standalone targets e.g. riscv64-elf disable shared linking for
baremetal ELF ABI in ld, therefore lets make it a static library

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-runtime.inc

index 4ddbaca3abe606e7611ea615ad03954a71890c58..b8bfdcedadfe0ad6c96405a50a45c347a3fe21c0 100644 (file)
@@ -69,7 +69,8 @@ do_configure () {
        # 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
-       ${CC} -x c /dev/null -nostartfiles -shared -o ${WORKDIR}/dummylib/libstdc++.so
+       ${CC} -x c /dev/null -c -o ${WORKDIR}/dummylib/dummylib.o
+       ${AR} rcs ${WORKDIR}/dummylib/libstdc++.a ${WORKDIR}/dummylib/dummylib.o
        for d in libgcc ${RUNTIMETARGET}; do
                echo "Configuring $d"
                rm -rf ${B}/${TARGET_SYS}/$d/