Hi Albert, * Albert Chin wrote on Sat, May 14, 2005 at 11:14:14PM CEST: > RHEL [34]/amd64 has /lib64, /usr/lib64, /lib, and /lib64. How do we > convince libtool to search /lib64, /usr/lib64 first?
RedHat does it with Daniel Reed's patch, which you did not like (for good reasons). > Unfortunately, the output of gcc --print-search-dirs is: > libraries: > =/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/:/usr/lib/gcc/x86_64-redhat-linux/3.2.3/:/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/../../../../x86_64-redhat-linux/lib/x86_64-redhat-linux/3.2.3/:/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/../../../../x86_64-redhat-linux/lib/:/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/../../../x86_64-redhat-linux/3.2.3/:/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/../../../:/lib/x86_64-redhat-linux/3.2.3/:/lib/:/usr/lib/x86_64-redhat-linux/3.2.3/:/usr/lib/ Yes, ugly. > The /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/../../../ component is > essentially /usr/lib. So, if /usr/lib/libpopt.so and > /usr/lib64/libpopt.so are installed, /usr/lib/libpopt.so will be > selected. Must I LDFLAGS="-L/usr/lib64"? I'm happy to discuss better solutions. Changing before 2.0 might be a good idea. > Moreoever, libtool.m4 has (from the 2.0 branch): *snip* > Why force /lib /usr/lib first here? "Historic practice"? Honestly, I don't know. Actually, Daniel gave good reasoning that /lib and /usr/lib should not show up in the list _at all_ with -m64. * Albert Chin wrote on Sat, May 14, 2005 at 11:48:05PM CEST: > > BTW, how about using the SEARCH_DIR directories from: > $ ld --verbose > rather than hardcoding /lib and /usr/lib? Hmm. Still has /lib and /usr/lib in there. Still, the value is no good for sys_lib_dlsearch_path_spec in a true cross compilation environment, merely for sys_lib_search_path_spec. I am seriously considering to add command line options to override (or append/prepend) both of them. Not only for linux. Or apply whatever else we can agree on. But only if the end result is more cross compile friendly. Input solicited. Regards, Ralf _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool