If I try to bootstrap on ppc64 and try to use BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" I get an ICE. If I leave out "-mtune=power3 -mcpu=power3" the bootstrap finishes. So one of the optimizations is causing this.
here are the steps I followed some while ago. see http://bugs.gentoo.org/show_bug.cgi?id=126960 (gcc 4.1.1 has the same result) $ mkdir gcc-4.1.0-temp $ cd gcc-4.1.0-temp/ $ tar xfj /usr/portage/distfiles/gcc-4.1.0.tar.bz2 $ mkdir build $ cd build/ $ ../gcc-4.1.0/configure --prefix=/usr --bindir=/usr/powerpc64-unknown-linux-gnu/gcc-bin/4.1.0 --includedir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0/include --datadir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0 --mandir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0/man --infodir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0/info --with-gxx-include-dir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0/include/g++-v4 --host=powerpc64-unknown-linux-gnu --build=powerpc64-unknown-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu [...] $ make LDFLAGS="" STAGE1_CFLAGS="-O" LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0" BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" profiledbootstrap [...] make[4]: Entering directory `/root/gcc-4.1.0-temp/build/gcc' make[4]: `crtend.o' is up to date. make[4]: `crtbeginS.o' is up to date. make[4]: `crtendS.o' is up to date. make[4]: `crtbeginT.o' is up to date. make[4]: `ecrti.o' is up to date. make[4]: `ecrtn.o' is up to date. make[4]: `ncrti.o' is up to date. make[4]: `ncrtn.o' is up to date. make[4]: `crtsavres.o' is up to date. make[4]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc' ./xgcc -B./ -B/usr/powerpc64-unknown-linux-gnu/bin/ -isystem /usr/powerpc64-unknown-linux-gnu/include -isystem /usr/powerpc64-unknown-linux-gnu/sys-include -L/root/gcc-4.1.0-temp/build/gcc/../ld -O2 -O2 -O2 -pipe -mtune=power3 -mcpu=power3 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -specs=ldblspecs -mno-minimal-toc -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc-4.1.0/gcc -I../../gcc-4.1.0/gcc/. -I../../gcc-4.1.0/gcc/../include -I../../gcc-4.1.0/gcc/../libcpp/include -fPIC -mstrict-align -DL_muldi3 -c ../../gcc-4.1.0/gcc/libgcc2.c -o libgcc/./_muldi3.o {standard input}: Assembler messages: {standard input}:85: Warning: Unary operator - ignored because bad operand follows {standard input}:85: Warning: zero assumed for missing expression {standard input}:86: Error: Unrecognized opcode: `m' {standard input}:96: Error: Unrecognized opcode: `m' {standard input}:1199: Error: unassigned file number 2 make[3]: *** [libgcc/./_muldi3.o] Error 1 make[3]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc' make[2]: *** [stmp-multilib] Error 2 make[2]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc' make[1]: *** [stageprofile_build] Error 2 make[1]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc' make: *** [profiledbootstrap] Error 2 -- Summary: [4.1/ICE] gcc-4.1.0 won't compile on power3 Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: markus at unixforces dot net GCC build triplet: powerpc64-unknown-linux-gnu GCC host triplet: powerpc64-unknown-linux-gnu GCC target triplet: powerpc64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28326