[rfc] dont use absolute paths in ldscripts if they arent needed

Mike Frysinger vapier@gentoo.org
Sun Apr 2 09:44:00 GMT 2006


i've been playing with cross-compilers in Gentoo when i noticed that the 
ldscripts installed by glibc always use full paths.  in a normal setup, these 
are clearly required as libc.so.6 goes in /lib/ while libc.so goes 
in /usr/lib/.  in a cross-compiler setup though, you usually have libc.so.6 
and libc.so in the same directory (like /usr/target/lib/).  encoding this 
full path can cause problems when using sysroot options with binutils and 
gcc.  crosstool gets around this by simply running a sed on the linker 
scripts and deleting all leading path elements.  that seems kind of hackish 
so i whipped together a patch that i've been testing in Gentoo with mips64 
multilib cross-compilers and some x86/amd64/ppc native installs that updates 
the glibc build files to only generate absolute paths in the linker scripts 
when $(slibdir) and $(libdir) are not the same.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5005_all_glibc-relative-linker-scripts.patch
Type: text/x-diff
Size: 2412 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20060402/e2d4944f/attachment.bin>


More information about the Libc-alpha mailing list