illegal instruction (CPU mismatch)

Jonathan Wakely jwakely.gcc@gmail.com
Fri Sep 16 13:37:00 GMT 2016


On 16 September 2016 at 13:50, Mahmood Naderan wrote:
>> -march=amdfam10
>
>
> Actually, I tried with march and got the same, dropping march (the default is native) also results the same. I will try with mtune.

The default should not be native, that compiles code that can only run
on a particular machine (or identical ones). That's a very bad
default.

Using a more generic instruction set would produce binaries that run
on all hardware, e.g. -march=x86-64



More information about the Gcc-help mailing list