aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2014-02-08 03:44:32 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-18 08:37:02 +0000
commit875df27e56b82fcf970410b6d78e3672471c336a (patch)
tree02de0ac39deb74e0eebd617a3ce0a485627590d0 /meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch
parentcc90cbc6d36b9f15a461b877b44c7498c2061744 (diff)
downloadopenembedded-core-contrib-875df27e56b82fcf970410b6d78e3672471c336a.tar.gz
eglibc: Upgrade from 2.18 -> 2.19
License formatting and address for FSF in the COPYING and COPYING.LIB has changed. Dropped patched already upstream and patches that were workarounds for older glibc and busybox for e500 we have should pass --without-fp to eglibc/glibc 2.19 onwards the code is merged from eglibc into glibc upstream under nofpu/ pretext Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch')
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch b/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch
new file mode 100644
index 0000000000..e83a0ad6d2
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch
@@ -0,0 +1,56 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+The default lib search path order is:
+
+ 1) LD_LIBRARY_PATH
+ 2) RPATH from the binary
+ 3) ld.so.cache
+ 4) default search paths embedded in the linker
+
+For nativesdk binaries which are being used alongside binaries on a host system, we
+need the search paths to firstly search the shipped nativesdk libs but then also
+cover the host system. For example we want the host system's libGL and this may be
+in a non-standard location like /usr/lib/mesa. The only place the location is know
+about is in the ld.so.cache of the host system.
+
+Since nativesdk has a simple structure and doesn't need to use a cache itself, we
+repurpose the cache for use as a last resort in finding host system binaries. This
+means we need to switch the order of 3 and 4 above to make this work effectively.
+
+RP 14/10/2010
+
+Index: libc/elf/dl-load.c
+===================================================================
+--- libc.orig/elf/dl-load.c 2012-12-02 13:11:45.000000000 -0800
++++ libc/elf/dl-load.c 2013-01-09 07:00:59.135223084 -0800
+@@ -2215,7 +2215,14 @@
+ fd = open_path (name, namelen, mode & __RTLD_SECURE,
+ &loader->l_runpath_dirs, &realname, &fb, loader,
+ LA_SER_RUNPATH, &found_other_class);
+-
++ /* try the default path. */
++ if (fd == -1
++ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
++ || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
++ && rtld_search_dirs.dirs != (void *) -1)
++ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
++ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
++ /* Finally try ld.so.cache */
+ #ifdef USE_LDCONFIG
+ if (fd == -1
+ && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
+@@ -2283,14 +2290,6 @@
+ }
+ #endif
+
+- /* Finally, try the default path. */
+- if (fd == -1
+- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
+- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
+- && rtld_search_dirs.dirs != (void *) -1)
+- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
+- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
+-
+ /* Add another newline when we are tracing the library loading. */
+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0))
+ _dl_debug_printf ("\n");