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 <[email protected]>
>>>
>>> * 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.
Andrew.
> Index: gcc/config/arm/linux-elf.h
> ===================================================================
> --- gcc/config/arm/linux-elf.h (revision 185708)
> +++ gcc/config/arm/linux-elf.h (working copy)
> @@ -60,13 +60,17 @@
> #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
>
> #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
> +#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 " \
> + %{mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \
> + %{mfloat-abi=hard:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \
> + %{!mfloat-abi: \
> + %{!mhard-float:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
> -X \
> %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
> SUBTARGET_EXTRA_LINK_SPEC
>