libtool
[Top][All Lists]
Advanced

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

Re: [PATCH] Add 64 bit directories to sys_lib_dlsearch_path_spec for Lin


From: Dan Nicholson
Subject: Re: [PATCH] Add 64 bit directories to sys_lib_dlsearch_path_spec for Linux ELF
Date: Wed, 28 Jan 2009 12:01:35 -0800

On Wed, Jan 28, 2009 at 11:50 AM, Bob Friesenhahn
<address@hidden> wrote:
> On Wed, 28 Jan 2009, Dan Nicholson wrote:
>
>> When the ABI is 64-bit on Linux ELF, add /lib64 and /usr/lib64 to the
>> system library path so that an RPATH is not added when using libraries
>> from these directories.
>
> Are these libraries consistently available for 64-bit Linux?  If not, should
> they be explicitly tested for before depending on them?
>
> I got the impression that Linux systems which are completely 64-bit (i.e.
> don't support executing 32-bit binaries) don't use /lib64 and /usr/lib64.

If they follow the LSB, then they should be using lib64. However, you
can configure the linker any number of ways. I tried to get a patch to
glibc so this path could be determined, but it was rejected.

http://sourceware.org/ml/libc-alpha/2008-12/msg00052.html

I think this is the only reasonable way to proceed, but I suppose that
an existence test would be safe, too:

sys_lib_dlsearch_path_spec="/lib /usr/lib"
case `/usr/bin/file conftest.o` in
    *64-bit*)
        for dir in /lib64 /usr/lib64; do
            test -d $dir &&
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $dir"
        done
        ;;
esac

--
Dan




reply via email to

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