From: Khem Raj <raj.k...@gmail.com>

some standalone targets e.g. riscv64-elf disable shared linking for
baremetal ELF ABI in ld, therefore lets make it a static library

(From OE-Core rev: 3c6219dfcbcbde314648ba8cc54a90b32ea1c952)

Signed-off-by: Khem Raj <raj.k...@gmail.com>
Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org>
---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc 
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 8074bf1025..d019b0790b 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,7 +68,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/
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181484): 
https://lists.openembedded.org/g/openembedded-core/message/181484
Mute This Topic: https://lists.openembedded.org/mt/98944818/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to