AIX cross: nm fails during GCC build?

Martin Baute solar@rootdirectory.de
Fri Aug 8 09:50:00 GMT 2008


Hi all!

I have (somewhat) successfully worked out an AIX cross-compiler. But I
came across some issues that look like bugs to me. (I know, the chances
are miniscule, but...)

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


First I tried GCC-3.4.6, which I have successfully build as cross-compiler
before.

../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++

The build dies when my cross-'nm' apparently ignores --with-sysroot:

powerpc-ibm-aix5.3-nm: /usr/lib/libc.a: File format not recognized

Note that this is /usr/lib/libc.a, NOT $SYSROOT/usr/lib/libc.a. I got
around this by temporarily moving /usr/libc.a out of the way, and
symlinking $SYSROOT/usr/lib/libc.a to that location. While this *does*
work, it's obviously not The Right Thing To Do (tm). Is this a bug, or am
I being daft in some way?


So I tried GCC-4.2.4, thinking this might have to do with me using old
software. However, the effect is (different but) even worse:

/home/baute01/build/build-gcc/./gcc/nm: line 2: exec: -n: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
collect2: /home/baute01/build/build-gcc/./gcc/nm returned 2 exit status

This happens with or without the libc.a-symlink mentioned above. Something
seems to be amiss here?


GCC-4.3.1 doesn't support the powerpc-ibm-aix5.3 target *at all*
(configures fine but says "Configuration powerpc-ibm-aix5.3 not supported"
while configuring ./intl), but I can't find any mention of that in the
changelog? (Actually it says "Support for VMX on AIX 5.3 has been added.
Support for AIX Version 6.1 has been added.") So either I have to state
the target differently, or I am too stupid (again)?


Any input appreciated.

Regards,
-- 
Martin Baute
solar@rootdirectory.de


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



More information about the crossgcc mailing list