gcc4.7 and -march=corei7-avx

Adam Sakareassen lists_dfly at petrified.com.au
Fri Nov 2 08:15:57 PDT 2012


I realise gcc4.7 use is experimental at this stage, but does anyone know 
a way around this problem (am I doing something wrong?).

With the inclusion of gcc4.7 in the base I thought I would attempt to 
compile for my cpu type (a recent Intel-i7) using the -march=corei7-avx 
option.  I had read that some Linux apps get a good performance increase 
with the AVX instruction set enabled.

I use "setenv ccver gcc47" to select the compiler.

Building common pkgsrc apps fail with a "Invalid Instruction" message. 
The same packages build ok with -march=corei7.  It's enabling the AVX 
instruction set that causes the problem.  Although not in cc commands 
themselves.  The failure seems to be later in the build sequence.  Is 
there another tool in the build sequence that does not support AVX?

This happens on almost any package so it's pretty easy to reproduce.



More information about the Users mailing list