Ryan Mansfield(deleted)
|
Re: errata: linux linker default ld-script
|
Ryan Mansfield(deleted)
04/04/2011 9:30 AM
post84560
|
Re: errata: linux linker default ld-script
On 11-04-04 08:01 AM, dave carlson wrote:
>
> Binutils Developers,
>
> It appears that the in QNX 640, 641, 650, the default linker script(s)
> compiled into the QNX-supplied binutils ld have a default library search
> path:
>
> SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
>
> Running ld -verbose shows that these paths are indeed searched during
> linking.
These paths get prefixed by the sysroot which gets supplied by the
compiler drivers. If you're directly invoking ld, then you need to
specify the --sysroot option . e.g.
--sysroot=/opt/qnx650/target/qnx6/x86/. For most cases, using the
compiler drivers to link is easier to use since there are a number of
default options that need to be specified. e.g. linking in proper crt
files, --dynamic-linker, etc.
But yes I suppose some gear could be added to make the default sysroot
respect the $QNX_TARGET env variable. I'll open a bug for that.
Regards,
Ryan Mansfield
|
|
|
dave carlson(deleted)
|
RE: errata: linux linker default ld-script
|
dave carlson(deleted)
04/04/2011 9:44 AM
post84564
|
RE: errata: linux linker default ld-script
Ryan,
Thanks for the quick response.
We do use the qcc wrapper. The problem isn't finding "your" libs. I have no problem with current method to find QNX
xdev libs. It is easy and it works.
The problem is "our" libs that appear to be later on the search path than the SEARCH_DIRs. (Or lord-forbid, someone has
a missing or typo-ed -L search path for a required lib.)
Vis., a common library (say libxml.a) that I need to link with may find the linux one. Finding a linux library for a
xdev build should be *very* hard to do -- not compile-time hard-wired "easy". For xdev, will the SEARCH_DIRS ever be "
good"?
dave
-----Original Message-----
From: Ryan Mansfield [mailto:community-noreply@qnx.com]
Sent: Monday, April 04, 2011 9:31 AM
To: general-toolchain
Subject: Re: errata: linux linker default ld-script
On 11-04-04 08:01 AM, dave carlson wrote:
>
> Binutils Developers,
>
> It appears that the in QNX 640, 641, 650, the default linker script(s)
> compiled into the QNX-supplied binutils ld have a default library search
> path:
>
> SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
>
> Running ld -verbose shows that these paths are indeed searched during
> linking.
These paths get prefixed by the sysroot which gets supplied by the
compiler drivers. If you're directly invoking ld, then you need to
specify the --sysroot option . e.g.
--sysroot=/opt/qnx650/target/qnx6/x86/. For most cases, using the
compiler drivers to link is easier to use since there are a number of
default options that need to be specified. e.g. linking in proper crt
files, --dynamic-linker, etc.
But yes I suppose some gear could be added to make the default sysroot
respect the $QNX_TARGET env variable. I'll open a bug for that.
Regards,
Ryan Mansfield
_______________________________________________
General
http://community.qnx.com/sf/go/post84560
|
|
|