https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81253
Bug ID: 81253
Summary: Flags -march and -mtune are ignored
Product: gcc
Version: 6.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: kidon at posteo dot de
Target Milestone: ---
I have built GCC 6.3.0 on a Intel Broadwell machine with FreeBSD 11. The binary
package of GCC is used on different client machines (each != Broadwell). Trying
to compile arbitrary Fortran code with GNU Fortran results in an internal
compiler error:
$ gfortran6 test.f08 -o test
<built-in>: internal compiler error: Illegal instruction
It seems that Broadwell-specific instructions are compiled into GNU Fortran
even if additional flags to prevend this are set:
CFLAGS="-march=x86-64 -mtune=generic"
MAKE_ENV+= BOOT_CFLAGS="-march=x86-64 -mtune=generic"
CONFIGURE_ENV+= BOOT_CFLAGS="-march=x86-64 -mtune=generic"
These flags are ignored after stage 3 of the build process. The same behaviour
can be seen when building GCC 4.9/5.4/7.0.