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] |
Hi Tom, I created a Solaris 7 x86 -> AIX 4.2.1 and a Linux -> AIX 4.2.1 with very little problems using gcc 2.95. I did run into some problems like you did with getting links instead of the real stuff (be sure to check your include dir, IBM put quite a few links in there too). The config that I found worked best (flawlessly) was: cd $objdir $gccdir/configure --host=$YOURHOST --target=$yourtarget --with-gnu-as --with-gnu-ld --with-headers=$LOCATIONOFAIXINCLUDEDIR --with-libs=$LOCATIONOFAIXLIBS The only issue I had was resolving the dynamic linking of libc.a (yes that's right the .a file) On AIX there are no .so files, but the .a's are all dynamically linked. After I built my compiler and tried to run the executables on my AIX boxes I would get: exec(): 0509-036 Cannot load program testcpp because of the following errors: 0509-022 Cannot load library libc.a[shr.o]. 0509-026 System error: A file or directory in the path name does not exist. This is because the linked in Dynamic library path was /usr/local/powerpc-ibm-aix4.2.1.0/lib. The location were the AIX libraries are install to. I tried to work this out in my specs file, but I couldn't get it to work. I fixed this by adding -Wl,-rpath /usr/lib to my build options . Ideally you would put -rpath /usr/lib in the link section of your specs file for you cross compiler. I hope this will be a useful heads up. Let me know if you figure out the specs file. On Thu, 19 Aug 1999, you wrote: > 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 -- Alex Smith ESM Software Engineer Modules Team Axent Technologies, Inc. (801) 227-3711 alesmi@axent.com ------ 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] |