[patch, spu] Update NATIVE_LIB_DIRS to match GCC
Ulrich Weigand
uweigand@de.ibm.com
Fri Nov 14 22:42:00 GMT 2008
Hello,
for the spu-elf target, there is no real "native" system configuration;
the toolchain is always built as cross. Nevertheless, the value of
NATIVE_LIB_DIRS in ld/configure.tgt is relevant: it is what gets used
when building the linker with the --with-sysroot option.
Currently, NATIVE_LIB_DIRS is defined as '/usr/spu/lib' for spu-elf.
This allows configuring a pair of PowerPC and SPU cross-linkers with
the same --with-sysroot=${sysroot} setting; the PowerPC linker will
look into ${sysroot}/usr/local/lib, ${sysroot}/lib, and ${sysroot/usr/lib;
while the SPU linker will look into ${sysroot}/usr/spu/lib.
This has been in binutils for a while; however, the corresponding
GCC patch was never accepted due to concerns that the hard-coded
"/usr/spu" path may not be generic enough. Therefore, I've now
changed GCC to use just "/lib" as "native" library path, allowing
users more flexibility where to put the SPU libraries by choosing
different --with-sysroot values.
This GCC patch has just been approved and committed:
http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00668.html
I'd now like to bring ld back in sync with gcc by changing the value
of NATIVE_LIB_DIRS also to '/lib' instead of '/usr/spu/lib'. This is
a change in behaviour; but users can get the old behaviour back by
simply appending /usr/spu to their --with-sysroot option. (Also, in
many cases it doesn't really matter as GCC will pass the appropriate
-L option when invoking ld anyway.)
Is this OK for binutils mainline?
Thanks,
Ulrich
ChangeLog:
* configure.tgt [spu-*-elf*]: Set NATIVE_LIB_DIRS to '/lib'.
--- src/ld/configure.tgt.orig 2008-11-05 18:44:25.000000000 +0100
+++ src/ld/configure.tgt 2008-11-05 18:45:01.000000000 +0100
@@ -676,7 +676,7 @@ sparc*-*-solaris2*)
spu-*-elf*)
# This allows to build a pair of PPU/SPU toolchains with common sysroot.
- NATIVE_LIB_DIRS='/usr/spu/lib'
+ NATIVE_LIB_DIRS='/lib'
;;
i[03-9x]86-*-cygwin*)
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
More information about the Binutils
mailing list