linux-omap 2.6.39: sync with meta-texasinstruments
[openembedded.git] / recipes / eglibc / files / eglibc-dont-cache-slibdir.patch
blob97bc53a037541a9d403c5a18375e155cc80149c0
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
10 never adjusted. Or:
12 $ rm config.cache
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
16 slibdir = /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
20 slibdir = /lib32
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).
28 Please apply if OK.
30 Adam
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
44 @@ -10,7 +10,7 @@
45 exec_prefix = @exec_prefix@
46 datadir = @datadir@
47 libdir = @libdir@
48 -slibdir = @libc_cv_slibdir@
49 +slibdir = @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
57 @@ -2337,7 +2337,7 @@
59 AC_SUBST(old_glibc_headers)
61 -AC_SUBST(libc_cv_slibdir)
62 +AC_SUBST(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
70 @@ -147,12 +147,12 @@
71 case "$prefix" in
72 /usr | /usr/)
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" || \
79 case $machine in
80 sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
81 - libc_cv_slibdir="/lib64"
82 + 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
86 @@ -160,7 +160,7 @@
90 - libc_cv_slibdir="/lib"
91 + slibdir="/lib"
93 esac
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
99 @@ -80,12 +80,12 @@
100 case "$prefix" in
101 /usr | /usr/)
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" || \
108 case $machine in
109 mips/mips64/n64/* )
110 - libc_cv_slibdir="/lib64"
111 + 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
115 @@ -93,7 +93,7 @@
118 mips/mips64/n32/* )
119 - libc_cv_slibdir="/lib32"
120 + 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
124 @@ -101,7 +101,7 @@
128 - libc_cv_slibdir="/lib"
129 + slibdir="/lib"
131 esac
132 esac