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


   From: "Kai Ruottu" <karuottu@freenet.hut.fi>
   Date: Thu, 19 Aug 1999 17:35:18 +0000

    Otherwise than Ian Lance Taylor wrote earlier, the 'powerpc-aix4.3-ld --help' 
   will give the option '-rpath-link' as one of the 'supported'... But doesn't it 
   work, as Ian wrote ? This should be the right option for linking, when a 
   '-rpath' or '-rpath-link' is needed for the shared libs to be found at the 
   'wrong' non-native places with a cross-toolset. But is the '-rpath-link' 
   working only with ELF-targets and the AIX's XCOFF-tools don't use it...

The --help option to ld tends to give the same set of options no
matter which target you use.  The --rpath-link option does work on ELF
and SunOS.  However, it has no effect on AIX.  The --rpath-link
documentation in the linker manual mentions this.

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.  AIX shared libraries
are very different from ELF shared libraries, and I'm not sure that an
AIX shared library can actually refer to another shared library.

In other words, I don't think there is any plausible meaning for
--rpath-link on AIX, so I think the linker is correct to ignore it.
The -L and --rpath options do work on AIX (on AIX, --rpath is a GNU
extension).

I would normally use the -L and -rpath options to handle shared
libraries which are found in different places on the host and target
systems.  The --rpath-link option is for the special case when one
shared library refers to another shared library which is not included
directly in the link, and the referenced shared library is in a
different place on the host and target systems.  If you don't have a
case in which one shared library refers to another which is not
included directly in the link, there is no reason to use the
--rpath-link option.

Ian

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