From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15717 invoked by alias); 14 Dec 2011 08:36:47 -0000 Received: (qmail 14902 invoked by uid 22791); 14 Dec 2011 08:36:42 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Dec 2011 08:36:28 +0000 Received: from eggs.gnu.org ([140.186.70.92]:37166) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1RakKA-0003SU-KB for gcc-help@gnu.org; Wed, 14 Dec 2011 03:36:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RakK6-0005MJ-5t for gcc-help@gnu.org; Wed, 14 Dec 2011 03:36:26 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:55178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RakK5-0005M3-UM for gcc-help@gnu.org; Wed, 14 Dec 2011 03:36:22 -0500 Received: by eekc41 with SMTP id c41so535288eek.0 for ; Wed, 14 Dec 2011 00:36:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.123.10 with SMTP id u10mr1048052eeh.71.1323851780434; Wed, 14 Dec 2011 00:36:20 -0800 (PST) Received: by 10.213.109.4 with HTTP; Wed, 14 Dec 2011 00:36:20 -0800 (PST) Date: Wed, 14 Dec 2011 08:36:00 -0000 Message-ID: Subject: aix cross(?)compiler From: =?UTF-8?Q?J=C4=99drzej_Dudkiewicz?= To: gcc-help@gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.83.41 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-12/txt/msg00113.txt.bz2 Hi, I'm building gcc 4.6.2 (C and C++) on AIX 5.2 to compile for AIX 4.3.3. I copied libraries and /usr/ccs/bin (as, nm, ld and others) from 4.3.3 to sysroot/ directory on AIX 5.2. I have build 32-bit versions of gmp, mpc and fmpr libraries and installed them in xgcc/libs directory (details in "configure" call below). This is how I run configure: AS_FOR_TARGET=3D/home/jd/xcomp/sysroot/usr/ccs/bin/as \ LD_FOR_TARGET=3D/home/jd/xcomp/sysroot/usr/ccs/bin/ld \ STRIP_FOR_TARGET=3D/home/jd/xcomp/sysroot/usr/ccs/bin/strip \ RANLIB_FOR_TARGET=3D/home/jd/xcomp/sysroot/usr/ccs/bin/ranlib \ AR_FOR_TARGET=3D/home/jd/xcomp/sysroot/usr/ccs/bin/ar \ NM_FOR_TARGET=3D/home/jd/xcomp/sysroot/usr/ccs/bin/nm \ ../src/gcc-4.6.2/configure \ --prefix=3D/opt/xgcc/gcc-4.6.2 \ --target=3Dpowerpc-ibm-aix4.3.3.0 \ --with-mpfr=3D/opt/xgcc/libs/mpfr-3.1.0 \ --with-mpc=3D/opt/xgcc/libs/mpc-0.8.2 \ --with-gmp=3D/opt/xgcc/libs/gmp-5.0.2 \ --enable-languages=3Dc,c++ \ --enable-threads \ --enable-static \ --disable-shared \ --disable-ns \ --enable-version-specific-runtime-libs \ --with-build-sysroot=3D/home/jd/xcomp/sysroot \ --with-as=3D/home/jd/xcomp/sysroot/usr/ccs/bin/as \ --with-ld=3D/home/jd//xcomp/sysroot/usr/ccs/bin/ld \ --with-headers=3D/home/jd/xcomp/sysroot/usr/include Halfway throught compilation I receive the following error (make rerun to reproduce): make[4]: Entering directory `/home/jd/xcomp/build/powerpc-ibm-aix4.3.3.0/pthread/libgcc' # If this is the top-level multilib, build all the other # multilibs. /home/jd/xcomp/build/./gcc/xgcc -B/home/jd/xcomp/build/./gcc/ -B/opt/xgcc/gcc-4.6.2/powerpc-ibm-aix4.3.3.0/bin/ -B/opt/xgcc/gcc-4.6.2/powerpc-ibm-aix4.3.3.0/lib/ -isystem /opt/xgcc/gcc-4.6.2/powerpc-ibm-aix4.3.3.0/include -isystem /opt/xgcc/gcc-4.6.2/powerpc-ibm-aix4.3.3.0/sys-include --sysroot=3D/home/jd/xcomp/sysroot -g -O2 -pthread -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -mlong-double-128 -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../../.././gcc -I../../../../src/gcc-4.6.2/libgcc -I../../../../src/gcc-4.6.2/libgcc/. -I../../../../src/gcc-4.6.2/libgcc/../gcc -I../../../../src/gcc-4.6.2/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c ../../../../src/gcc-4.6.2/libgcc/../gcc/unwind-dw2.c ../../../../src/gcc-4.6.2/libgcc/../gcc/unwind-dw2.c: In function 'uw_init_context_1': ../../../../src/gcc-4.6.2/libgcc/../gcc/unwind-dw2.c:1461:5: warning: missing initializer [-Wmissing-field-initializers] ../../../../src/gcc-4.6.2/libgcc/../gcc/unwind-dw2.c:1461:5: warning: (near initialization for 'once_regsizes.__ptonce_mutex') [-Wmissing-field-initializers] In file included from ../../../../src/gcc-4.6.2/libgcc/../gcc/unwind-dw2.c:1582:0: ../../../../src/gcc-4.6.2/libgcc/../gcc/unwind.inc: In function '_Unwind_ForcedUnwind_Phase2': ../../../../src/gcc-4.6.2/libgcc/../gcc/unwind.inc:189:1: error: unrecognizable insn: (insn 34 33 35 8 (set (mem/v:DI (plus:DI (reg/f:SI 1 1) (const_int 20 [0x14])) [0 S8 A8]) (reg:SI 2 2)) ../../../../src/gcc-4.6.2/libgcc/../gcc/unwind.inc:16= 3 -1 (nil)) ../../../../src/gcc-4.6.2/libgcc/../gcc/unwind.inc:189:1: internal compiler error: in extract_insn, at recog.c:2109 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make[4]: *** [unwind-dw2.o] Error 1 make[4]: Leaving directory `/home/jd/xcomp/build/powerpc-ibm-aix4.3.3.0/pthread/libgcc' make[3]: *** [multi-do] Error 1 make[3]: Leaving directory `/home/jd/xcomp/build/powerpc-ibm-aix4.3.3.0/lib= gcc' make[2]: *** [all-multi] Error 2 make[2]: Leaving directory `/home/jd/xcomp/build/powerpc-ibm-aix4.3.3.0/lib= gcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/home/jd/xcomp/build' make: *** [all] Error 2 I'm building using custom-built gcc 4.5.2: [root@aix5_2 build]$ gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/opt/freeware/era-gcc-4.5.2/libexec/gcc/powerpc-ibm-a= ix5.3.0.0/4.5.2/lto-wrapper Target: powerpc-ibm-aix5.3.0.0 Configured with: /jd/gccbuild/aix-4.5.2/gcc-4.5.2/configure --with-as=3D/usr/bin/as --with-ld=3D/usr/bin/ld --enable-languages=3Dc,c++ --prefix=3D/opt/freeware/era-gcc-4.5.2/ --enable-threads --enable-version-specific-runtime-libs --disable-shared --program-suffix=3D-4.5.2 --disable-nls Thread model: aix gcc version 4.5.2 (GCC) I'm more than willing to submit a full bug report with preprocessed sources if appropriate, but first I'd like to know answers to the following: 1) Am I building everything the right way, 2) What command should I use to get the preprocessed source: is it enough to add "-E" and change "-o unwind-dw2.o" to "-o preprocessed_source.c" in the compilation command? TIA, --=20 J=C4=99drzej Dudkiewicz I really hate this damn machine, I wish that they would sell it. It never does just what I want, but only what I tell it.