I am trying to specify optimization flags (-m....) which are either not supported by the CPU where compilation is performed (cross-compilation) or the CPU is newer than the internal auto-detection mechanism is able to handle.
Here, are two examples to illustrate my scenarios
Compilation platform: Intel(R) Xeon(R) CPU E7340 @ 2.40GHz
|flags||: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca lahf_lm|
1) Trying to explicitly enable a feature supported by the CPU, but CPU is not detected correctly
openf90 -mssse3 hello.f90
openf90 ERROR: Target processor does not support SSSE3.
2) Trying to explicitly enable a feature not supported by the CPU, but CPU where the code should be run does support it
openf90 -msse4.2 hello.f90
openf90 ERROR: Target processor does not support SSE42.
Is there a mechanism to disable this internal check for features supported by the CPU?
Thanking you very much in advance