Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass/ELT-patches/sys-lib-dlsearch: 2.4
Date: Mon, 03 Oct 2011 04:05:58
Message-Id: 20111003040548.09EF22004B@flycatcher.gentoo.org
1 vapier 11/10/03 04:05:48
2
3 Added: 2.4
4 Log:
5 fix relinking when cross-compiling with a toolchain that doesnt use /lib as its native libdir
6
7 Revision Changes Path
8 1.1 eclass/ELT-patches/sys-lib-dlsearch/2.4
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ELT-patches/sys-lib-dlsearch/2.4?rev=1.1&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ELT-patches/sys-lib-dlsearch/2.4?rev=1.1&content-type=text/plain
12
13 Index: 2.4
14 ===================================================================
15 the linux target parses /etc/ld.so.conf to see what paths are
16 searched at runtime, and hardcodes /lib /usr/lib as a fallback.
17 this works poorly when cross-compiling, so tweak the behavior:
18 - search $SYSROOT/etc/ld.so.conf
19 - default to Gentoo's notion of the active multilib
20
21 --- a/configure
22 +++ b/configure
23 @@ -10405,9 +10405,9 @@
24 hardcode_into_libs=yes
25
26 # Append ld.so.conf contents to the search path
27 - if test -f /etc/ld.so.conf; then
28 - 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' ' '`
29 - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
30 + if test -f "$SYSROOT"/etc/ld.so.conf; then
31 + 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' ' '`
32 + sys_lib_dlsearch_path_spec="/@GENTOO_LIBDIR@ /usr/@GENTOO_LIBDIR@ $lt_ld_extra"
33 fi
34
35 # We used to test for /lib/ld.so.1 and disable shared libraries on