diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-10-03 04:05:47 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-10-03 04:05:47 +0000 |
commit | 23246663ced814f047ad618cf1cb58f85575f147 (patch) | |
tree | 03f79b8ec4bc16401b56fb758c9fd776b0f45dd3 /eclass/ELT-patches | |
parent | clean up patch applying a bit, and add support for @GENTOO_LIBDIR@ replacemen... (diff) | |
download | gentoo-2-23246663ced814f047ad618cf1cb58f85575f147.tar.gz gentoo-2-23246663ced814f047ad618cf1cb58f85575f147.tar.bz2 gentoo-2-23246663ced814f047ad618cf1cb58f85575f147.zip |
fix relinking when cross-compiling with a toolchain that doesnt use /lib as its native libdir
Diffstat (limited to 'eclass/ELT-patches')
-rw-r--r-- | eclass/ELT-patches/sys-lib-dlsearch/2.4 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/eclass/ELT-patches/sys-lib-dlsearch/2.4 b/eclass/ELT-patches/sys-lib-dlsearch/2.4 new file mode 100644 index 000000000000..89eb6992e391 --- /dev/null +++ b/eclass/ELT-patches/sys-lib-dlsearch/2.4 @@ -0,0 +1,21 @@ +the linux target parses /etc/ld.so.conf to see what paths are +searched at runtime, and hardcodes /lib /usr/lib as a fallback. +this works poorly when cross-compiling, so tweak the behavior: + - search $SYSROOT/etc/ld.so.conf + - default to Gentoo's notion of the active multilib + +--- a/configure ++++ b/configure +@@ -10405,9 +10405,9 @@ + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path +- if test -f /etc/ld.so.conf; then +- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` +- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" ++ if test -f "$SYSROOT"/etc/ld.so.conf; then ++ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < "$SYSROOT"/etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` ++ sys_lib_dlsearch_path_spec="/@GENTOO_LIBDIR@ /usr/@GENTOO_LIBDIR@ $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on |