This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [WIP] glibc: Use /lib/ld-linux-armhf.so.3 for ARM's -mfloat-abi=hard ABI.


On Sat, May 5, 2012 at 5:06 PM, Carlos O'Donell <carlos@systemhalted.org> wrote:
> On Thu, Apr 26, 2012 at 6:06 PM, Roland McGrath <roland@hack.frob.com> wrote:
>>> This is far too complicated. ?GCC isn't detecting what dynamic linker
>>> glibc has, after all. ?We should simply test if the compiler predefines
>>> __ARM_PCS_VFP, which is easy to do in the ARM preconfigure.
>>
>> Then you don't even need to do any configure stuff.
>> Just use %ifdef in shlib-versions.
>
> OK, so when you said "use %ifdef" I had no idea what you were talking
> about. I looked at how shlib-versions is processed and noticed that it
> used one of the implicit rules that ran the contents through the
> compiler which simplifies the patch down to:
>
> Index: sysdeps/arm/shlib-versions
> ===================================================================
> --- sysdeps/arm/shlib-versions ?(revision 370191)
> +++ sysdeps/arm/shlib-versions ?(working copy)
> @@ -1,4 +1,15 @@
> ?arm.*-.*-linux-gnueabi.* ? ? ? DEFAULT ? ? ? ? ? ? ? ? GLIBC_2.4
>
> +# The EABI-derived hard-float ABI uses a new dynamic linker.
> +arm.*-.*-linux-gnueabihf ? ? ? ld=ld-linux-armhf.so.3
> +
> +%ifdef __ARM_PCS_VFP
> +# The EABI-derived hard-float ABI uses a new dynamic linker.
> +arm.*-.*-linux-gnueabi.* ? ? ? ld=ld-linux-armhf.so.3
> +%else
> +# The EABI-derived soft-float ABI continues to use ld-linux.so.3.
> ?arm.*-.*-linux-gnueabi.* ? ? ? ld=ld-linux.so.3
> +%endif
> +
> +# The legacy ABI, no longer supported, uses ld-linux.so.2.
> ?arm.*-.*-linux.* ? ? ? ld=ld-linux.so.2
> ===

Except that this idea doesn't work because the implicit rule uses
-undef and I didn't notice that.

Therefore __ARM_PCS_VFP is *never* defined.

Thoughts?

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]