This is the mail archive of the crossgcc@sourceware.cygnus.com 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: more Linux --> AIX cross compiler questions


> > This is because the linked in Dynamic library path was
> > /usr/local/powerpc-ibm-aix4.2.1.0/lib.  The location were the AIX libraries are
> > install to.
> 
>  So Ian was right and it takes the run-time search path from where it found the
> library at link-time, not having any 'default' search libs, like '/usr/lib' as 
> hard-coded to the linker and it putting them to the binaries... The 
> ELF-binaries seem to know where to find the run-time libs much better, but 
> fail to find the dynamic-linker file among the libraries when linking...
> 
> > I tried to work this out in my specs file, but I couldn't get it to
> > work.  I fixed this by adding -Wl,-rpath /usr/lib to my build options.
> 
>  I remember you having it joined with '-shared' (building a shared library), 
> which was wrong. 
> 
> > Ideally you would put -rpath /usr/lib in the link section of your specs file
> > for you cross compiler.
> 
>  The right way could be to add a '%{!static: -rpath /usr/lib}' to the '*link:' 
> spec. So it would give the option when not linking 'static' binaries (let's
> leave the possibility to make them still open...)
> 

Kai I added it to the !shared sections (as I didn't have a !static section)
and it does now work (Hurray!).  What would be the difference.  I know if I
put a -static on my link command I still get tons of link error (this tells
me that I am indeed linking dynamically)  I wonder if the .a extension is
confusing the linker?  Here is the link section of my specs file.  %{!shared:
-rpath /usr/lib %{g*: %(link_libg) }}

Alex Smith
ESM Software Engineer
Modules Team
Axent Technologies, Inc.
alesmi@axent.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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