Re: AIX Cross compile on Mac OS X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jan 31, 2007, at 10:07 PM, Brian Dessent wrote:

Perry Smith wrote:

So, then I thought I would try to compile gcc using the cross
compiler options using the Mac as the host and AIX as the target.  I
get up to where it tries to build libstdc++ and then the configure
script stops with "undefined host/target combination".  I've loaded
binutils on the Mac, compiled with AIX as the target as well.  Still
no go.

This should work fine.  It would help if you specified more details,
e.g. what was the exact configure command and target specification did
you use?  From looking at gcc-testresults it looks like you want
"powerpc-ibm-aix5.3.0.0", but the output of config.guess on the system
ought to tell you what to use.
...

For binutils (I'm including this just to be more complete), the build command I did was:

../binutils-2.17/configure \
        --target=powerpc-ibm-aix5.3.0.0 \
        --prefix=/Users/pedz/Projects/aix-roots/5.3/usr/local \
        --enable-64-bit-bfd \
        --enable-targets=all

this was followed by 'make' and 'make install'

For gcc, I did this:

ulimit -S -d unlimited
( ../gcc-4.0.2/configure -v \
        --disable-nls \
        --with-sysroot=/Users/pedz/Projects/aix-roots/5.3 \
        --with-gnu-ar \
--with-ar=/Users/pedz/Projects/aix-roots/5.3/usr/local/bin/ powerpc-ibm-aix5.3.0.0-ar \
        --with-gnu-ld \
--with-ld=/Users/pedz/Projects/aix-roots/5.3/usr/local/bin/ powerpc-ibm-aix5.3.0.0-ld \
        --with-gnu-as \
--with-as=/Users/pedz/Projects/aix-roots/5.3/usr/local/bin/ powerpc-ibm-aix5.3.0.0-as \
        --target=powerpc-ibm-aix5.3.0.0 \
        --with-libiconv-prefix=/usr \
--enable-languages=c,c++ && echo "configure returned $?" ) > C-OUT 2>&1

PATH=$PATH:/Users/pedz/Projects/aix-roots/5.3/usr/local/bin
( make && echo "make returned $?" ) > M-OUT 2>&1 &

I will try changing the make to 'make all-gcc'.

As far as the "system headers", I basically copied /usr/include from the AIX host and put it into /Users/pedz/Projects/aix-roots/5.3 and then I set --with-sysroot equal to the base of that. I had to fix a few symbolic links after the copy. As far as I know, that is all the headers that gcc needs but I'm not sure.

I just noticed the libiconv argument. I took this script from what worked to build gcc on AIX and then started adding to it. I probably should make sure that libiconv is correct.

Thank you for your help,
Perry


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux