Building GCC without AVX 2

Hi everyone,

I’m using Poudriere to build by FreeBSD packages on a remote server. The server has an Intel Xeon D-1541 processor with support for the AVX 2 instruction set. The packages are also in use on my local machines, which have an Core i7-3520M resp. Core i5-4670K without AVX 2.

Building GCC (4.9, 5.4) on the server leads to the problem that the packages are build against AVX 2, and because of that, some compilers, like gfortran, won’t run on my local machines. For instance, trying to run gfortran on my Core i5:

Code:
> gfortran49 test.f08 -o test
<built-in>: internal compiler error: Illegal instruction
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

How can I disable AVX 2 for GCC?
 
Try -mno-avx2 for the above test. Building GCC without
avx2 is hack in the configure files ..I think disabling build target avx2.
 
No difference:
Code:
> gfortran49 -mno-avx2 test.f08 -o test
<built-in>: internal compiler error: Illegal instruction
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
 
Altering the CFLAGS in the make.conf of the Poudriere Jail did not solve the problem:
Code:
CFLAGS="-mno-avx2"
CXXFLAGS="-mno-avx2"
After rebuilding gcc49 I still can’t compile Fortran code on the local machines.
 
I would say the best address for your question is the
maintainer of lang/gcc.. The mail address
is in the port Makefile. Or run
make -C /usr/ports/lang/gcc5 maintainer.
 
Back
Top