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]

[PATCH] Fix reconfigure for 64-bit targets


After reconfiguring, the value of slibdir changes from ${exec_prefix}/lib32 or
${exec_prefix}/lib64 to ${exec_prefix}/lib.

This is because the code that sets libdir is only executed if libc_cv_slibdir
is unset (this is to provide an override mechanism for subtargets).  If the
value of libc_cv_slibdir is read from the config cache the value of libdir is
never adjusted.  Or:

  $ rm config.cache 
  $ ~/src/glibc/configure --host=mips64-unknown-linux-gnu --build=i686-linux --prefix=/usr --cache-file=config.cache &>/dev/null
  $ grep libdir config.make 
  libdir = ${exec_prefix}/lib32
  slibdir = /lib32
  $ ~/src/glibc/configure --host=mips64-unknown-linux-gnu --build=i686-linux --prefix=/usr --cache-file=config.cache &>/dev/null
  $ grep libdir config.make 
  libdir = ${exec_prefix}/lib
  slibdir = /lib32

With the current logic, either both libdir and slibdir should be cached or
neither.  This patch renames slibdir so that it is no longer cached.

The patch has been in our tree for a few weeks now and produced no regressions
with glibc testing (make check).

Please apply if OK.

Adam

	* config.make.in (libc_cv_slibdir): Rename to slibdir.
	* configure.in: Rename libc_cv_slibdir to slibdir.
	* sysdeps/unix/sysv/linux/configure.in: Likewise.
	* ports/sysdeps/unix/sysv/linux/mips/configure.in: Likewise
	* configure: Regenerate.
	* sysdeps/unix/sysv/linux/configure: Likewise.
	* ports/sysdeps/unix/sysv/linux/mips/configure: Likewise.

Index: config.make.in
===================================================================
RCS file: /cvs/glibc/libc/config.make.in,v
retrieving revision 1.123
diff -F^\([(a-zA-Z0-9_]\|#define\) -u -p -r1.123 config.make.in
--- config.make.in	25 Aug 2007 22:25:24 -0000	1.123
+++ config.make.in	24 Mar 2008 21:21:29 -0000
@@ -10,7 +10,7 @@ prefix = @prefix@
 exec_prefix = @exec_prefix@
 datadir = @datadir@
 libdir = @libdir@
-slibdir = @libc_cv_slibdir@
+slibdir = @slibdir@
 localedir = @libc_cv_localedir@
 sysconfdir = @libc_cv_sysconfdir@
 libexecdir = @libexecdir@
Index: configure.in
===================================================================
RCS file: /cvs/glibc/libc/configure.in,v
retrieving revision 1.473
diff -F^\([(a-zA-Z0-9_]\|#define\) -u -p -r1.473 configure.in
--- configure.in	1 Feb 2008 00:20:07 -0000	1.473
+++ configure.in	24 Mar 2008 21:21:29 -0000
@@ -2160,7 +2160,7 @@ if test ${old_glibc_headers} = yes; then
 fi
 AC_SUBST(old_glibc_headers)
 
-AC_SUBST(libc_cv_slibdir)
+AC_SUBST(slibdir)
 AC_SUBST(libc_cv_localedir)
 AC_SUBST(libc_cv_sysconfdir)
 AC_SUBST(libc_cv_rootsbindir)
Index: sysdeps/unix/sysv/linux/configure.in
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/configure.in,v
retrieving revision 1.69
diff -F^\([(a-zA-Z0-9_]\|#define\) -u -p -r1.69 configure.in
--- sysdeps/unix/sysv/linux/configure.in	4 Mar 2006 22:01:46 -0000	1.69
+++ sysdeps/unix/sysv/linux/configure.in	24 Mar 2008 21:21:29 -0000
@@ -160,12 +160,12 @@ fi
 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,
+  # Allow earlier configure scripts to handle slibdir, libdir,
   # and libc_cv_localedir.
-  test -n "$libc_cv_slibdir" || \
+  test -n "$slibdir" || \
   case $machine in
   sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
-    libc_cv_slibdir="/lib64"
+    slibdir="/lib64"
     if test "$libdir" = '${exec_prefix}/lib'; then
       libdir='${exec_prefix}/lib64';
       # Locale data can be shared between 32bit and 64bit libraries
@@ -173,7 +173,7 @@ case "$prefix" in
     fi
     ;;
   *)
-    libc_cv_slibdir="/lib"
+    slibdir="/lib"
     ;;
   esac
   # Allow the user to override the path with --sysconfdir
Index: ports/sysdeps/unix/sysv/linux/mips/configure.in
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/mips/configure.in,v
retrieving revision 1.9
diff -F^\([(a-zA-Z0-9_]\|#define\) -u -p -r1.9 configure.in
--- ports/sysdeps/unix/sysv/linux/mips/configure.in	11 Mar 2006 16:18:41 -0000	1.9
+++ ports/sysdeps/unix/sysv/linux/mips/configure.in	24 Mar 2008 21:21:29 -0000
@@ -80,12 +80,12 @@ esac
 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,
+  # Allow earlier configure scripts to handle slibdir, libdir,
   # and libc_cv_localedir.
-  test -n "$libc_cv_slibdir" || \
+  test -n "$slibdir" || \
   case $machine in
   mips/mips64/n64/* )
-    libc_cv_slibdir="/lib64"
+    slibdir="/lib64"
     if test "$libdir" = '${exec_prefix}/lib'; then
       libdir='${exec_prefix}/lib64';
       # Locale data can be shared between 32bit and 64bit libraries
@@ -93,7 +93,7 @@ case "$prefix" in
     fi
     ;;
   mips/mips64/n32/* )
-    libc_cv_slibdir="/lib32"
+    slibdir="/lib32"
     if test "$libdir" = '${exec_prefix}/lib'; then
       libdir='${exec_prefix}/lib32';
       # Locale data can be shared between 32bit and 64bit libraries
@@ -101,7 +101,7 @@ case "$prefix" in
     fi
     ;;
   *)
-    libc_cv_slibdir="/lib"
+    slibdir="/lib"
     ;;
   esac
 esac


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