This is the mail archive of the
mailing list for the glibc project.
Re: [rfc] dont use absolute paths in ldscripts if they arent needed
- From: Daniel Jacobowitz <drow at false dot org>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Sun, 2 Apr 2006 12:37:00 -0400
- Subject: Re: [rfc] dont use absolute paths in ldscripts if they arent needed
- References: <firstname.lastname@example.org>
On Sun, Apr 02, 2006 at 05:44:29AM -0400, Mike Frysinger wrote:
> 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.
You're confusing two different things here. If you use a sysrooted
toolchain, this is a non-problem; the linker prepends the sysroot
to the absolute path. If you are using /usr/foo-linux/lib, then you're
probably not using a sysroot.