Hi,

libstdc++ configure will check "shl_load". If shared library is disabled in
gcc and uclibc configure, the libstdc++ configure will fail for options like
-mthumb -march=armv7-r. The fail logs like:

.../libgcc.a(unwind-arm.o): In function `unwind_phase2_forced':
unwind-arm.c:(.text+0x282): undefined reference to `memcpy'
unwind-arm.c:(.text+0x2b0): undefined reference to `memcpy'
collect2: error: ld returned 1 exit status

Logs show uclibc depends on "__aeabi_unwind_cpp_pr1" from libgcc. And
unwind_phase2_forced from libgcc depends on memcpy from uclibc. So an
additional %L is required for non-static link.

Is it OK for trunk?

Thanks!
-Zhenqiang

2013-03-19  Zhenqiang Chen <zhenqiang.c...@arm.com>

        * config/arm/uclinux-elf.h: Add %L to LINK_GCC_C_SEQUENCE_SPEC for
non- static link

diff --git a/gcc/config/arm/uclinux-elf.h b/gcc/config/arm/uclinux-elf.h
index c1fe9f1..74d63df 100644
--- a/gcc/config/arm/uclinux-elf.h
+++ b/gcc/config/arm/uclinux-elf.h
@@ -65,7 +65,7 @@

 #undef LINK_GCC_C_SEQUENCE_SPEC
 #define LINK_GCC_C_SEQUENCE_SPEC \
-  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
+  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G %L}"

 /* Use --as-needed -lgcc_s for eh support.  */  #ifdef HAVE_LD_AS_NEEDED



Reply via email to