This is the mail archive of the mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help with ppc-linux cross

Brendan Simon wrote:

> find some runtime libs.  eg. I used the yellowdog linux glibc libraries which were
> pointed out to me by Kai Ruottu.  Here are his instructions.

   < clip >

> Probably need to fix the "-dynamic-linker" statement in the specs file
> ($prefix/lib/gcc-lib/$target/$egcs-version/specs) to be "-dynamic-linker
> $prefix/$target/lib/".

 This is wrong... The '--dynamic-linker ....' shouldn't be touched! It tells 
where to found the file at runtime on a ppc-linux machine. This info will be 
recorded into the executable:

----- clip ---------

E:\usr\local\samples>strings tst_linux-gnu.x | less

----- clip ---------

Although also this may help to find the file at link-time, the right option 
would be using the '-rpath-link $prefix/$target/lib', where the $prefix and 
$target are set to tell where the 'dynamic-linker' file is at link-time...

These things were new to me when I wrote the stuff, if one reads the messages
since a couple a weeks in this list, about Linux, AIX and Solaris target tools,
the '-rpath' (set the link-time/runtime search paths) and the '-rpath-link' 
(set the search path for the linked-libraries, inside a shared library).

 Ian Lance Taylor wrote:

>> I actually don't think --rpath-link is needed on AIX.  On ELF, the
>> --rpath-link option is used because one shared library can refer
>> directly to another, and the linker wants to try to track down the
>> referenced shared library in order to give appropriate warnings if
>> some shared library or symbol is not defined.

 Many thanks to Ian Lance Taylor for clarifying this to all of us!
The 'dynamic-linker' file is referenced in the Linux-gnu '',
here is the 'x86-linux-gnu' target one:

----- clip ---------
E:\usr\local\i586-linux-gnu\lib>strings | grep ld-linux
----- clip ---------

 Without the '-rpath-link', this would be searched in the current
directory and in '/lib'. Of course one can think to install it to
'/lib' in the x86-linux-gnu host, the 'ppc-linux-gnu' one is named
differently as '' or something, but keeping all the target
stuff in one place would be nicer...

Cheers, Kai

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]