This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] Add ldconfig cache tag handling for ARM hard-float ABI


On Wed, Nov 14, 2012 at 10:42:26PM -0500, Carlos O'Donell wrote:
>On Wed, Nov 14, 2012 at 8:42 PM, Steve McIntyre
><steve.mcintyre@linaro.org> wrote:
>> Hi folks,
>>
>> Initial core code for armhf ABI - allocate a tag number
>> FLAG_ARM_HFABI and add code to handle it in ldconfig. Code to follow
>> on libc-ports to handle parsing ELF flags and using the new tag.
>>
>> =====================================================================
>>
>> Add ldconfig cache tag handling for ARM hard-float ABI
>>
>>         * sysdeps/generic/ldconfig.h (FLAG_ARM_HFABI): New macro.
>>         * elf/cache.c (print_entry): Print appropriate message for cache
>>         entries tagged with FLAG_ARM_HFABI.
>
>Will this have any impact on other distributions that may have
>a different value for FLAG_ARM_HFABI and support a mixed soft/hard
>environment?
>
>I guess that upon an update to an incompatible flag number they would
>need to remove the old cache and recreate it?

Basically, yes. In Debian and Ubuntu we were using 0x0800 in
anticipation of that being accepted upstream, then it was taken for
X32. Having to re-run ldconfig on the affected libc upgrades is not
great, but it's not a major pain. Work has already been done to make
it happen.

>> Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
>> ---
>>  ChangeLog                  |    6 ++++++
>>  elf/cache.c                |    3 +++
>>  sysdeps/generic/ldconfig.h |    1 +
>>  3 files changed, 10 insertions(+)
>>
>> diff --git a/ChangeLog b/ChangeLog
>> index f5a3645..962a2a7 100644
>> --- a/ChangeLog
>> +++ b/ChangeLog
>> @@ -1,3 +1,9 @@
>> +2012-11-15  Steve McIntyre  <steve.mcintyre@linaro.org>
>> +
>> +       * sysdeps/generic/ldconfig.h (FLAG_ARM_HFABI): New macro.
>
>The ABI variants are all of the form FLAG_$ARCH_LIB$FOO.
>
>Can we follow the same form here e.g. FLAG_ARM_LIBHF?

Sure, no problem.

>> +       * elf/cache.c (print_entry): Print appropriate message for cache
>> +       entries tagged with FLAG_ARM_HFABI.
>
>Overly verbose. I suggest `Print ",hard-float" for FLAG_ARM_LIBHF.'

ACK.

>> +
>>  2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
>>
>>         * io/Makefile (CFLAGS-open.c, CFLAGS-open64.c): Define.
>> diff --git a/elf/cache.c b/elf/cache.c
>> index db8b9fa..49aa9a6 100644
>> --- a/elf/cache.c
>> +++ b/elf/cache.c
>
>Update copyright year.

OK. Updated and merged

>> @@ -94,6 +94,9 @@ print_entry (const char *lib, int flag, unsigned int osversion,
>>      case FLAG_X8664_LIBX32:
>>        fputs (",x32", stdout);
>>        break;
>> +    case FLAG_ARM_HFABI:
>> +      fputs (",hard-float", stdout);
>> +      break;
>>      case 0:
>>        break;
>>      default:
>> diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h
>> index ef3f4b9..1cffdc6 100644
>> --- a/sysdeps/generic/ldconfig.h
>> +++ b/sysdeps/generic/ldconfig.h
>
>Please merge copyright years.

Umm? I don't see a merge opportunity here!

>> @@ -34,6 +34,7 @@
>>  #define FLAG_MIPS64_LIBN32     0x0600
>>  #define FLAG_MIPS64_LIBN64     0x0700
>>  #define FLAG_X8664_LIBX32      0x0800
>> +#define FLAG_ARM_HFABI         0x0900
>
>See previous nit e.g. FLAG_ARM_LIBHF.

ACK.

Patch v2 here:

=====================================================================
Add ldconfig cache tag handling for ARM hard-float ABI

	* sysdeps/generic/ldconfig.h (FLAG_ARM_LIBHF): New macro.
	* elf/cache.c (print_entry): Print ",hard-float" for
	FLAG_ARM_LIBHF.

Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
---
 ChangeLog                  |    6 ++++++
 elf/cache.c                |    5 ++++-
 sysdeps/generic/ldconfig.h |    1 +
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index f5a3645..885587c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-11-15  Steve McIntyre  <steve.mcintyre@linaro.org>
+
+	* sysdeps/generic/ldconfig.h (FLAG_ARM_LIBHF): New macro.
+	* elf/cache.c (print_entry): Print ",hard-float" for
+	FLAG_ARM_LIBHF.
+
 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
 
 	* io/Makefile (CFLAGS-open.c, CFLAGS-open64.c): Define.
diff --git a/elf/cache.c b/elf/cache.c
index db8b9fa..08ccd2e 100644
--- a/elf/cache.c
+++ b/elf/cache.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2003,2005,2006,2007,2011 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2003,2005-2007,2011,2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 1999.
 
@@ -94,6 +94,9 @@ print_entry (const char *lib, int flag, unsigned int osversion,
     case FLAG_X8664_LIBX32:
       fputs (",x32", stdout);
       break;
+    case FLAG_ARM_LIBHF:
+      fputs (",hard-float", stdout);
+      break;
     case 0:
       break;
     default:
diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h
index ef3f4b9..1c8cc9d 100644
--- a/sysdeps/generic/ldconfig.h
+++ b/sysdeps/generic/ldconfig.h
@@ -34,6 +34,7 @@
 #define FLAG_MIPS64_LIBN32	0x0600
 #define FLAG_MIPS64_LIBN64	0x0700
 #define FLAG_X8664_LIBX32	0x0800
+#define FLAG_ARM_LIBHF		0x0900
 
 /* Name of auxiliary cache.  */
 #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
-- 
1.7.10.4



Cheers,
-- 
Steve McIntyre                                steve.mcintyre@linaro.org
<http://www.linaro.org/> Linaro.org | Open source software for ARM SoCs


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