Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 248831 - toolchain-funcs.eclass gen_usr_ldscript causes many cross-compilation problems.
Summary: toolchain-funcs.eclass gen_usr_ldscript causes many cross-compilation problems.
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-25 22:57 UTC by Robert Piasek (RETIRED)
Modified: 2008-11-29 20:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.