http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54097
Bug #: 54097 Summary: configure: error: GNU Fortran is not working (CPU you selected does not support x86-64 instruction set) Classification: Unclassified Product: gcc Version: 4.5.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: pentium4b...@gmail.com Created attachment 27875 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27875 config.log I'm trying to build a 64-bit gcc-4.3.2-r2 in a 32-bit crossdev environment on Gentoo. The CPU and host system are 64-bit. The root Gentoo system is itself a 32-bit chroot, and within this chroot I am trying to cross-compile a 64-bit environment from the 32-bit system. This has worked many times in the past, but gcc is now is failing to build. When configure for libgfortran runs, it fails with the following: configure:14588: checking whether the GNU Fortran compiler is working configure:14601: /var/tmp/portage/cross-x86_64-pc-linux-gnu/gcc-4.5.3-r2/work/build/./gcc/gfortran -B/var/tmp/portage/cross-x86_64-pc-linux-gnu/gcc-4.5.3-r2/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -c -O2 -march=i686 -pipe conftest.f >&5 f951: error: CPU you selected does not support x86-64 instruction set configure:14601: $? = 1 configure: failed program was: | | program foo | real, parameter :: bar = sin (12.34 / 2.5) | end program foo configure:14605: result: no configure:14607: error: GNU Fortran is not working; please report a bug in http://gcc.gnu.org/bugzilla, attaching /var/tmp/portage/cross-x86_64-pc-linux-gnu/gcc-4.5.3-r2/work/build/x86_64-pc-linux-gnu/libgfortran/config.log If I copy the command and test program, and run it with -m32, that test program compiles fine. Since the target arch is i686, why does the compiler have to deliberately be told to generate 32-bit code? Is there a fix for gcc's configure or Makefiles? (Full config.log is attached.) Thanks!