This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

AIX cross: Library search path


Hi all!

I have successfully built an i686-pc-linux-gnu / powerpc-ibm-aix5.3
cross-compiler, but I have one remaining stubborn problem.

A "dump -H a.out" (on AIX) on executables created by my cross-compiler
reveals that it wrote a library search path into the executable that
represents the library locations on the *host*, instead of the *target* -
/home/$USER/cross/powerpc-ibm-aix5.3/usr/lib etc. instead of /usr/lib.

AIX refuses to run those executables ("Cannot load module libc.a(shr.o) -
A file or directory in the path name does not exist"); only when I
explicitly set LIBPATH=/usr/lib does it run correctly.

It must be possible to configure the cross-compiler so that it removes the
/home/$USER/cross/powerpc-ibm-aix5.3/ part, but after a day of Googl'ing
and trying I couldn't figure it out. Putting the AIX system headers and
libraries into /usr on my host machine is obviously not an option. (Would
require root access and screw up native compiles.)

Binutils configure:

../binutils-2.17/configure --target=powerpc-ibm-aix5.3
--prefix=$HOME/cross/powerpc-ibm-aix5.3 --disable-nls
--with-sysroot=$HOME/cross/powerpc-ibm-aix5.3

GCC configure:

../gcc-3.4.6/configure --target=powerpc-ibm-aix5.3
--prefix=$HOME/cross/powerpc-ibm-aix5.3 --disable-nls
--with-sysroot=$HOME/cross/powerpc-ibm-aix5.3 --enable-languages=c,c++

I know there are newer versions of binutils and GCC available, but I'd
prefer to stick to these (due to unrelated problems with later versions) -
unless of course my problem is a known bug fixed in newer versions.

I would welcome your advise.

Regards,
--
Martin Baute
solar@negix.net


--
For unsubscribe information see http://sourceware.org/lists.html#faq


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