summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-03-19 07:34:51 (GMT)
committerGitHub <noreply@github.com>2017-03-19 07:34:51 (GMT)
commit89f0971391fa26c442ce9bfb055c55e5cae2d0d1 (patch)
treeb82d03ad78739881aa8e4993e0dcf8d290e14c30 /patches
parenta3dd55b96409922a416c05ab053569ec4f91126b (diff)
parent63b2a19de4b33f304b236850028b6c6f32ce51e2 (diff)
Merge pull request #639 from stilor/tweak-gcc-movelibs
When moving gcc libs, prefer the same directory as libc
Diffstat (limited to 'patches')
-rw-r--r--patches/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch42
-rw-r--r--patches/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch42
-rw-r--r--patches/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch42
-rw-r--r--patches/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch42
-rw-r--r--patches/binutils/2.28/700-Fix-library-paths-on-PowerPC.patch42
-rw-r--r--patches/uClibc-ng/1.0.20/600-prefer-multilib.patch46
-rw-r--r--patches/uClibc-ng/1.0.21/600-prefer-multilib.patch46
-rw-r--r--patches/uClibc-ng/1.0.22/600-prefer-multilib.patch46
-rw-r--r--patches/uClibc/0.9.33.2/600-prefer-multilib.patch38
9 files changed, 386 insertions, 0 deletions
diff --git a/patches/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch b/patches/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch
new file mode 100644
index 0000000..cea92f3
--- /dev/null
+++ b/patches/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch
@@ -0,0 +1,42 @@
+From 1b967f3cb0682dd05128ef13495c2dca2a04dc4e Mon Sep 17 00:00:00 2001
+From: Alexey Neyman <stilor@att.net>
+Date: Sat, 11 Mar 2017 17:27:09 -0800
+Subject: [PATCH] Fix library paths on PowerPC
+
+First, need to match against just the CPU name, not the whole triplet.
+Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin
+triplet.
+
+Second, it should be testing for $target, not $host. Host may be
+little endian by default, and the sysroot directory layout shouldn't
+depend on whether it is built on LE or BE machine.
+
+Signed-off-by: Alexey Neyman <stilor@att.net>
+---
+ ld/emulparams/elf32ppccommon.sh | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
+index 1f54ef8..d00cf68 100644
+--- a/ld/emulparams/elf32ppccommon.sh
++++ b/ld/emulparams/elf32ppccommon.sh
+@@ -44,11 +44,11 @@ fi
+
+ # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+ # Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
+-case "$host":"$EMULATION_NAME" in
+- *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;;
+- *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;;
+- *le-*:*64*) LIBPATH_SUFFIX=64be ;;
+- *le-*:*32*) LIBPATH_SUFFIX=32be ;;
++case `echo "$target" | sed -e 's/-.*//'`:"$EMULATION_NAME" in
++ *le:*64lppc*) LIBPATH_SUFFIX=64 ;;
++ *le:*32lppc*) LIBPATH_SUFFIX=32 ;;
++ *le:*64*) LIBPATH_SUFFIX=64be ;;
++ *le:*32*) LIBPATH_SUFFIX=32be ;;
+ *:*64lppc*) LIBPATH_SUFFIX=64le ;;
+ *:*32lppc*) LIBPATH_SUFFIX=32le ;;
+ *:*64*) LIBPATH_SUFFIX=64 ;;
+--
+2.9.3
+
diff --git a/patches/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch b/patches/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch
new file mode 100644
index 0000000..cea92f3
--- /dev/null
+++ b/patches/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch
@@ -0,0 +1,42 @@
+From 1b967f3cb0682dd05128ef13495c2dca2a04dc4e Mon Sep 17 00:00:00 2001
+From: Alexey Neyman <stilor@att.net>
+Date: Sat, 11 Mar 2017 17:27:09 -0800
+Subject: [PATCH] Fix library paths on PowerPC
+
+First, need to match against just the CPU name, not the whole triplet.
+Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin
+triplet.
+
+Second, it should be testing for $target, not $host. Host may be
+little endian by default, and the sysroot directory layout shouldn't
+depend on whether it is built on LE or BE machine.
+
+Signed-off-by: Alexey Neyman <stilor@att.net>
+---
+ ld/emulparams/elf32ppccommon.sh | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
+index 1f54ef8..d00cf68 100644
+--- a/ld/emulparams/elf32ppccommon.sh
++++ b/ld/emulparams/elf32ppccommon.sh
+@@ -44,11 +44,11 @@ fi
+
+ # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+ # Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
+-case "$host":"$EMULATION_NAME" in
+- *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;;
+- *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;;
+- *le-*:*64*) LIBPATH_SUFFIX=64be ;;
+- *le-*:*32*) LIBPATH_SUFFIX=32be ;;
++case `echo "$target" | sed -e 's/-.*//'`:"$EMULATION_NAME" in
++ *le:*64lppc*) LIBPATH_SUFFIX=64 ;;
++ *le:*32lppc*) LIBPATH_SUFFIX=32 ;;
++ *le:*64*) LIBPATH_SUFFIX=64be ;;
++ *le:*32*) LIBPATH_SUFFIX=32be ;;
+ *:*64lppc*) LIBPATH_SUFFIX=64le ;;
+ *:*32lppc*) LIBPATH_SUFFIX=32le ;;
+ *:*64*) LIBPATH_SUFFIX=64 ;;
+--
+2.9.3
+
diff --git a/patches/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch b/patches/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch
new file mode 100644
index 0000000..cea92f3
--- /dev/null
+++ b/patches/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch
@@ -0,0 +1,42 @@
+From 1b967f3cb0682dd05128ef13495c2dca2a04dc4e Mon Sep 17 00:00:00 2001
+From: Alexey Neyman <stilor@att.net>
+Date: Sat, 11 Mar 2017 17:27:09 -0800
+Subject: [PATCH] Fix library paths on PowerPC
+
+First, need to match against just the CPU name, not the whole triplet.
+Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin
+triplet.
+
+Second, it should be testing for $target, not $host. Host may be
+little endian by default, and the sysroot directory layout shouldn't
+depend on whether it is built on LE or BE machine.
+
+Signed-off-by: Alexey Neyman <stilor@att.net>
+---
+ ld/emulparams/elf32ppccommon.sh | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
+index 1f54ef8..d00cf68 100644
+--- a/ld/emulparams/elf32ppccommon.sh
++++ b/ld/emulparams/elf32ppccommon.sh
+@@ -44,11 +44,11 @@ fi
+
+ # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+ # Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
+-case "$host":"$EMULATION_NAME" in
+- *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;;
+- *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;;
+- *le-*:*64*) LIBPATH_SUFFIX=64be ;;
+- *le-*:*32*) LIBPATH_SUFFIX=32be ;;
++case `echo "$target" | sed -e 's/-.*//'`:"$EMULATION_NAME" in
++ *le:*64lppc*) LIBPATH_SUFFIX=64 ;;
++ *le:*32lppc*) LIBPATH_SUFFIX=32 ;;
++ *le:*64*) LIBPATH_SUFFIX=64be ;;
++ *le:*32*) LIBPATH_SUFFIX=32be ;;
+ *:*64lppc*) LIBPATH_SUFFIX=64le ;;
+ *:*32lppc*) LIBPATH_SUFFIX=32le ;;
+ *:*64*) LIBPATH_SUFFIX=64 ;;
+--
+2.9.3
+
diff --git a/patches/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch b/patches/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch
new file mode 100644
index 0000000..cea92f3
--- /dev/null
+++ b/patches/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch
@@ -0,0 +1,42 @@
+From 1b967f3cb0682dd05128ef13495c2dca2a04dc4e Mon Sep 17 00:00:00 2001
+From: Alexey Neyman <stilor@att.net>
+Date: Sat, 11 Mar 2017 17:27:09 -0800
+Subject: [PATCH] Fix library paths on PowerPC
+
+First, need to match against just the CPU name, not the whole triplet.
+Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin
+triplet.
+
+Second, it should be testing for $target, not $host. Host may be
+little endian by default, and the sysroot directory layout shouldn't
+depend on whether it is built on LE or BE machine.
+
+Signed-off-by: Alexey Neyman <stilor@att.net>
+---
+ ld/emulparams/elf32ppccommon.sh | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
+index 1f54ef8..d00cf68 100644
+--- a/ld/emulparams/elf32ppccommon.sh
++++ b/ld/emulparams/elf32ppccommon.sh
+@@ -44,11 +44,11 @@ fi
+
+ # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+ # Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
+-case "$host":"$EMULATION_NAME" in
+- *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;;
+- *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;;
+- *le-*:*64*) LIBPATH_SUFFIX=64be ;;
+- *le-*:*32*) LIBPATH_SUFFIX=32be ;;
++case `echo "$target" | sed -e 's/-.*//'`:"$EMULATION_NAME" in
++ *le:*64lppc*) LIBPATH_SUFFIX=64 ;;
++ *le:*32lppc*) LIBPATH_SUFFIX=32 ;;
++ *le:*64*) LIBPATH_SUFFIX=64be ;;
++ *le:*32*) LIBPATH_SUFFIX=32be ;;
+ *:*64lppc*) LIBPATH_SUFFIX=64le ;;
+ *:*32lppc*) LIBPATH_SUFFIX=32le ;;
+ *:*64*) LIBPATH_SUFFIX=64 ;;
+--
+2.9.3
+
diff --git a/patches/binutils/2.28/700-Fix-library-paths-on-PowerPC.patch b/patches/binutils/2.28/700-Fix-library-paths-on-PowerPC.patch
new file mode 100644
index 0000000..cea92f3
--- /dev/null
+++ b/patches/binutils/2.28/700-Fix-library-paths-on-PowerPC.patch
@@ -0,0 +1,42 @@
+From 1b967f3cb0682dd05128ef13495c2dca2a04dc4e Mon Sep 17 00:00:00 2001
+From: Alexey Neyman <stilor@att.net>
+Date: Sat, 11 Mar 2017 17:27:09 -0800
+Subject: [PATCH] Fix library paths on PowerPC
+
+First, need to match against just the CPU name, not the whole triplet.
+Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin
+triplet.
+
+Second, it should be testing for $target, not $host. Host may be
+little endian by default, and the sysroot directory layout shouldn't
+depend on whether it is built on LE or BE machine.
+
+Signed-off-by: Alexey Neyman <stilor@att.net>
+---
+ ld/emulparams/elf32ppccommon.sh | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
+index 1f54ef8..d00cf68 100644
+--- a/ld/emulparams/elf32ppccommon.sh
++++ b/ld/emulparams/elf32ppccommon.sh
+@@ -44,11 +44,11 @@ fi
+
+ # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+ # Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
+-case "$host":"$EMULATION_NAME" in
+- *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;;
+- *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;;
+- *le-*:*64*) LIBPATH_SUFFIX=64be ;;
+- *le-*:*32*) LIBPATH_SUFFIX=32be ;;
++case `echo "$target" | sed -e 's/-.*//'`:"$EMULATION_NAME" in
++ *le:*64lppc*) LIBPATH_SUFFIX=64 ;;
++ *le:*32lppc*) LIBPATH_SUFFIX=32 ;;
++ *le:*64*) LIBPATH_SUFFIX=64be ;;
++ *le:*32*) LIBPATH_SUFFIX=32be ;;
+ *:*64lppc*) LIBPATH_SUFFIX=64le ;;
+ *:*32lppc*) LIBPATH_SUFFIX=32le ;;
+ *:*64*) LIBPATH_SUFFIX=64 ;;
+--
+2.9.3
+
diff --git a/patches/uClibc-ng/1.0.20/600-prefer-multilib.patch b/patches/uClibc-ng/1.0.20/600-prefer-multilib.patch
new file mode 100644
index 0000000..4338f9f
--- /dev/null
+++ b/patches/uClibc-ng/1.0.20/600-prefer-multilib.patch
@@ -0,0 +1,46 @@
+diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c
+--- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700
++++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700
+@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr
+ }
+ }
+ #endif
++
++#ifdef LDSO_MULTILIB_DIR
++ /* If multilib directory is selected, search it before falling back to
++ standard lib directories. */
++ _dl_if_debug_dprint("\tsearching multilib lib path list\n");
++ tpnt1 = search_for_named_library(libname, rflags,
++ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":"
++ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR,
++ rpnt, NULL);
++ if (tpnt1 != NULL)
++ return tpnt1;
++#endif
++
+ #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__
+ /* Look for libraries wherever the shared library loader
+ * was installed */
+@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr
+ if (tpnt1 != NULL)
+ return tpnt1;
+ #endif
++
+ /* Lastly, search the standard list of paths for the library.
+ This list must exactly match the list in uClibc/ldso/util/ldd.c */
+ _dl_if_debug_dprint("\tsearching full lib path list\n");
+diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in
+--- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700
++++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700
+@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g
+
+ CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
+
++# Search non-default multilib directories
++ifneq ($(MULTILIB_DIR),lib)
++CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\"
++endif
++
+ ifeq ($(TARGET_ARCH),arc)
+ CFLAGS-ldso.c += -mno-long-calls
+ endif
diff --git a/patches/uClibc-ng/1.0.21/600-prefer-multilib.patch b/patches/uClibc-ng/1.0.21/600-prefer-multilib.patch
new file mode 100644
index 0000000..4338f9f
--- /dev/null
+++ b/patches/uClibc-ng/1.0.21/600-prefer-multilib.patch
@@ -0,0 +1,46 @@
+diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c
+--- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700
++++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700
+@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr
+ }
+ }
+ #endif
++
++#ifdef LDSO_MULTILIB_DIR
++ /* If multilib directory is selected, search it before falling back to
++ standard lib directories. */
++ _dl_if_debug_dprint("\tsearching multilib lib path list\n");
++ tpnt1 = search_for_named_library(libname, rflags,
++ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":"
++ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR,
++ rpnt, NULL);
++ if (tpnt1 != NULL)
++ return tpnt1;
++#endif
++
+ #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__
+ /* Look for libraries wherever the shared library loader
+ * was installed */
+@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr
+ if (tpnt1 != NULL)
+ return tpnt1;
+ #endif
++
+ /* Lastly, search the standard list of paths for the library.
+ This list must exactly match the list in uClibc/ldso/util/ldd.c */
+ _dl_if_debug_dprint("\tsearching full lib path list\n");
+diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in
+--- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700
++++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700
+@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g
+
+ CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
+
++# Search non-default multilib directories
++ifneq ($(MULTILIB_DIR),lib)
++CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\"
++endif
++
+ ifeq ($(TARGET_ARCH),arc)
+ CFLAGS-ldso.c += -mno-long-calls
+ endif
diff --git a/patches/uClibc-ng/1.0.22/600-prefer-multilib.patch b/patches/uClibc-ng/1.0.22/600-prefer-multilib.patch
new file mode 100644
index 0000000..4338f9f
--- /dev/null
+++ b/patches/uClibc-ng/1.0.22/600-prefer-multilib.patch
@@ -0,0 +1,46 @@
+diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c
+--- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700
++++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700
+@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr
+ }
+ }
+ #endif
++
++#ifdef LDSO_MULTILIB_DIR
++ /* If multilib directory is selected, search it before falling back to
++ standard lib directories. */
++ _dl_if_debug_dprint("\tsearching multilib lib path list\n");
++ tpnt1 = search_for_named_library(libname, rflags,
++ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":"
++ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR,
++ rpnt, NULL);
++ if (tpnt1 != NULL)
++ return tpnt1;
++#endif
++
+ #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__
+ /* Look for libraries wherever the shared library loader
+ * was installed */
+@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr
+ if (tpnt1 != NULL)
+ return tpnt1;
+ #endif
++
+ /* Lastly, search the standard list of paths for the library.
+ This list must exactly match the list in uClibc/ldso/util/ldd.c */
+ _dl_if_debug_dprint("\tsearching full lib path list\n");
+diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in
+--- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700
++++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700
+@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g
+
+ CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
+
++# Search non-default multilib directories
++ifneq ($(MULTILIB_DIR),lib)
++CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\"
++endif
++
+ ifeq ($(TARGET_ARCH),arc)
+ CFLAGS-ldso.c += -mno-long-calls
+ endif
diff --git a/patches/uClibc/0.9.33.2/600-prefer-multilib.patch b/patches/uClibc/0.9.33.2/600-prefer-multilib.patch
new file mode 100644
index 0000000..677c599
--- /dev/null
+++ b/patches/uClibc/0.9.33.2/600-prefer-multilib.patch
@@ -0,0 +1,38 @@
+diff -urpN uClibc-0.9.33.2.orig/ldso/ldso/dl-elf.c uClibc-0.9.33.2/ldso/ldso/dl-elf.c
+--- uClibc-0.9.33.2.orig/ldso/ldso/dl-elf.c 2017-03-14 23:40:57.527113741 -0700
++++ uClibc-0.9.33.2/ldso/ldso/dl-elf.c 2017-03-14 23:42:19.308005691 -0700
+@@ -284,6 +284,19 @@ struct elf_resolve *_dl_load_shared_libr
+ }
+ }
+ #endif
++
++#ifdef LDSO_MULTILIB_DIR
++ /* If multilib directory is selected, search it before falling back to
++ standard lib directories. */
++ _dl_if_debug_dprint("\tsearching multilib lib path list\n");
++ tpnt1 = search_for_named_library(libname, rflags,
++ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":"
++ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR,
++ rpnt);
++ if (tpnt1 != NULL)
++ return tpnt1;
++#endif
++
+ #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__
+ /* Look for libraries wherever the shared library loader
+ * was installed */
+diff -urpN uClibc-0.9.33.2.orig/ldso/ldso/Makefile.in uClibc-0.9.33.2/ldso/ldso/Makefile.in
+--- uClibc-0.9.33.2.orig/ldso/ldso/Makefile.in 2017-03-14 23:40:57.527113741 -0700
++++ uClibc-0.9.33.2/ldso/ldso/Makefile.in 2017-03-14 23:41:45.215634328 -0700
+@@ -30,6 +30,11 @@ CFLAGS-ldso/ldso/$(TARGET_ARCH)/ := $(CF
+
+ CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" $(CFLAGS-ldso)
+
++# Search non-default multilib directories
++ifneq ($(MULTILIB_DIR),lib)
++CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\"
++endif
++
+ LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-$(UCLIBC_LDSO_NAME).so := -Wl,--dsbt-index=1
+ ifneq ($(SUPPORT_LD_DEBUG),y)
+ LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS)