[PING]^N Fix ppc64 bootstrap with a -m32 host compiler
Richard Guenther
rguenther@suse.de
Thu Jun 22 18:09:00 GMT 2006
On Thu, 22 Jun 2006, DJ Delorie wrote:
>
> > * Makefile.in: Use correct libiberty if bootstrapping
> > in a semi-cross environment.
>
> Why is the build_libiberty inappropriate?
Because it is a 32bit object. The host compiler that builds stage1
defaults to 32bit code generation while config.guess (correctly) sees
a powerpc64-unknown-linux-gnu host. So you get linker failures building
stage2:
/abuild/obj/./prev-gcc/xgcc -B/abuild/obj/./prev-gcc/
-B/usr/local/powerpc64-unknown-linux-gnu/bin/ -g -O2 -DIN_GCC -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
-Wno-long-long -Wno-variadic-macros -Wold-style-definition
-Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H
-DGENERATOR_FILE -o build/genmodes \
build/genmodes.o build/errors.o
../build-powerpc64-unknown-linux-gnu/libiberty/libiberty.a
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/bin/ld: warning: powerpc:common architecture of input file
`../build-powerpc64-unknown-linux-gnu/libiberty/libiberty.a(xmalloc.o)' is
incompatible with powerpc:common64 output
...
You can try to work around this by building a cross compiler using
--host=powerpc-linux-gnu --target=powerpc64-linux-gnu, but the you run
into
make[2]: *** No rule to make target
`/usr/local/bin/powerpc64-linux-gnu-as', needed by `stamp-as'. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/abuild/obj2/gcc'
because, well - it's appearantly more complicated to set it up
Working around this by specifying CC="gcc -m64" works though.
Richard.
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
More information about the Gcc-patches
mailing list