http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46191

--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> 2010-10-27 12:02:35 UTC ---
On Wed, 27 Oct 2010, jakub at gcc dot gnu.org wrote:

> Using absolute names is undesirable too, because then gcc is not actually
> relocatable.  Guess we want something like $ORIGIN relative path if $ORIGIN or
> something similar expands to the directory the linker script was found in.

Absolute paths work in linker scripts in sysrooted compilers, in that they 
are interpreted relative to the (relocatable) sysroot for a linker script 
(typically libc.so) found in the sysroot.  But GCC itself never installs 
anything in a sysroot, meaning that if you put a linker script there 
(after GCC's own installation) you also need to update paths in it 
accordingly - and so to have a relative path from the sysroot to libgcc.a 
outside the sysroot.

Perhaps what's actually wanted is a way to have the linker search for 
libgcc.a in its normal search path (the compiler should have passed -L 
options that include the libgcc.a installation directory) rather than in 
"."?

Reply via email to