From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10413 invoked by alias); 27 Aug 2004 15:04:43 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 10398 invoked from network); 27 Aug 2004 15:04:42 -0000 Received: from unknown (HELO uni.thekramers.net) (66.92.68.235) by sourceware.org with SMTP; 27 Aug 2004 15:04:42 -0000 Received: by uni.thekramers.net (Postfix, from userid 500) id 9644F1C181; Fri, 27 Aug 2004 11:04:41 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by uni.thekramers.net (Postfix) with ESMTP id 95E141CB740 for ; Fri, 27 Aug 2004 11:04:41 -0400 (EDT) Date: Fri, 27 Aug 2004 15:16:00 -0000 From: David Kramer To: gcc-help@gcc.gnu.org Subject: AIX architecture problems Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-08/txt/msg00258.txt.bz2 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 > 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 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. Which combination of -mfoo and -mcpu=foo do I need, based on the lsattr output above, and the "is incompatible with rs6000:6000 output" message? -Do I need to just specify one or more of those command line option I'm missing? -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 the compiler itself with this option? I'm guessing I do, since it's complaining about its own libraries that got built with it. Thanks in advance. Apologies in advance if this is something stupid; this is the first time I've done something like this. I did STFW, but most of the references I found were problems with 32/64 bit incompatibilities, which I don't think is the problem here.