more Linux --> AIX cross compiler questions
Kai Ruottu
karuottu@freenet.hut.fi
Tue Aug 24 01:18:00 GMT 1999
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
More information about the crossgcc
mailing list