* [PATCH] aarch64: use lib64 as default lib and slib directory
@ 2013-03-13 11:33 Andreas Schwab
2013-03-13 13:42 ` Carlos O'Donell
2013-03-15 14:53 ` Marcus Shawcroft
0 siblings, 2 replies; 15+ messages in thread
From: Andreas Schwab @ 2013-03-13 11:33 UTC (permalink / raw)
To: Marcus Shawcroft; +Cc: libc-ports
The default (s)libdir for aarch64 should be /lib64.
Andreas.
* sysdeps/unix/sysv/linux/aarch64/configure.in: Set
libc_cv_slibdir, libdir and libc_cv_localedir.
* sysdeps/unix/sysv/linux/aarch64/configure.in: Regenerate.
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/configure b/ports/sysdeps/unix/sysv/linux/aarch64/configure
index 5a22126..04b6c81 100644
--- a/ports/sysdeps/unix/sysv/linux/aarch64/configure
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/configure
@@ -1,3 +1,16 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
arch_minimum_kernel=3.7.0
+
+test -n "$libc_cv_slibdir" ||
+case "$prefix" in
+ /usr | /usr/)
+ libc_cv_slibdir="/lib64"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib64';
+ # Locale data can be shared between 32bit and 64bit libraries
+ libc_cv_localedir='${exec_prefix}/lib/locale'
+ fi
+ ;;
+esac
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/configure.in b/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
index d1995d4..6596a15 100644
--- a/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
@@ -2,3 +2,15 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
arch_minimum_kernel=3.7.0
+
+test -n "$libc_cv_slibdir" ||
+case "$prefix" in
+ /usr | /usr/)
+ libc_cv_slibdir="/lib64"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib64';
+ # Locale data can be shared between 32bit and 64bit libraries
+ libc_cv_localedir='${exec_prefix}/lib/locale'
+ fi
+ ;;
+esac
--
1.8.1.5
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-13 11:33 [PATCH] aarch64: use lib64 as default lib and slib directory Andreas Schwab
@ 2013-03-13 13:42 ` Carlos O'Donell
2013-03-13 13:47 ` Jakub Jelinek
2013-03-15 14:53 ` Marcus Shawcroft
1 sibling, 1 reply; 15+ messages in thread
From: Carlos O'Donell @ 2013-03-13 13:42 UTC (permalink / raw)
To: Andreas Schwab, Jakub Jelinek; +Cc: Marcus Shawcroft, libc-ports
On 03/13/2013 07:33 AM, Andreas Schwab wrote:
> The default (s)libdir for aarch64 should be /lib64.
>
> Andreas.
>
> * sysdeps/unix/sysv/linux/aarch64/configure.in: Set
> libc_cv_slibdir, libdir and libc_cv_localedir.
> * sysdeps/unix/sysv/linux/aarch64/configure.in: Regenerate.
This looks good to me and should be the correct default.
However, there was some recent discussion about this in gcc.
Jakub, What's the status?
> diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/configure b/ports/sysdeps/unix/sysv/linux/aarch64/configure
> index 5a22126..04b6c81 100644
> --- a/ports/sysdeps/unix/sysv/linux/aarch64/configure
> +++ b/ports/sysdeps/unix/sysv/linux/aarch64/configure
> @@ -1,3 +1,16 @@
> # This file is generated from configure.in by Autoconf. DO NOT EDIT!
> + # Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
>
> arch_minimum_kernel=3.7.0
> +
> +test -n "$libc_cv_slibdir" ||
> +case "$prefix" in
> + /usr | /usr/)
> + libc_cv_slibdir="/lib64"
> + if test "$libdir" = '${exec_prefix}/lib'; then
> + libdir='${exec_prefix}/lib64';
> + # Locale data can be shared between 32bit and 64bit libraries
> + libc_cv_localedir='${exec_prefix}/lib/locale'
> + fi
> + ;;
> +esac
> diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/configure.in b/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
> index d1995d4..6596a15 100644
> --- a/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
> +++ b/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
> @@ -2,3 +2,15 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
> # Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
>
> arch_minimum_kernel=3.7.0
> +
> +test -n "$libc_cv_slibdir" ||
> +case "$prefix" in
> + /usr | /usr/)
> + libc_cv_slibdir="/lib64"
> + if test "$libdir" = '${exec_prefix}/lib'; then
> + libdir='${exec_prefix}/lib64';
> + # Locale data can be shared between 32bit and 64bit libraries
> + libc_cv_localedir='${exec_prefix}/lib/locale'
> + fi
> + ;;
> +esac
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-13 13:42 ` Carlos O'Donell
@ 2013-03-13 13:47 ` Jakub Jelinek
2013-03-13 14:57 ` Carlos O'Donell
2013-03-13 16:29 ` Joseph S. Myers
0 siblings, 2 replies; 15+ messages in thread
From: Jakub Jelinek @ 2013-03-13 13:47 UTC (permalink / raw)
To: Carlos O'Donell; +Cc: Andreas Schwab, Marcus Shawcroft, libc-ports
On Wed, Mar 13, 2013 at 09:41:58AM -0400, Carlos O'Donell wrote:
> On 03/13/2013 07:33 AM, Andreas Schwab wrote:
> > The default (s)libdir for aarch64 should be /lib64.
> >
> > Andreas.
> >
> > * sysdeps/unix/sysv/linux/aarch64/configure.in: Set
> > libc_cv_slibdir, libdir and libc_cv_localedir.
> > * sysdeps/unix/sysv/linux/aarch64/configure.in: Regenerate.
>
> This looks good to me and should be the correct default.
>
> However, there was some recent discussion about this in gcc.
>
> Jakub, What's the status?
No progress there, see the
http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00288.html
thread. I'd really like to get it resolved before we cut
GCC 4.8.0-rc1 this week.
Jakub
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-13 13:47 ` Jakub Jelinek
@ 2013-03-13 14:57 ` Carlos O'Donell
2013-03-14 8:40 ` Marcus Shawcroft
2013-03-13 16:29 ` Joseph S. Myers
1 sibling, 1 reply; 15+ messages in thread
From: Carlos O'Donell @ 2013-03-13 14:57 UTC (permalink / raw)
To: Jakub Jelinek, Marcus Shawcroft; +Cc: Andreas Schwab, libc-ports
On 03/13/2013 09:46 AM, Jakub Jelinek wrote:
> On Wed, Mar 13, 2013 at 09:41:58AM -0400, Carlos O'Donell wrote:
>> On 03/13/2013 07:33 AM, Andreas Schwab wrote:
>>> The default (s)libdir for aarch64 should be /lib64.
>>>
>>> Andreas.
>>>
>>> * sysdeps/unix/sysv/linux/aarch64/configure.in: Set
>>> libc_cv_slibdir, libdir and libc_cv_localedir.
>>> * sysdeps/unix/sysv/linux/aarch64/configure.in: Regenerate.
>>
>> This looks good to me and should be the correct default.
>>
>> However, there was some recent discussion about this in gcc.
>>
>> Jakub, What's the status?
>
> No progress there, see the
> http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00288.html
> thread. I'd really like to get it resolved before we cut
> GCC 4.8.0-rc1 this week.
If I'm not wrong it would seem that between SUSE (Andreas Scwhab),
RedHat, and ARM (Marcus Shawcroft) we might all agree that it
should default to /lib64?
It doesn't matter to Debian/Ubuntu because they are using multiarch.
Marcus, what do you say?
Cheers,
Carlos.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-13 13:47 ` Jakub Jelinek
2013-03-13 14:57 ` Carlos O'Donell
@ 2013-03-13 16:29 ` Joseph S. Myers
2013-03-14 7:58 ` Jakub Jelinek
2013-03-14 8:46 ` Marcus Shawcroft
1 sibling, 2 replies; 15+ messages in thread
From: Joseph S. Myers @ 2013-03-13 16:29 UTC (permalink / raw)
To: Jakub Jelinek
Cc: Carlos O'Donell, Andreas Schwab, Marcus Shawcroft, libc-ports
On Wed, 13 Mar 2013, Jakub Jelinek wrote:
> > However, there was some recent discussion about this in gcc.
> >
> > Jakub, What's the status?
>
> No progress there, see the
> http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00288.html
> thread. I'd really like to get it resolved before we cut
> GCC 4.8.0-rc1 this week.
If it does change to /lib64, it would seem odd for the dynamic linker path
(GLIBC_DYNAMIC_LINKER in aarch64-linux.) to stay as
/lib/ld-linux-aarch64.so.1 rather than also being in /lib64 (although s390
also puts the 64-bit dynamic link in /lib).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-13 16:29 ` Joseph S. Myers
@ 2013-03-14 7:58 ` Jakub Jelinek
2013-03-14 8:46 ` Marcus Shawcroft
1 sibling, 0 replies; 15+ messages in thread
From: Jakub Jelinek @ 2013-03-14 7:58 UTC (permalink / raw)
To: Joseph S. Myers
Cc: Carlos O'Donell, Andreas Schwab, Marcus Shawcroft, libc-ports
On Wed, Mar 13, 2013 at 04:29:31PM +0000, Joseph S. Myers wrote:
> On Wed, 13 Mar 2013, Jakub Jelinek wrote:
>
> > > However, there was some recent discussion about this in gcc.
> > >
> > > Jakub, What's the status?
> >
> > No progress there, see the
> > http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00288.html
> > thread. I'd really like to get it resolved before we cut
> > GCC 4.8.0-rc1 this week.
>
> If it does change to /lib64, it would seem odd for the dynamic linker path
> (GLIBC_DYNAMIC_LINKER in aarch64-linux.) to stay as
> /lib/ld-linux-aarch64.so.1 rather than also being in /lib64 (although s390
> also puts the 64-bit dynamic link in /lib).
Sure, it would be more consistent, but if there are strong objections from
the multiarch crowd to that (as have been for arm hfp from what I remember),
we have a precedent for using /lib64 with dynamic linker in /lib.
Jakub
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-13 14:57 ` Carlos O'Donell
@ 2013-03-14 8:40 ` Marcus Shawcroft
0 siblings, 0 replies; 15+ messages in thread
From: Marcus Shawcroft @ 2013-03-14 8:40 UTC (permalink / raw)
To: Carlos O'Donell
Cc: Jakub Jelinek, Marcus Shawcroft, Andreas Schwab, libc-ports
On 13 March 2013 14:56, Carlos O'Donell <carlos@redhat.com> wrote:
> On 03/13/2013 09:46 AM, Jakub Jelinek wrote:
>> On Wed, Mar 13, 2013 at 09:41:58AM -0400, Carlos O'Donell wrote:
>>> On 03/13/2013 07:33 AM, Andreas Schwab wrote:
>>>> The default (s)libdir for aarch64 should be /lib64.
>>>>
>>>> Andreas.
>>>>
>>>> * sysdeps/unix/sysv/linux/aarch64/configure.in: Set
>>>> libc_cv_slibdir, libdir and libc_cv_localedir.
>>>> * sysdeps/unix/sysv/linux/aarch64/configure.in: Regenerate.
>>>
>>> This looks good to me and should be the correct default.
>>>
>>> However, there was some recent discussion about this in gcc.
>>>
>>> Jakub, What's the status?
>>
>> No progress there, see the
>> http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00288.html
>> thread. I'd really like to get it resolved before we cut
>> GCC 4.8.0-rc1 this week.
>
> If I'm not wrong it would seem that between SUSE (Andreas Scwhab),
> RedHat, and ARM (Marcus Shawcroft) we might all agree that it
> should default to /lib64?
>
> It doesn't matter to Debian/Ubuntu because they are using multiarch.
>
> Marcus, what do you say?
Agreed, we should move now to avoid pain in the future.
/Marcus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-13 16:29 ` Joseph S. Myers
2013-03-14 7:58 ` Jakub Jelinek
@ 2013-03-14 8:46 ` Marcus Shawcroft
2013-03-14 15:12 ` Carlos O'Donell
1 sibling, 1 reply; 15+ messages in thread
From: Marcus Shawcroft @ 2013-03-14 8:46 UTC (permalink / raw)
To: Joseph S. Myers
Cc: Jakub Jelinek, Carlos O'Donell, Andreas Schwab,
Marcus Shawcroft, libc-ports
On 13 March 2013 16:29, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Wed, 13 Mar 2013, Jakub Jelinek wrote:
>
>> > However, there was some recent discussion about this in gcc.
>> >
>> > Jakub, What's the status?
>>
>> No progress there, see the
>> http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00288.html
>> thread. I'd really like to get it resolved before we cut
>> GCC 4.8.0-rc1 this week.
>
> If it does change to /lib64, it would seem odd for the dynamic linker path
> (GLIBC_DYNAMIC_LINKER in aarch64-linux.) to stay as
> /lib/ld-linux-aarch64.so.1 rather than also being in /lib64 (although s390
> also puts the 64-bit dynamic link in /lib).
Changing the location of the linker breaks binaries. I'm not convinced
the disruption associated with that is justified.
/Marcus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-14 8:46 ` Marcus Shawcroft
@ 2013-03-14 15:12 ` Carlos O'Donell
2013-03-18 11:25 ` Marcus Shawcroft
0 siblings, 1 reply; 15+ messages in thread
From: Carlos O'Donell @ 2013-03-14 15:12 UTC (permalink / raw)
To: Marcus Shawcroft
Cc: Joseph S. Myers, Jakub Jelinek, Andreas Schwab, Marcus Shawcroft,
libc-ports
On 03/14/2013 04:46 AM, Marcus Shawcroft wrote:
> On 13 March 2013 16:29, Joseph S. Myers <joseph@codesourcery.com> wrote:
>> On Wed, 13 Mar 2013, Jakub Jelinek wrote:
>>
>>>> However, there was some recent discussion about this in gcc.
>>>>
>>>> Jakub, What's the status?
>>>
>>> No progress there, see the
>>> http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00288.html
>>> thread. I'd really like to get it resolved before we cut
>>> GCC 4.8.0-rc1 this week.
>>
>> If it does change to /lib64, it would seem odd for the dynamic linker path
>> (GLIBC_DYNAMIC_LINKER in aarch64-linux.) to stay as
>> /lib/ld-linux-aarch64.so.1 rather than also being in /lib64 (although s390
>> also puts the 64-bit dynamic link in /lib).
>
> Changing the location of the linker breaks binaries. I'm not convinced
> the disruption associated with that is justified.
I agree with Marcus. If we don't need to move the dynamic linker then
we shouldn't.
Cheers,
Carlos.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-13 11:33 [PATCH] aarch64: use lib64 as default lib and slib directory Andreas Schwab
2013-03-13 13:42 ` Carlos O'Donell
@ 2013-03-15 14:53 ` Marcus Shawcroft
2013-03-15 16:16 ` Joseph S. Myers
2013-03-18 11:53 ` [PATCH] Add support for rtld directory different from " Andreas Schwab
1 sibling, 2 replies; 15+ messages in thread
From: Marcus Shawcroft @ 2013-03-15 14:53 UTC (permalink / raw)
To: Andreas Schwab; +Cc: libc-ports
Hi,
This patch seems to have the effect of moving the dynamic linker to
/lib64, do we need some ldd-rewrite.sed foo hooked into
ports/sysdeps/unix/sysv/linux/aarch64/configure.in ?
/Marcus
On 13 March 2013 11:33, Andreas Schwab <schwab@suse.de> wrote:
> The default (s)libdir for aarch64 should be /lib64.
>
> Andreas.
>
> * sysdeps/unix/sysv/linux/aarch64/configure.in: Set
> libc_cv_slibdir, libdir and libc_cv_localedir.
> * sysdeps/unix/sysv/linux/aarch64/configure.in: Regenerate.
>
> diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/configure b/ports/sysdeps/unix/sysv/linux/aarch64/configure
> index 5a22126..04b6c81 100644
> --- a/ports/sysdeps/unix/sysv/linux/aarch64/configure
> +++ b/ports/sysdeps/unix/sysv/linux/aarch64/configure
> @@ -1,3 +1,16 @@
> # This file is generated from configure.in by Autoconf. DO NOT EDIT!
> + # Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
>
> arch_minimum_kernel=3.7.0
> +
> +test -n "$libc_cv_slibdir" ||
> +case "$prefix" in
> + /usr | /usr/)
> + libc_cv_slibdir="/lib64"
> + if test "$libdir" = '${exec_prefix}/lib'; then
> + libdir='${exec_prefix}/lib64';
> + # Locale data can be shared between 32bit and 64bit libraries
> + libc_cv_localedir='${exec_prefix}/lib/locale'
> + fi
> + ;;
> +esac
> diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/configure.in b/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
> index d1995d4..6596a15 100644
> --- a/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
> +++ b/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
> @@ -2,3 +2,15 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
> # Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
>
> arch_minimum_kernel=3.7.0
> +
> +test -n "$libc_cv_slibdir" ||
> +case "$prefix" in
> + /usr | /usr/)
> + libc_cv_slibdir="/lib64"
> + if test "$libdir" = '${exec_prefix}/lib'; then
> + libdir='${exec_prefix}/lib64';
> + # Locale data can be shared between 32bit and 64bit libraries
> + libc_cv_localedir='${exec_prefix}/lib/locale'
> + fi
> + ;;
> +esac
> --
> 1.8.1.5
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-15 14:53 ` Marcus Shawcroft
@ 2013-03-15 16:16 ` Joseph S. Myers
2013-03-15 18:11 ` Mike Frysinger
2013-03-18 11:53 ` [PATCH] Add support for rtld directory different from " Andreas Schwab
1 sibling, 1 reply; 15+ messages in thread
From: Joseph S. Myers @ 2013-03-15 16:16 UTC (permalink / raw)
To: Marcus Shawcroft; +Cc: Andreas Schwab, libc-ports
On Fri, 15 Mar 2013, Marcus Shawcroft wrote:
> Hi,
>
> This patch seems to have the effect of moving the dynamic linker to
> /lib64, do we need some ldd-rewrite.sed foo hooked into
> ports/sysdeps/unix/sysv/linux/aarch64/configure.in ?
How does s390 glibc handle dynamic linker and libraries in different
directories? If it doesn't, maybe that illustrates that keeping the
dynamic linker in /lib with other libraries in /lib64 really isn't such a
good idea after all and /lib64 should be used consistently or not at
all....
(ldd-rewrite.sed may be needed anyway, I just don't think it will help
with the issue to which you refer.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-15 16:16 ` Joseph S. Myers
@ 2013-03-15 18:11 ` Mike Frysinger
0 siblings, 0 replies; 15+ messages in thread
From: Mike Frysinger @ 2013-03-15 18:11 UTC (permalink / raw)
To: libc-ports; +Cc: Joseph S. Myers, Marcus Shawcroft, Andreas Schwab
[-- Attachment #1: Type: Text/Plain, Size: 1027 bytes --]
On Friday 15 March 2013 12:15:45 Joseph S. Myers wrote:
> On Fri, 15 Mar 2013, Marcus Shawcroft wrote:
> > Hi,
> >
> > This patch seems to have the effect of moving the dynamic linker to
> > /lib64, do we need some ldd-rewrite.sed foo hooked into
> > ports/sysdeps/unix/sysv/linux/aarch64/configure.in ?
>
> How does s390 glibc handle dynamic linker and libraries in different
> directories?
it doesn't :)
i just built for s390x and did `make install DESTDIR=$PWD/foo` and the libs
(including ldso) default to /lib64/. Gentoo's ebuilds make sure things get
symlinked to the right place (there's a list that maintains all the ldso paths
for multilib targets).
> If it doesn't, maybe that illustrates that keeping the
> dynamic linker in /lib with other libraries in /lib64 really isn't such a
> good idea after all and /lib64 should be used consistently or not at
> all....
the multiarch people are going to whine incessantly anytime a new ldso is
proposed that doesn't live in /lib/.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-14 15:12 ` Carlos O'Donell
@ 2013-03-18 11:25 ` Marcus Shawcroft
2013-03-18 11:41 ` Jakub Jelinek
0 siblings, 1 reply; 15+ messages in thread
From: Marcus Shawcroft @ 2013-03-18 11:25 UTC (permalink / raw)
To: Jakub Jelinek, Andreas Schwab
Cc: Joseph S. Myers, Marcus Shawcroft, libc-ports, Carlos O'Donell
The patches applied to gcc and glibc to move aarch64 libraries from
/lib to /lib64 are inconsistent. We are now in a situation where gcc
expects the dynamic loader to be /lib while glibc installs it to
/lib64. I don't see a trivial change to Andreas' glibc patch. I
think these patches need to be reverted until a working solution is
found.
/Marcus
On 14 March 2013 15:11, Carlos O'Donell <carlos@redhat.com> wrote:
> On 03/14/2013 04:46 AM, Marcus Shawcroft wrote:
>> On 13 March 2013 16:29, Joseph S. Myers <joseph@codesourcery.com> wrote:
>>> On Wed, 13 Mar 2013, Jakub Jelinek wrote:
>>>
>>>>> However, there was some recent discussion about this in gcc.
>>>>>
>>>>> Jakub, What's the status?
>>>>
>>>> No progress there, see the
>>>> http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00288.html
>>>> thread. I'd really like to get it resolved before we cut
>>>> GCC 4.8.0-rc1 this week.
>>>
>>> If it does change to /lib64, it would seem odd for the dynamic linker path
>>> (GLIBC_DYNAMIC_LINKER in aarch64-linux.) to stay as
>>> /lib/ld-linux-aarch64.so.1 rather than also being in /lib64 (although s390
>>> also puts the 64-bit dynamic link in /lib).
>>
>> Changing the location of the linker breaks binaries. I'm not convinced
>> the disruption associated with that is justified.
>
> I agree with Marcus. If we don't need to move the dynamic linker then
> we shouldn't.
>
> Cheers,
> Carlos.
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] aarch64: use lib64 as default lib and slib directory
2013-03-18 11:25 ` Marcus Shawcroft
@ 2013-03-18 11:41 ` Jakub Jelinek
0 siblings, 0 replies; 15+ messages in thread
From: Jakub Jelinek @ 2013-03-18 11:41 UTC (permalink / raw)
To: Marcus Shawcroft
Cc: Andreas Schwab, Joseph S. Myers, Marcus Shawcroft, libc-ports,
Carlos O'Donell
On Mon, Mar 18, 2013 at 11:25:48AM +0000, Marcus Shawcroft wrote:
> The patches applied to gcc and glibc to move aarch64 libraries from
> /lib to /lib64 are inconsistent. We are now in a situation where gcc
> expects the dynamic loader to be /lib while glibc installs it to
> /lib64. I don't see a trivial change to Andreas' glibc patch. I
> think these patches need to be reverted until a working solution is
> found.
s390x has the same model and is just fine with that as is.
Anyway, if you really want to install glibc's dynamic linker into /lib
rather than /lib64 (on s390x it is installed into /lib64 and distros just
take care of adding the needed symlink), it shouldn't be that hard to change
it, and just needs patching of glibc to support it.
find . -name M\* | xargs grep rtld-installed-name
in glibc tree shows just a couple of places that would need adjusting,
basically add new configure/Make* variables, counterpart of slibdir and
inst_slibdir, say rtld_slibdir and inst_rtld_slibdir or similar, make it
default to slibdir (and inst_rtld_slibdir = $(install_root)$(rtld_slibdir)
in Makeconfig), and allow target configure's to override the default, i.e.
for s390x and aarch64 use /lib instead of /lib64 there.
Then just a few tweaks in Makerules, elf/Makefile to install the dynamic
linker into $(inst_rtld_slibdir)/$(rtld-installed-name) and e.g. use
$(rtld_slibdir)/$(rtld-installed-name) in linker scripts and .interp.
Jakub
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] Add support for rtld directory different from slib directory
2013-03-15 14:53 ` Marcus Shawcroft
2013-03-15 16:16 ` Joseph S. Myers
@ 2013-03-18 11:53 ` Andreas Schwab
1 sibling, 0 replies; 15+ messages in thread
From: Andreas Schwab @ 2013-03-18 11:53 UTC (permalink / raw)
To: Marcus Shawcroft; +Cc: libc-alpha, libc-ports
Tested on aarch64 and x86.
Andreas.
* configure.in: Substitute libc_cv_slibdir.
* configure: Regenerate.
* config.make.in (rtlddir): Set from libc_cv_rtlddir.
* Makeconfig (rtlddir, inst_rtlddir): New variables.
(rtld-LDFLAGS): Use them with $(rtld-installed-name).
* elf/Makefile (install-others, CFLAGS-interp.c)
(ldso_install, common-ldd-rewrite): Likewise.
($(inst_rtlddir)/$(rtld-installed-name)): Renamed from
$(inst_slibdir)/$(rtld-installed-name).
* scripts/rellns-sh: Add -p option.
* Makerules (make-shlib-link): Use rellns-sh to get relative name
for source.
* sysdeps/gnu/configure.in: Set libc_cv_rtldir for s390x.
* sysdeps/gnu/configure: Regenerate.
ChangeLog.aarch64:
* sysdeps/unix/sysv/linux/aarch64/configure.in: Set
libc_cv_rtlddir.
* sysdeps/unix/sysv/linux/aarch64/configure: Regenerate.
---
Makeconfig | 10 ++++++++--
Makerules | 4 ++--
config.make.in | 1 +
configure | 2 ++
configure.in | 1 +
elf/Makefile | 11 ++++++-----
ports/sysdeps/unix/sysv/linux/aarch64/configure | 1 +
ports/sysdeps/unix/sysv/linux/aarch64/configure.in | 1 +
scripts/rellns-sh | 15 +++++++++++++--
sysdeps/gnu/configure | 9 +++++++--
sysdeps/gnu/configure.in | 9 +++++++--
11 files changed, 49 insertions(+), 15 deletions(-)
diff --git a/Makeconfig b/Makeconfig
index 6c88918..70deb1e 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -151,12 +151,18 @@ libdir = $(exec_prefix)/lib
endif
inst_libdir = $(install_root)$(libdir)
-# Where to install the shared library and dynamic linker.
+# Where to install the shared library.
ifndef slibdir
slibdir = $(exec_prefix)/lib
endif
inst_slibdir = $(install_root)$(slibdir)
+# Where to install the dynamic linker.
+ifndef rtlddir
+rtlddir = $(slibdir)
+endif
+inst_rtlddir = $(install_root)$(rtlddir)
+
# Prefix to put on files installed in $(libdir). For libraries `libNAME.a',
# the prefix is spliced between `lib' and the name, so the linker switch
# `-l$(libprefix)NAME' finds the library; for other files the prefix is
@@ -441,7 +447,7 @@ endif
endif
ifeq (yes,$(build-shared))
ifndef rtld-LDFLAGS
-rtld-LDFLAGS = -Wl,-dynamic-linker=$(slibdir)/$(rtld-installed-name)
+rtld-LDFLAGS = -Wl,-dynamic-linker=$(rtlddir)/$(rtld-installed-name)
endif
ifndef rtld-tests-LDFLAGS
ifeq (yes,$(build-hardcoded-path-in-tests))
diff --git a/Makerules b/Makerules
index b115f1a..4d191e0 100644
--- a/Makerules
+++ b/Makerules
@@ -864,7 +864,7 @@ ifeq (no,$(cross-compiling))
symbolic-link-prog := $(common-objpfx)elf/sln
symbolic-link-list := $(common-objpfx)elf/symlink.list
define make-shlib-link
-echo $(<F) $@ >> $(symbolic-link-list)
+echo $(shell $(..)scripts/rellns-sh -p $< $@) $@ >> $(symbolic-link-list)
endef
else # cross-compiling
# We need a definition that can be used by elf/Makefile's install rules.
@@ -874,7 +874,7 @@ endif
ifndef make-shlib-link
define make-shlib-link
rm -f $@
-$(LN_S) $(<F) $@
+$(LN_S) $(shell $(..)scripts/rellns-sh -p $< $@) $@
endef
endif
diff --git a/config.make.in b/config.make.in
index a966dca..2cab2f3 100644
--- a/config.make.in
+++ b/config.make.in
@@ -11,6 +11,7 @@ exec_prefix = @exec_prefix@
datadir = @datadir@
libdir = @libdir@
slibdir = @libc_cv_slibdir@
+rtlddir = @libc_cv_rtlddir@
localedir = @libc_cv_localedir@
sysconfdir = @libc_cv_sysconfdir@
libexecdir = @libexecdir@
diff --git a/configure b/configure
index e386c1a..2dc7eeb 100755
--- a/configure
+++ b/configure
@@ -594,6 +594,7 @@ libc_cv_rootsbindir
libc_cv_localstatedir
libc_cv_sysconfdir
libc_cv_localedir
+libc_cv_rtlddir
libc_cv_slibdir
old_glibc_headers
use_nscd
@@ -7374,6 +7375,7 @@ fi
+
if test x$use_ldconfig = xyes; then
$as_echo "#define USE_LDCONFIG 1" >>confdefs.h
diff --git a/configure.in b/configure.in
index c578979..cb31730 100644
--- a/configure.in
+++ b/configure.in
@@ -2153,6 +2153,7 @@ fi
AC_SUBST(old_glibc_headers)
AC_SUBST(libc_cv_slibdir)
+AC_SUBST(libc_cv_rtlddir)
AC_SUBST(libc_cv_localedir)
AC_SUBST(libc_cv_sysconfdir)
AC_SUBST(libc_cv_localstatedir)
diff --git a/elf/Makefile b/elf/Makefile
index 6d4b365..9477a4d 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -66,7 +66,7 @@ endif
ifeq (yes,$(build-shared))
extra-objs = $(all-rtld-routines:%=%.os) soinit.os sofini.os interp.os
generated += librtld.os dl-allobjs.os ld.so ldd
-install-others = $(inst_slibdir)/$(rtld-installed-name)
+install-others = $(inst_rtlddir)/$(rtld-installed-name)
install-bin-script = ldd
endif
@@ -340,7 +340,7 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map)
| $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
# interp.c exists just to get this string into the libraries.
-CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' \
+CFLAGS-interp.c = -D'RUNTIME_LINKER="$(rtlddir)/$(rtld-installed-name)"' \
-DNOT_IN_libc=1
$(objpfx)interp.os: $(common-objpfx)config.make
@@ -372,18 +372,19 @@ $(inst_slibdir)/$(rtld-version-installed-name): $(objpfx)ld.so $(+force)
$(make-target-directory)
$(do-install-program)
-$(inst_slibdir)/$(rtld-installed-name): \
+$(inst_rtlddir)/$(rtld-installed-name): \
$(inst_slibdir)/$(rtld-version-installed-name) \
$(inst_slibdir)/libc-$(version).so
+ $(make-target-directory)
$(make-shlib-link)
# Special target called by parent to install just the dynamic linker.
.PHONY: ldso_install
-ldso_install: $(inst_slibdir)/$(rtld-installed-name)
+ldso_install: $(inst_rtlddir)/$(rtld-installed-name)
endif
-common-ldd-rewrite = -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
+common-ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
-e 's%@VERSION@%$(version)%g' \
-e 's|@PKGVERSION@|$(PKGVERSION)|g' \
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g'
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/configure b/ports/sysdeps/unix/sysv/linux/aarch64/configure
index 04b6c81..6b2608a 100644
--- a/ports/sysdeps/unix/sysv/linux/aarch64/configure
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/configure
@@ -7,6 +7,7 @@ test -n "$libc_cv_slibdir" ||
case "$prefix" in
/usr | /usr/)
libc_cv_slibdir="/lib64"
+ libc_cv_rtlddir="/lib"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/configure.in b/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
index 6596a15..b090702 100644
--- a/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
@@ -7,6 +7,7 @@ test -n "$libc_cv_slibdir" ||
case "$prefix" in
/usr | /usr/)
libc_cv_slibdir="/lib64"
+ libc_cv_rtlddir="/lib"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
diff --git a/scripts/rellns-sh b/scripts/rellns-sh
index 0e861b5..94e7f00 100755
--- a/scripts/rellns-sh
+++ b/scripts/rellns-sh
@@ -16,8 +16,15 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
+do_print=false
+case $1 in
+ -p)
+ do_print=true
+ shift
+ ;;
+esac
if test $# -ne 2; then
- echo "Usage: rellns SOURCE DEST" >&2
+ echo "Usage: rellns [-p] SOURCE DEST" >&2
exit 1
fi
@@ -70,4 +77,8 @@ while test -n "$from"; do
from=`echo $from | sed 's%^[^/]*/*%%'`
done
-ln -s $rfrom$to $2
+if $do_print; then
+ echo "$rfrom$to"
+else
+ ln -s $rfrom$to $2
+fi
diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
index 26327ca..70aaa90 100644
--- a/sysdeps/gnu/configure
+++ b/sysdeps/gnu/configure
@@ -9,12 +9,17 @@
case "$prefix" in
/usr | /usr/)
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
- # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
- # and libc_cv_localedir.
+ # Allow earlier configure scripts to handle libc_cv_slibdir,
+ # libc_cv_rtlddir, libdir, and libc_cv_localedir.
test -n "$libc_cv_slibdir" || \
case $machine in
sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64)
libc_cv_slibdir=/lib64
+ case $machine in
+ s390/s390-64)
+ libc_cv_rtlddir=/lib
+ ;;
+ esac
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
diff --git a/sysdeps/gnu/configure.in b/sysdeps/gnu/configure.in
index b8fd74c..ce251df 100644
--- a/sysdeps/gnu/configure.in
+++ b/sysdeps/gnu/configure.in
@@ -9,12 +9,17 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
case "$prefix" in
/usr | /usr/)
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
- # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
- # and libc_cv_localedir.
+ # Allow earlier configure scripts to handle libc_cv_slibdir,
+ # libc_cv_rtlddir, libdir, and libc_cv_localedir.
test -n "$libc_cv_slibdir" || \
case $machine in
sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64)
libc_cv_slibdir=/lib64
+ case $machine in
+ s390/s390-64)
+ libc_cv_rtlddir=/lib
+ ;;
+ esac
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
--
1.8.2
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-03-18 11:53 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-13 11:33 [PATCH] aarch64: use lib64 as default lib and slib directory Andreas Schwab
2013-03-13 13:42 ` Carlos O'Donell
2013-03-13 13:47 ` Jakub Jelinek
2013-03-13 14:57 ` Carlos O'Donell
2013-03-14 8:40 ` Marcus Shawcroft
2013-03-13 16:29 ` Joseph S. Myers
2013-03-14 7:58 ` Jakub Jelinek
2013-03-14 8:46 ` Marcus Shawcroft
2013-03-14 15:12 ` Carlos O'Donell
2013-03-18 11:25 ` Marcus Shawcroft
2013-03-18 11:41 ` Jakub Jelinek
2013-03-15 14:53 ` Marcus Shawcroft
2013-03-15 16:16 ` Joseph S. Myers
2013-03-15 18:11 ` Mike Frysinger
2013-03-18 11:53 ` [PATCH] Add support for rtld directory different from " Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).