This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: AIX architecture problems


On Thu, 26 Aug 2004, David Kramer wrote:

> Background: AIX 5.2 box.  My mission is to port my company's application
> from AIX's native xlC compiler to the GNU toolchain.  I bootstraped gcc
> 3.4.0 from a gcc 3.3.3 (build for AIX5.1) I downloaded.  I built gcc with
> an architecture of "powerpc-ibm-aix5.2.0.0".  I'm still using a binutils
> built by someone else.  I can tell you this:
> 
> /opt/local/bin/ld: supported targets: aixcoff-rs6000 aix5coff64-rs6000 
> srec symbolsrec tekhex binary ihex
> /opt/local/bin/ld: supported emulations: aix5ppc
> /opt/local/bin/ld: emulation specific options:
>   no emulation specific options.
> 
> /opt/local/bin/ld -v
> GNU ld version 2.14 20030612
> 
> I've got all the code compiled using g++ to .o files after some pretty
> significant changes, but linking produces output I don't understand.  
> Here's a shortened version of the output:
> 
> g++ -I. -I../common -I/dkramer/build/dhgcc340/trunk/rogue 
> -I/dkramer/build/dhgcc340/trunk/rogue -I/dkramer/build/dh
> gcc340/trunk/dbaccess -g   -DDEBUG -D_DEBUG -DRWDEBUG -DUSE_SYB  -DSHOWSQL  
> -Daix -DRS6000  -Daix_ansi -D_RWCONFIG=
> xsd -DRWTLS7 -DRWDB5  -L/software/sybase/sybase125/OCS-12_5/lib     
> -L/dkramer/build/dhgcc340/trunk/lib -DUSE_FS -D
> DISABLE_SHLIB_ACCESS=1 -DRW_NO_LEADING_UNDERSCORE  -DRWDB_SYB_DBLIB 
> -Wno-deprecated  -o gensql gensql.o rpttype.o
>  /dkramer/build/dhgcc340/trunk/lib/rwctlxsd.o       -ltcdbd -lrfac0d  
> -lctl52-xsd  -ldbt52-xsd -ltccommond -ltls77-
> xsd  -ltcl -lct -lcs -lblk -lnsl -lcomn -lintl -ldl      -lm
> /opt/local/bin/ld: warning: powerpc:601 architecture of input file 
> `/lib/libm.a(log10.o)' is incompatible with rs6000:6000 output
> /opt/local/bin/ld: warning: powerpc:601 architecture of input file 
> `/lib/libm.a(tan.o)' is incompatible with rs6000:6000 output
> /opt/local/bin/ld: warning: powerpc:601 architecture of input file 
> `/lib/libm.a(round.o)' is incompatible with rs6000:6000 output
> ...
> /opt/local/bin/ld: warning: powerpc:601 architecture of input file 
> `/opt/gcc3.4.0/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/libgcc.a(_divdi3.o)' is incompatible with rs6000:6000 output
> /opt/local/bin/ld: warning: powerpc:601 architecture of input file 
> `/opt/gcc3.4.0/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/libgcc.a(_moddi3.o)' is incompatible with rs6000:6000 output
> /opt/local/bin/ld: warning: powerpc:601 architecture of input file 
> `/opt/gcc3.4.0/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/libgcc.a(_udivdi3.o)' is incompatible with rs6000:6000 output

An off-list post directed me towards the -m options and the -mcpu= option, 
and to use lsattr to find out what I have.

> lsattr -E -l proc0   (there are 4 identical processors)
frequency 339999568       Processor Speed False
state     enable          Processor state False
type      PowerPC_RS64-II Processor type  False

- So which combination of -mfoo and -mcpu=foo do I need, based on that, 
and the "is incompatible with rs6000:6000 output" message?

- Do I need to rebuild the compiler itself with this option?  I'm guessing 
I do, since it's complaining about its own libraries that got built with 
it.

- Do I need to rebuild binutils too?  I'm guessing yes.

Thanks in advance for your help.  I never had to build a compiler before, 
and I have a lot more experience with Linux/ix86 than UNIX.


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