Bug#772045: does not fix multilib ldscripts
Package: dpkg-cross
Version: 2.6.11
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap
After fixing #771497, dpkg-cross is still useless for building gcc.
While the converted libc dependencies can be installed now, they are
broken. Trying to gcc -m64 -lc ... (which is something that the gcc
build does) one gets:
| /usr/x86_64-linux-gnux32/bin/ld: cannot find /lib64/libc.so.6
Bernhard R. Link kindly pointed out that the absolute path hints a
broken ldscript. In fact, dpkg-cross converted the package and moved
/lib64 around but did not update the corresponding ldscript. The logic
for fixing multilib ldscripts is simply missing from dpkg-cross. Please
consider the attached patch to address this issue.
Helmut
diff -u dpkg-cross-2.6.11+nmu1/dpkg-cross dpkg-cross-2.6.11+nmu1/dpkg-cross
--- dpkg-cross-2.6.11+nmu1/dpkg-cross 2014-11-30 08:53:56.000000000 +0100
+++ dpkg-cross-2.6.11+nmu1/dpkg-cross 2014-11-30 22:40:26.000000000 +0100
@@ -629,6 +629,14 @@
}
while (<FROM>) {
s:(^|[^-\w/])(/usr)?/lib/$multiarch:$1$crosslib/:g;
+ unless ($multiarch) {
+ s:(^|[^-\w/])(/usr)?/lib32/:$1$crosslib32/:g;
+ s:(^|[^-\w/])(/usr)?/lib64/:$1$crosslib64/:g;
+ s:(^|[^-\w/])(/usr)?/libhf/:$1$crosslibhf/:g;
+ s:(^|[^-\w/])(/usr)?/libn32/:$1$crosslibn32/:g;
+ s:(^|[^-\w/])(/usr)?/libsf/:$1$crosslibsf/:g;
+ s:(^|[^-\w/])(/usr)?/libx32/:$1$crosslibx32/:g;
+ }
print TO;
}
close(FROM);
Reply to: