Bug#325226: libc6: Wrong dynamic linker on amd64
> I have just tested a build with your suggested change, and it works
> correctly. Please find attached the final version of the patch, against
> the latest SVN.
And the patch...
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
Index: debian/patches/amd64-lib.diff
===================================================================
--- debian/patches/amd64-lib.diff (révision 1173)
+++ debian/patches/amd64-lib.diff (copie de travail)
@@ -1,50 +0,0 @@
-#! /bin/sh -e
-
-# All lines beginning with `# DP:' are a description of the patch.
-# DP: Description: Use /lib instead of /lib64 for the native amd64 port
-# DP: Dpatch author: Andreas Jochens <aj@andaco.de>
-# DP: Patch author:
-# DP: Upstream status: Debian-Specific
-# DP: Status Details:
-# DP: Date: 2004-06-07 (updated 2005-10-13)
-
-# This patch is for amd64 only; on i386 we want the 64-bit libraries
-# in /lib64.
-[ "$DEB_HOST_ARCH" != "amd64" ] && exit 0
-
-if [ $# -ne 2 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
- -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-esac
-exit 0
-
-# append the patch here and adjust the -p? flag in the patch calls.
---- glibc-2.3.2/sysdeps/unix/sysv/linux/configure~ 2004-06-05 14:03:22.118247000 +0200
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/configure 2004-06-05 11:43:35.667961319 +0200
-@@ -224,7 +224,7 @@
- /usr | /usr/)
- # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
- case $machine in
-- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
-+ sparc/sparc64 | powerpc/powerpc64 | s390/s390-64 | \
- mips/mips64/n64/* )
- libc_cv_slibdir="/lib64"
- if test "$libdir" = '${exec_prefix}/lib'; then
---- glibc-2.3.2/sysdeps/unix/sysv/linux/configure.in~ 2004-07-05 09:52:28.000000000 +0200
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/configure.in 2004-07-05 12:18:07.995664571 +0200
-@@ -157,7 +157,7 @@
- /usr | /usr/)
- # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
- case $machine in
-- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
-+ sparc/sparc64 | powerpc/powerpc64 | s390/s390-64 | \
- mips/mips64/n64/* )
- libc_cv_slibdir="/lib64"
- if test "$libdir" = '${exec_prefix}/lib'; then
Index: debian/patches/series.amd64
===================================================================
--- debian/patches/series.amd64 (révision 1173)
+++ debian/patches/series.amd64 (copie de travail)
@@ -1,2 +0,0 @@
-amd64-lib.diff -p1
-
Index: debian/sysdeps/amd64.mk
===================================================================
--- debian/sysdeps/amd64.mk (révision 1173)
+++ debian/sysdeps/amd64.mk (copie de travail)
@@ -18,3 +18,11 @@
ln -sf lib debian/$(curpass)/lib64
ln -sf lib debian/$(curpass)/usr/lib64
endef
+
+define libc_extra_install
+mv debian/tmp-libc/lib64 debian/tmp-libc/lib
+mv debian/tmp-libc/usr/lib64/* debian/tmp-libc/usr/lib
+for link in $$(find debian/tmp-libc/usr/lib -type l) ; do ln -sf $$(readlink $$link | sed -e "s#64##g") $$link ; done
+for so in $$(find debian/tmp-libc/usr/lib -maxdepth 1 -type f -name *.so) ; do perl -pi -e "s#/lib64/#/lib/#g" $$so ; done
+endef
+
Reply to: