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


Thanks for all of your help.  Well, it turns out the
'gcc-2.95/objdir/powerpc-ibm-aix4.3.1/libiberty/config.log' showed a link
error when trying to link a test program during the libiberty build.  I did
some investigation and found that when I copied (or tried to copy) the AIX
libs to my Linux box, the libs I copied still had the symbolic links to the
actual libs back on AIX.  For example, /usr/lib/libc.a was linked to
/usr/ccs/lib/libc.a and so on.  Of course, those /usr/ccs directories don't
exist on Linux, so I'm going to get the *real* AIX libraries and make sure
they are properly installed on my Linux box.  Then, I'll push the
cross-compiler car back up the hill and see if it rolls down all the way
this time!!!!!!!

I'm not sure if linking system libraries from /usr/lib to other directories
is a common practice in other Unix systems, but I will forewarn other corss
compiler builders out there:  BE SURE YOU ARE COPYING THE CORRECT HEADERS
AND LIBS TO YOUR CROSS COMPILER HOST SYSTEM!!!!  I had similar problems
with the header files being linked to different directories.  I guess I
didn't do such a thorough job with the libs.

Peace......

Tom




Ian Lance Taylor <ian@zembu.com> on 08/19/99 09:57:55 AM

To:   karuottu@freenet.hut.fi
cc:   Tom Williams/HQ/dssi, crossgcc@sourceware.cygnus.com
Subject:  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]