← Back to team overview

cross-toolchain-base-devs team mailing list archive

Bug#883189: cross-toolchain-base: dpkg-cross correct libc.so file for mips ports

 

Package: src:cross-toolchain-base
Version: 20
X-Debbugs-CC: helmut@xxxxxxxxxx, jcowgill@xxxxxxxxxx


Hi, in the previous version, we dropped
    /usr/$(multiarch)/lib/ld.so.1
for N32 and N64, while it seems libc.so hardcode this filename,
Then, let's change it.

This will fix n32 and n64 cross toolchains.

-- 
YunQiang Su
--- cross-toolchain-base-20/debian/dpkg-cross	2017-11-20 06:01:44.000000000 +0800
+++ dpkg-cross	2017-11-30 21:24:07.376939568 +0800
@@ -632,6 +632,13 @@
 		}
 		while (<FROM>) {
 			if ($multiarch) {
+				if ($multiarch =~ m/mips(isa)?64.*-linux.*-gnuabi64.*/){
+					s:(^|[^-\w/])(/usr)?/lib/${multiarch}ld.so.1:$1$crosslib64/ld.so.1:g;
+				}elsif ($multiarch =~ m/^mips(isa)?64.*-linux.*-gnuabin32.*/){
+					s:(^|[^-\w/])(/usr)?/lib/${multiarch}ld.so.1:$1$crosslibn32/ld.so.1:g;
+				}elsif ($multiarch =~ m/^mips(isa)?32.*-linux.*-gnu.*/){
+					s:(^|[^-\w/])(/usr)?/lib/${multiarch}ld.so.1:$1$crosslibo32/ld.so.1:g;
+				}
 				s:(^|[^-\w/])(/usr)?/lib/$multiarch:$1$crosslib/:g;
 				s:(^|[^-\w/])(/usr)?/lib32/$multiarch:$1$crosslib32/:g;
 				s:(^|[^-\w/])(/usr)?/lib64/$multiarch:$1$crosslib64/:g;
@@ -1028,7 +1035,7 @@
 
 		# skip /usr/$(multiarch)/lib/ld.so.1 for mips n32 and 64.
 		# their ld.so.1 should be in lib32 and lib64.
-		next if ($multiarch =~ m/^mips[n32,64]/ && $_ =~ m/lib\/ld.so.1$/);
+		next if ($multiarch =~ m/^mips(isa)?64/ && $_ =~ m/lib\/ld.so.1$/);
 
 		# m/lib\/ld.so.1$/);
 		# skip links to private modules and plugins that are not

Follow ups