For some reason on core2 Duo hardware there is difference between gcc -march=native and -march=core2. -mcx16 and -msahf do not exist in -march=core2, I've googled but failed to find why. Probably it's good idea to add it? # cat /proc/cpuinfo | egrep '(model name|flags)' | head -n2 model name : Intel(R) Core(TM)2 Duo CPU L7500 @ 1.60GHz 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 nx lm constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida tpr_shadow vnmi flexpriority # LC_ALL=C gcc -Q --help=target -march=native > march-native # LC_ALL=C gcc -Q --help=target -march=core2 > march-core2 # diff -u march-core2 march-native --- march-core2 2009-01-07 00:28:58.000000000 +0300 +++ march-native 2009-01-07 00:28:49.000000000 +0300 @@ -18,7 +18,7 @@ -mbranch-cost= -mcld [disabled] -mcmodel= - -mcx16 [disabled] + -mcx16 [enabled] -mfancy-math-387 [enabled] -mfp-ret-in-387 [enabled] -mfpmath= @@ -46,7 +46,7 @@ -mred-zone [enabled] -mregparm= -mrtd [disabled] - -msahf [disabled] + -msahf [enabled] -msoft-float [disabled] -msse [disabled] -msse2 [disabled] @@ -63,7 +63,7 @@ -mstringop-strategy= -mtls-dialect= -mtls-direct-seg-refs [enabled] - -mtune= + -mtune= core2 -muclibc [disabled] -mveclibabi= Thank you for your time.
{"core2", PROCESSOR_CORE2, CPU_CORE2, PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_SSSE3 | PTA_CX16},
Andrew, ah, right. But then, why output differs? Gentoo does not modifies this bits...
(In reply to comment #2) > Andrew, ah, right. But then, why output differs? Gentoo does not modifies this > bits... gcc driver has separate checks for CPUID features. So, it first determines CPU model and then adds appropriate flags, derived from CPUID.