public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Jędrzej Dudkiewicz" <jedrzej.dudkiewicz@gmail.com>
To: gcc-help@gnu.org
Subject: aix cross(?)compiler
Date: Wed, 14 Dec 2011 08:36:00 -0000	[thread overview]
Message-ID: <CABJqhQPXhN0fHpJ=UDK6krzKMro9QWE7jU7Gf4xB+a+9rxMBfA@mail.gmail.com> (raw)

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=/home/jd/xcomp/sysroot/usr/ccs/bin/as \
LD_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/ld \
STRIP_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/strip \
RANLIB_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/ranlib \
AR_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/ar \
NM_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/nm \
../src/gcc-4.6.2/configure \
         --prefix=/opt/xgcc/gcc-4.6.2 \
         --target=powerpc-ibm-aix4.3.3.0 \
         --with-mpfr=/opt/xgcc/libs/mpfr-3.1.0 \
         --with-mpc=/opt/xgcc/libs/mpc-0.8.2 \
         --with-gmp=/opt/xgcc/libs/gmp-5.0.2 \
         --enable-languages=c,c++ \
         --enable-threads \
         --enable-static \
         --disable-shared \
         --disable-ns \
         --enable-version-specific-runtime-libs \
         --with-build-sysroot=/home/jd/xcomp/sysroot \
         --with-as=/home/jd/xcomp/sysroot/usr/ccs/bin/as \
         --with-ld=/home/jd//xcomp/sysroot/usr/ccs/bin/ld \
         --with-headers=/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=/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:163 -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 <http://gcc.gnu.org/bugs.html> 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/libgcc'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/home/jd/xcomp/build/powerpc-ibm-aix4.3.3.0/libgcc'
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=gcc
COLLECT_LTO_WRAPPER=/opt/freeware/era-gcc-4.5.2/libexec/gcc/powerpc-ibm-aix5.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=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++
--prefix=/opt/freeware/era-gcc-4.5.2/ --enable-threads
--enable-version-specific-runtime-libs --disable-shared
--program-suffix=-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,
-- 
Jędrzej 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.

             reply	other threads:[~2011-12-14  8:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14  8:36 Jędrzej Dudkiewicz [this message]
2011-12-14  9:45 ` Jonathan Wakely
2011-12-14 10:12   ` Jędrzej Dudkiewicz
2011-12-14 11:09     ` Jonathan Wakely
2011-12-14 11:29       ` Jędrzej Dudkiewicz
2011-12-14 12:07         ` Jonathan Wakely
2012-01-21 18:19   ` Paul Smith
2012-01-21 18:28     ` Marc Glisse
2012-01-21 18:37       ` Newer MPFR versions (was: Re: aix cross(?)compiler) Paul Smith
2012-01-21 18:51     ` aix cross(?)compiler Jonathan Wakely
2012-01-21 22:24       ` Paul Smith
2011-12-14 11:16 ` Kai Ruottu
2011-12-14 11:42   ` Jędrzej Dudkiewicz
2011-12-14 17:10     ` Kai Ruottu
2011-12-22 17:36       ` Jędrzej Dudkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABJqhQPXhN0fHpJ=UDK6krzKMro9QWE7jU7Gf4xB+a+9rxMBfA@mail.gmail.com' \
    --to=jedrzej.dudkiewicz@gmail.com \
    --cc=gcc-help@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).