This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [WIP] glibc: Use /lib/ld-linux-armhf.so.3 for ARM's -mfloat-abi=hard ABI.
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, "Carlos O'Donell" <carlos_odonell at mentor dot com>, Andrew Haley <aph at redhat dot com>, libc-ports at sourceware dot org, steve dot mcintyre at linaro dot org, michael dot hope at linaro dot org
- Date: Sat, 5 May 2012 17:06:14 -0400
- Subject: Re: [WIP] glibc: Use /lib/ld-linux-armhf.so.3 for ARM's -mfloat-abi=hard ABI.
- References: <4F886201.3040200@redhat.com> <4F886277.6000006@redhat.com> <20120413173512.5D52B2C074@topped-with-meat.com> <CADZpyiyr3d8VrBwp_WQyg1H_=w-8hyHw82Vck6U2kv49JtFxPg@mail.gmail.com> <4F9515D5.60804@redhat.com> <4F99B990.7020300@mentor.com> <Pine.LNX.4.64.1204262155510.30855@digraph.polyomino.org.uk> <20120426220656.0CC302C0D3@topped-with-meat.com>
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
===
I'm not happy with this patch. I don't like it for the reason that an
old unpatched gcc that still uses /lib/ld-linux.so.3 with a new glibc
produces a glibc with /lib/ld-linux-armhf.so.3 even if the compiler
doesn't. I guess in this case your setup is completely broken and
testing should show you that.
Is it important to support the old gcc + new glibc for the hardfloat use case?
If it's not then the above patch should be all we need.
Comments?
Cheers,
Carlos.