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 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.


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