Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 248831

Summary: toolchain-funcs.eclass gen_usr_ldscript causes many cross-compilation problems.
Product: Gentoo Linux Reporter: Robert Piasek (RETIRED) <dagger>
Component: EclassesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED INVALID    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Robert Piasek (RETIRED) gentoo-dev 2008-11-25 22:57:22 UTC
The way of setting up the local linker scripts with gen_usr_ldscript seems incorrect. It's using absolute path rather than relative path. That causes problems during cross compilation - linking phase, as linker reads HOST libraries and fails with:

file not recognized: File format not recognized                                                           
collect2: ld returned 1 exit status




Reproducible: Always

Steps to Reproduce:
I'm using solar's crossdev-wrappers for armv4t arch:

grep 4411 /usr/armv4tl-softfloat-linux-gnueabi/usr/lib/*

Actual Results:  
/usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libacl.so:   See bug http://bugs.gentoo.org/4411 for more info.
/usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libattr.so:   See bug http://bugs.gentoo.org/4411 for more info.
/usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libblkid.so:   See bug http://bugs.gentoo.org/4411 for more info.
/usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libbz2.so:   See bug http://bugs.gentoo.org/4411 for more info.
/usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libcom_err.so:   See bug http://bugs.gentoo.org/4411 for more info.


everything what's linking against these (and others) libraries fails.
Comment 1 SpanKY gentoo-dev 2008-11-27 21:29:50 UTC
paths in linker scripts are treated relative to the sysroot, not absolute paths
Comment 2 Robert Piasek (RETIRED) gentoo-dev 2008-11-29 15:36:45 UTC
(In reply to comment #1)
> paths in linker scripts are treated relative to the sysroot, not absolute paths
> 

So something else must be missing if compiler is picking HOST libraries instead of sysroot's one.
Comment 3 SpanKY gentoo-dev 2008-11-29 20:11:22 UTC
bugzilla is not a support forum.  if you have questions, feel free to pursue them in the forums or the gentoo embedded mailing list.