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
Can you try without STAGE1_CFLAGS="-O"? And can you try bootstrap instead of profiledbootstrap ?
I tried this: $ make LDFLAGS="" LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.1" BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" profiledbootstrap [...] make[4]: Entering directory `/root/gcc-4.1.1-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.1-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.1-temp/build/gcc/../ld -O2 -O2 -g -O2 -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.1/gcc -I../../gcc-4.1.1/gcc/. -I../../gcc-4.1.1/gcc/../include -I../../gcc-4.1.1/gcc/../libcpp/include -fPIC -mstrict-align -DL_muldi3 -c ../../gcc-4.1.1/gcc/libgcc2.c -o libgcc/./_muldi3.o /tmp/ccCAOUnw.s: Assembler messages: /tmp/ccCAOUnw.s:71: Warning: Unary operator - ignored because bad operand follows /tmp/ccCAOUnw.s:71: Warning: zero assumed for missing expression /tmp/ccCAOUnw.s:72: Error: Unrecognized opcode: `f' /tmp/ccCAOUnw.s:76: Error: Unrecognized opcode: `f' /tmp/ccCAOUnw.s:1160: Error: unassigned file number 2 make[3]: *** [libgcc/./_muldi3.o] Error 1 make[3]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc' make[2]: *** [stmp-multilib] Error 2 make[2]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc' make[1]: *** [stageprofile_build] Error 2 make[1]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc' make: *** [profiledbootstrap] Error 2 and this: $ make LDFLAGS="" LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.1" BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" bootstrap last command builds fine. this is a regression then? gcc-3.4 used to build fine using profiledbootstrap. I have not tried gcc 4.0 IIRC.
I did some testing and this are the results: gcc versions 3.4.6, 4.0.3 and 4.2-20060708 do all _not_ fail with profiledbootstrap and "-mtune=power3 -mcpu=power3" in BOOT_CFLAGS. which information do you need to get this fixed?
any news about this?
Does this work on the current 4.1 branch now?
still failing with the 4.1-20080107 snapshot
(In reply to comment #3) > I did some testing and this are the results: > > gcc versions 3.4.6, 4.0.3 and 4.2-20060708 do all _not_ fail with > profiledbootstrap and "-mtune=power3 -mcpu=power3" in BOOT_CFLAGS. > > which information do you need to get this fixed? *.s asm file, produced by adding -save-temps to the compile flags (Comment #0) for _muldi.o compile. A skilled ppc person can check failed asm instruction and eventually fix assembler template of the insn description. However, gcc-4.1 is a bit old now...
(In reply to comment #7) > However, gcc-4.1 is a bit old now... I'm marking this bug as WONTFIX then.