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


Alex wrote:

> 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) }}

 Putting it into the '%{!shared:....}, says that it will not be used when 
building shared libraries. This can be right or wrong...

 If the '-rpath' is also necessary when making shared libs, putting it into the
added '%{!static: ....}' is the right one, but only if the '-static' is also 
possible....

 I thought a generic case where one can produce either 'statically linked' or 
'dynamically linked' executables, and 'shared libraries' (the '.so' - files).

 The AIX cases seem to be only the 'dynamically linked executables' and
the 'shared libraries'.  If the '-rpath' is needed always, putting it outside
any '%{....}' may be the solution...

 Cheers, Kai

PS. The '%{xxx: -yyy}' like rules in 'specs' simply mean that if the option 
'-xxx' has been given (not given if prefixed with a '!') in the GCC command
line, a option '-yyy' should be given to the 'cpp', 'cc1', assembler, linker
etc. -- just to the component whose spec has the rule... The machine options
(-mxxx) will be checked without the 'm'...


------
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]