diff -Nuar glibc-2.19.orig/sysdeps/gnu/configure glibc-2.19/sysdeps/gnu/configure --- glibc-2.19.orig/sysdeps/gnu/configure 2014-02-07 11:04:38.000000000 +0200 +++ glibc-2.19/sysdeps/gnu/configure 2014-03-23 01:10:06.764626173 +0200 @@ -8,20 +8,20 @@ # in /lib and /etc. case "$prefix" in /usr | /usr/) - # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. + # 64-bit libraries on bi-arch platforms go in /lib too. # 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 + libc_cv_slibdir=/lib case $machine in s390/s390-64) libc_cv_rtlddir=/lib ;; esac if test "$libdir" = '${exec_prefix}/lib'; then - libdir='${exec_prefix}/lib64'; + libdir='${exec_prefix}/lib'; # Locale data can be shared between 32bit and 64bit libraries libc_cv_localedir='${exec_prefix}/lib/locale' fi @@ -30,6 +30,17 @@ libc_cv_slibdir=/lib ;; esac + # Use lib32 dirs in x86 on multi arch + if test "$multi_arch" = "yes"; then + case $machine in + *86) + libc_cv_slibdir="/lib32"; + libdir='${exec_prefix}/lib32' + ;; + *) + ;; + esac + fi # Allow the user to override the path with --sysconfdir. if test "$sysconfdir" = '${prefix}/etc'; then libc_cv_sysconfdir=/etc diff -Nuar glibc-2.19.orig/sysdeps/gnu/configure.ac glibc-2.19/sysdeps/gnu/configure.ac --- glibc-2.19.orig/sysdeps/gnu/configure.ac 2014-02-07 11:04:38.000000000 +0200 +++ glibc-2.19/sysdeps/gnu/configure.ac 2014-03-23 01:12:49.111299862 +0200 @@ -8,20 +8,20 @@ # in /lib and /etc. case "$prefix" in /usr | /usr/) - # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. + # 64-bit libraries on bi-arch platforms go in /lib too. # 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 + libc_cv_slibdir=/lib case $machine in s390/s390-64) libc_cv_rtlddir=/lib ;; esac if test "$libdir" = '${exec_prefix}/lib'; then - libdir='${exec_prefix}/lib64'; + libdir='${exec_prefix}/lib'; # Locale data can be shared between 32bit and 64bit libraries libc_cv_localedir='${exec_prefix}/lib/locale' fi @@ -30,6 +30,17 @@ libc_cv_slibdir=/lib ;; esac + # Use lib32 dirs in x86 on multi arch + if test "$multi_arch" = "yes"; then + case $machine in + *86) + libc_cv_slibdir="/lib32"; + libdir='${exec_prefix}/lib32' + ;; + *) + ;; + esac + fi # Allow the user to override the path with --sysconfdir. if test "$sysconfdir" = '${prefix}/etc'; then libc_cv_sysconfdir=/etc diff -Nuar glibc-2.19.orig/sysdeps/unix/sysv/linux/x86_64/ldconfig.h glibc-2.19/sysdeps/unix/sysv/linux/x86_64/ldconfig.h --- glibc-2.19.orig/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2014-02-07 11:04:38.000000000 +0200 +++ glibc-2.19/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2014-03-23 01:14:24.101303971 +0200 @@ -18,9 +18,9 @@ #include #define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, \ - { "/libx32/ld-linux-x32.so.2", FLAG_ELF_LIBC6 }, \ - { "/lib64/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, + { "/lib/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, \ + { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 },\ + { "/libx32/ld-linux-x32.so.2", FLAG_ELF_LIBC6 }, #define SYSDEP_KNOWN_LIBRARY_NAMES \ { "libc.so.6", FLAG_ELF_LIBC6 }, \ { "libm.so.6", FLAG_ELF_LIBC6 }, diff -Nuar glibc-2.19.orig/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed glibc-2.19/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed --- glibc-2.19.orig/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2014-02-07 11:04:38.000000000 +0200 +++ glibc-2.19/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2014-03-23 01:14:58.384638787 +0200 @@ -1,3 +1,3 @@ /LD_TRACE_LOADED_OBJECTS=1/a\ add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out" -s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_ +s_^\(RTLDLIST=\)\(.*lib\)\(\|64\)\(/[^/]*\)\(-x86-64\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\5\6 \232\4\6"_