[patch] PR40134, use a linker script on arm-linux to link with -lgcc_s -lgcc
Matthias Klose
doko@ubuntu.com
Fri Jul 10 07:01:00 GMT 2009
Jakub Jelinek schrieb:
> On Tue, Jul 07, 2009 at 11:03:24AM +0200, Matthias Klose wrote:
>> Use a linker script to link with -lgcc_s -lgcc on arm-linux, which allows the
>> arm-linux target to run the testsuite without regressions with the patch for the
>> exception propagation support [1] enabled.
>>
>> The approach taken is the same as used on the sh-linux configuration.
>>
>> Tested on the 4.4 branch without regressions (c, c++, fortran, objc, obj-c++),
>> the trunk currently fails to build for unrelated reasons [2]
>>
>> Ok for the branch (and for the trunk after it bootstraps again)?
>
> For branch I think this could be acceptable, but for trunk I really think
> we should do this on all architectures that have shared libgcc_s*.
> It is not just arm/sh that need this, but also e.g. ppc-linux (and maybe
> ppc64-linux), where libgcc.a only contains the out of line gpr/fpr register
> save/restores.
>
> Something like (untested):
>
> --- gcc.c 2009-06-11 13:24:15.000000000 +0200
> +++ gcc.c 2009-07-07 11:11:27.664079777 +0200
> @@ -1733,11 +1733,11 @@ init_gcc_specs (struct obstack *obstack,
> "}"
> #ifdef LINK_EH_SPEC
> "%{shared:"
> - "%{shared-libgcc:", shared_name, "}"
> + "%{shared-libgcc:", shared_name, " ", static_name, "}"
> "%{!shared-libgcc:", static_name, "}"
> "}"
> #else
> - "%{shared:", shared_name, "}"
> + "%{shared:", shared_name, " ", static_name, "}"
> #endif
> #endif
> "}}", NULL);
>
> Most of libgcc.a is sane and on targets with visibility support
> makes all symbols hidden anyway.
I've tested the attached patch without regressions on arm-linux-gnueabi,
currently running tests on ix86 and powerpc.
> The major exception here are the dfp bits, here I'd think we should remove
> them from libgcc.a and put into libgcc_dfp.a or something similar
> (and have libgcc_dfp.so too).
H.J. mentioned not to bother with the dfp library for now. Is the current patch
good enough for mainline?
Matthias
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr40134-2.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090710/464fc26d/attachment.ksh>
More information about the Gcc-patches
mailing list