Version 3.4.3: ix86-linux -> powerpc-aix4.2 Cross-Compiler

Scott Dudley scott@telesoft.com
Wed Jan 19 18:23:00 GMT 2005


I've built and installed binutils-2.15 (linux host - aix target) 
followed by gcc-3.4.3.  I received no errors during compilation of 
either package however, when I try to compile an executable using this 
tool chain, I get numerous errors.  If I use the -c flag to compile the 
object, works fine.  Is this a linker issue?  I copied all libs and 
headers from the target to my --prefix dir 
(/usr/local/cross-tools/powerpc-ibm-aix4.2.1.0).  I've read a number of 
threads where people complained of missing files due to links.  I 
created tars of both directories using the -h flag to remedy this problem.

$ /usr/local/cross-tools/powerpc-ibm-aix4.2.1.0/bin/gcc -v
Reading specs from 
/usr/local/cross-tools/lib/gcc/powerpc-ibm-aix4.2.1.0/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --target=powerpc-ibm-aix4.2.1.0 
--prefix=/usr/local/cross-tools --with-gnu-as --with-gnu-ld 
--enable-threads=aix
Thread model: aix
gcc version 3.4.3

// a.c
void main(void) {}

Works:

$ /usr/local/cross-tools/powerpc-ibm-aix4.2.1.0/bin/gcc -Wall -c a.c
a.c:1: warning: return type of 'main' is not `int'

Fails:

$ /usr/local/cross-tools/powerpc-ibm-aix4.2.1.0/bin/gcc -Wall a.c

See http://www.sdudley.com/errors.txt

Is this doable and if so, what am I missing?  I've built other cross 
tool chains in the past - none of which with the problems I've 
experienced trying to do so with AIX.

Many thanks.

-- 

Regards,

Scott Dudley



More information about the Gcc mailing list