diff mbox

[ARM] Extend uclinux LINK_GCC_C_SEQUENCE_SPEC

Message ID 000001ce2482$3dddfd70$b999f850$@arm.com
State New
Headers show

Commit Message

Zhenqiang Chen March 19, 2013, 9:15 a.m. UTC
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.chen@arm.com>

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

Comments

Ramana Radhakrishnan March 26, 2013, 2:02 p.m. UTC | #1
On Tue, Mar 19, 2013 at 9:15 AM, Zhenqiang Chen <zhenqiang.chen@arm.com> wrote:
> 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.chen@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
>
>
>

Ok .

Ramana
diff mbox

Patch

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