summaryrefslogtreecommitdiff
path: root/debian/patches/128_ppc64_powerpc_biarch.patch
blob: f75ec74c3af2ff35591fe9a00c5c2e5ca39af94b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: b/ld/emulparams/elf32ppccommon.sh
===================================================================
--- a/ld/emulparams/elf32ppccommon.sh
+++ b/ld/emulparams/elf32ppccommon.sh
@@ -54,3 +54,12 @@ case "$host":"$EMULATION_NAME" in
   *:*64*) LIBPATH_SUFFIX=64 ;;
   *:*32*) LIBPATH_SUFFIX=32 ;;
 esac
+
+# On 64bit, look for 32 bit target libraries in /lib32, /usr/lib32 etc., first.
+case "$target" in
+  powerpc64-*-linux* | ppc64-*-linux*)
+    case "$EMULATION_NAME" in
+      *32*) LIBPATH_SUFFIX=32 ;;
+    esac
+    ;;
+esac