Library directories for tilegx
Commit Message
On Thu, 3 Nov 2016, Chris Metcalf wrote:
> I will have to go look at exactly how we contrive the 32-bit installation in
> our commercial build; we do some nasty cross-bootstrapping from x86, which as
> I'm sure you recall was particularly unpleasant back in the glibc 2.12 days
> (our current "tip" release for tilegx is still CentOS 6.8). And for my
> ongoing git testing, I always just test from the build tree, so I never
> noticed that 32-bit wanted to install natively in /lib.
FYI: this patch makes the library directories match what GCC expects, so
allowing the build to work (then I see the same check-installed-headers
failures for sys/dataplane.h as for tilepro, but otherwise the
compile-only test results are clean with GCC 5).
Make tilegx32 install libraries in lib32 directories.
This patch makes tilegx32 install libraries in lib32 directories,
matching what GCC expects and avoiding conflict with 64-bit libraries
installed in lib directories.
Tested (compilation only) for tilegx (32-bit and 64-bit, BE and LE,
GCC 5).
2016-11-09 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/tile/tilegx/configure.ac: Use
LIBC_SLIBDIR_RTLDDIR for tilegx32.
* sysdeps/unix/sysv/linux/tile/tilegx/configure: Regenerated.
Comments
On 11/8/2016 7:34 PM, Joseph Myers wrote:
> On Thu, 3 Nov 2016, Chris Metcalf wrote:
>
>> >I will have to go look at exactly how we contrive the 32-bit installation in
>> >our commercial build; we do some nasty cross-bootstrapping from x86, which as
>> >I'm sure you recall was particularly unpleasant back in the glibc 2.12 days
>> >(our current "tip" release for tilegx is still CentOS 6.8). And for my
>> >ongoing git testing, I always just test from the build tree, so I never
>> >noticed that 32-bit wanted to install natively in /lib.
> FYI: this patch makes the library directories match what GCC expects, so
> allowing the build to work (then I see the same check-installed-headers
> failures for sys/dataplane.h as for tilepro, but otherwise the
> compile-only test results are clean with GCC 5).
>
> Make tilegx32 install libraries in lib32 directories.
>
> This patch makes tilegx32 install libraries in lib32 directories,
> matching what GCC expects and avoiding conflict with 64-bit libraries
> installed in lib directories.
>
> Tested (compilation only) for tilegx (32-bit and 64-bit, BE and LE,
> GCC 5).
>
> 2016-11-09 Joseph Myers<joseph@codesourcery.com>
>
> * sysdeps/unix/sysv/linux/tile/tilegx/configure.ac: Use
> LIBC_SLIBDIR_RTLDDIR for tilegx32.
> * sysdeps/unix/sysv/linux/tile/tilegx/configure: Regenerated.
Are you planning on pushing this yourself, or did you want me to push it?
It sounds like you tested it sufficiently to just push it yourself, but let me
know if not.
Thanks again.
On Mon, 14 Nov 2016, Chris Metcalf wrote:
> Are you planning on pushing this yourself, or did you want me to push it?
I was awaiting confirmation that GCC is acting as intended here (i.e. that
64-bit libraries belong in lib and 32-bit ones in lib32), and so this
glibc change is correct.
> On Nov 14, 2016, at 5:59 PM, Joseph Myers <joseph@codesourcery.com> wrote:
>
>> On Mon, 14 Nov 2016, Chris Metcalf wrote:
>>
>> Are you planning on pushing this yourself, or did you want me to push it?
>
> I was awaiting confirmation that GCC is acting as intended here (i.e. that
> 64-bit libraries belong in lib and 32-bit ones in lib32), and so this
> glibc change is correct.
Yes, that's correct.
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
@@ -2,3 +2,20 @@
# Local configure fragment for sysdeps/unix/sysv/linux/tile/tilegx
ldd_rewrite_script=$dir/ldd-rewrite.sed
+
+case $machine in
+tile/tilegx/tilegx32)
+ test -n "$libc_cv_slibdir" ||
+case "$prefix" in
+/usr | /usr/)
+ libc_cv_slibdir=/lib32
+ libc_cv_rtlddir=/lib32
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib32';
+ # Locale data can be shared between 32-bit and 64-bit libraries.
+ libc_cv_complocaledir='${exec_prefix}/lib/locale'
+ fi
+ ;;
+esac
+ ;;
+esac
@@ -2,3 +2,9 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/tile/tilegx
ldd_rewrite_script=$dir/ldd-rewrite.sed
+
+case $machine in
+tile/tilegx/tilegx32)
+ LIBC_SLIBDIR_RTLDDIR([lib32], [lib32])
+ ;;
+esac