1 Source: http://sourceware.org/ml/libc-alpha/2008-03/msg00105.html
2 Status: Not applied upstream
4 After reconfiguring, the value of slibdir changes from ${exec_prefix}/lib32 or
5 ${exec_prefix}/lib64 to ${exec_prefix}/lib.
7 This is because the code that sets libdir is only executed if libc_cv_slibdir
8 is unset (this is to provide an override mechanism for subtargets). If the
9 value of libc_cv_slibdir is read from the config cache the value of libdir is
13 $ ~/src/glibc/configure --host=mips64-unknown-linux-gnu --build=i686-linux --prefix=/usr --cache-file=config.cache &>/dev/null
14 $ grep libdir config.make
15 libdir = ${exec_prefix}/lib32
17 $ ~/src/glibc/configure --host=mips64-unknown-linux-gnu --build=i686-linux --prefix=/usr --cache-file=config.cache &>/dev/null
18 $ grep libdir config.make
19 libdir = ${exec_prefix}/lib
22 With the current logic, either both libdir and slibdir should be cached or
23 neither. This patch renames slibdir so that it is no longer cached.
25 The patch has been in our tree for a few weeks now and produced no regressions
26 with glibc testing (make check).
32 * config.make.in (libc_cv_slibdir): Rename to slibdir.
33 * configure.in: Rename libc_cv_slibdir to slibdir.
34 * sysdeps/unix/sysv/linux/configure.in: Likewise.
35 * ports/sysdeps/unix/sysv/linux/mips/configure.in: Likewise
36 * configure: Regenerate.
37 * sysdeps/unix/sysv/linux/configure: Likewise.
38 * ports/sysdeps/unix/sysv/linux/mips/configure: Likewise.
40 Index: libc/config.make.in
41 ===================================================================
42 --- libc.orig/config.make.in 2010-08-25 00:26:33.000000000 -0700
43 +++ libc/config.make.in 2010-09-25 12:31:21.460933356 -0700
45 exec_prefix = @exec_prefix@
48 -slibdir = @libc_cv_slibdir@
50 localedir = @libc_cv_localedir@
51 sysconfdir = @libc_cv_sysconfdir@
52 libexecdir = @libexecdir@
53 Index: libc/configure.in
54 ===================================================================
55 --- libc.orig/configure.in 2010-08-25 00:26:33.000000000 -0700
56 +++ libc/configure.in 2010-09-25 12:31:21.484430729 -0700
59 AC_SUBST(old_glibc_headers)
61 -AC_SUBST(libc_cv_slibdir)
63 AC_SUBST(libc_cv_localedir)
64 AC_SUBST(libc_cv_sysconfdir)
65 AC_SUBST(libc_cv_rootsbindir)
66 Index: libc/sysdeps/unix/sysv/linux/configure.in
67 ===================================================================
68 --- libc.orig/sysdeps/unix/sysv/linux/configure.in 2010-08-25 00:25:11.000000000 -0700
69 +++ libc/sysdeps/unix/sysv/linux/configure.in 2010-09-25 12:31:21.500430612 -0700
73 # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
74 - # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
75 + # Allow earlier configure scripts to handle slibdir, libdir,
76 # and libc_cv_localedir.
77 - test -n "$libc_cv_slibdir" || \
78 + test -n "$slibdir" || \
80 sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
81 - libc_cv_slibdir="/lib64"
83 if test "$libdir" = '${exec_prefix}/lib'; then
84 libdir='${exec_prefix}/lib64';
85 # Locale data can be shared between 32bit and 64bit libraries
90 - libc_cv_slibdir="/lib"
94 # Allow the user to override the path with --sysconfdir
95 Index: libc/ports/sysdeps/unix/sysv/linux/mips/configure.in
96 ===================================================================
97 --- libc.orig/ports/sysdeps/unix/sysv/linux/mips/configure.in 2010-08-25 00:24:01.000000000 -0700
98 +++ libc/ports/sysdeps/unix/sysv/linux/mips/configure.in 2010-09-25 12:31:21.500430612 -0700
102 # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
103 - # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
104 + # Allow earlier configure scripts to handle slibdir, libdir,
105 # and libc_cv_localedir.
106 - test -n "$libc_cv_slibdir" || \
107 + test -n "$slibdir" || \
110 - libc_cv_slibdir="/lib64"
112 if test "$libdir" = '${exec_prefix}/lib'; then
113 libdir='${exec_prefix}/lib64';
114 # Locale data can be shared between 32bit and 64bit libraries
119 - libc_cv_slibdir="/lib32"
121 if test "$libdir" = '${exec_prefix}/lib'; then
122 libdir='${exec_prefix}/lib32';
123 # Locale data can be shared between 32bit and 64bit libraries
128 - libc_cv_slibdir="/lib"