This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ARM: Use different linker path for hardfloat ABI
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 03 Apr 2012 11:45:30 +0100
- Subject: Re: [PATCH] ARM: Use different linker path for hardfloat ABI
- References: <20120329193401.GA14860@dannf.org> <4F75F2E2.3030909@arm.com> <20120402210653.GC28152@dannf.org> <4F7AC2E1.6010000@redhat.com>
On 03/04/12 10:29, Andrew Haley wrote:
> On 04/02/2012 10:06 PM, dann frazier wrote:
>> On Fri, Mar 30, 2012 at 06:52:34PM +0100, Richard Earnshaw wrote:
>>> On 29/03/12 20:34, dann frazier wrote:
>>>> This is an updated version of a patch Debian and Ubuntu are using to
>>>> use an alternate linker path for hardfloat binaries. The difference
>>>> with this one is that it covers the case where no float flag
>>>> was passed in, defaulting to the softfloat path.
>>>>
>>>> 2012-03-29 dann frazier <dann.frazier@canonical.com>
>>>>
>>>> * config/arm/linux-elf.h: Use alternate linker path
>>>> for hardfloat ABI
>>>>
>>>> Index: gcc/config/arm/linux-elf.h
>>>> ===================================================================
>>>> --- gcc/config/arm/linux-elf.h (revision 185708)
>>>> +++ gcc/config/arm/linux-elf.h (working copy)
>>>> @@ -59,14 +59,21 @@
>>>>
>>>> #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
>>>>
>>>> -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
>>>> +#define LINUX_DYNAMIC_LINKER_SF "/lib/ld-linux.so.3"
>>>> +#define LINUX_DYNAMIC_LINKER_HF "/lib/arm-linux-gnueabihf/ld-linux.so.3"
>>>>
>>>> #define LINUX_TARGET_LINK_SPEC "%{h*} \
>>>> %{static:-Bstatic} \
>>>> %{shared:-shared} \
>>>> %{symbolic:-Bsymbolic} \
>>>> %{rdynamic:-export-dynamic} \
>>>> - -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \
>>>> + %{msoft-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "} \
>>>> + %{mfloat-abi=soft*:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "} \
>>>> + %{mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \
>>>> + %{mfloat-abi=hard:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \
>>>> + %{!mfloat-abi: \
>>>> + %{!msoft-float: \
>>>> + %{!mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "}}} \
>>>> -X \
>>>> %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
>>>> SUBTARGET_EXTRA_LINK_SPEC
>>>>
>>>
>>> Looks to me as though this will break the old Linux ABI. While we've
>>> marked that as deprecated, it hasn't been removed as yet. So I think
>>> this patch either needs to wait until that removal has taken place, or
>>> provide the relevant updates to maintain the old ABI support.
>>
>> Thanks for your review. You're right, this does appear to break the
>> old ABI - that was a misunderstanding on my part. I think this fixes
>> the problem:
>
> But what about those of us who are using hard-float but not the
> Debian liker path? It'll break, surely. This looks to be like
> it's Debian-specific.
>
Are you trying to tell me that some distros are using /lib/ld-linux.so.3
directly for hard-float? Sigh, you distro guys need to start talking to
each other, rather than just going of inventing things ...
If, so then there's only one way to sort out this mess.
/lib/arm-linux-gnueabi/ld-linux.so.3 Location of soft-float loader
/lib/arm-linux-gnueabihf/ld-linux.so.3 Location of hard-float loader
/lib/ld-linux.so.3 legacy symlink to one of the above.
Or something of this nature.
All this is outside of GCC's remit though and I'm not in a position to
drive any of it through.
:-( :-( :-(
R.