libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hwcap 0 nosegneg in FC6 ld.so.cache


From: Olly Betts
Subject: Re: hwcap 0 nosegneg in FC6 ld.so.cache
Date: Sat, 23 Jun 2007 14:45:53 +0000 (UTC)
User-agent: slrn/0.9.8.1pl1 (Debian)

On 2007-06-19, Peter O'Gorman <address@hidden> wrote:
> I am inclined to vote for (1) for now. It might be worth a figuring out
> how to have ldconfig (or some other utility) output the real search path
> that the dynamic linker uses for the future, parsing ld.so.conf and
> friends seems to be fragile, this is not the first time that it has had
> problems.

That reminded me that I have this patch lying around, which I'd been
meaning to put forward.

The motivation behind this was that libtool currently doesn't know about
systems where ldconfig has extra default trusted directories (such as
/usr/lib64) so libtool sets an rpath for libraries installed in these
directories, which is against the policies of most Linux distros, and
fixing this currently requires hackery in packaging scripts.  But it
nicely solves this issue too.

Patch is against the 1.5 branch, because that's where I was trying
this out, but if you think this approach is suitable for inclusion, I'm
happy to update it for HEAD and try to provide a suitable ChangeLog
entry.

Index: libtool.m4
===================================================================
RCS file: /sources/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.181
diff -p -u -r1.314.2.181 libtool.m4
--- libtool.m4  18 Jun 2007 02:07:45 -0000      1.314.2.181
+++ libtool.m4  23 Jun 2007 14:37:02 -0000
@@ -1618,10 +1618,10 @@ linux* | k*bsd*-gnu)
   # before this can be enabled.
   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/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / 
/g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  # Extract search path from ldconfig
+  ldconfig_search_path=`/sbin/ldconfig -N -X -v 2>/dev/null|sed 's,^\(/.*\):\( 
(.*)\)\?$,\1,p;d'`
+  if test -n "$ldconfig_search_path"; then
+    sys_lib_dlsearch_path_spec=$ldconfig_search_path
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on

Cheers,
    Olly





reply via email to

[Prev in Thread] Current Thread [Next in Thread]