http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607
--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Variation of the problem without -march=native: markus@x4 tmp % cat foo.ii markus@x4 tmp % cat bar.ii typedef int __m128i __attribute__ ((__vector_size__ (16))); __m128i a, b, c; void dequant_scaling () { c = __builtin_ia32_pmulld128 (a, b); } markus@x4 tmp % cat main.ii void dequant_scaling(); int main () { dequant_scaling(); } markus@x4 tmp % g++ -flto -fPIC -march=amdfam10 -O2 -c foo.ii markus@x4 tmp % g++ -flto -fPIC -march=amdfam10 -O2 -msse4.1 -c bar.ii markus@x4 tmp % g++ -flto -march=native -O2 -shared foo.o bar.o markus@x4 tmp % ar cr test.a foo.o bar.o markus@x4 tmp % g++ -march=amdfam10 -O2 main.ii test.a bar.ii: In function ‘dequant_scaling’: bar.ii:3:61: error: ‘__builtin_ia32_pmulld128’ needs isa option -m32 -msse4.1 void dequant_scaling () { c = __builtin_ia32_pmulld128 (a, b); } ^ lto-wrapper: /usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0/g++ returned 1 exit status /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: lto-wrapper failed collect2: error: ld returned 1 exit status