Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] CFlags for CPU
Date: Tue, 26 Jul 2011 19:01:46
Message-Id: CAK2H+edS71xQmLooSGGWTSh4HxhZG1HcniziZb5LQUQwzZkavA@mail.gmail.com
In Reply to: [gentoo-user] CFlags for CPU by Alokat
On Tue, Jul 26, 2011 at 1:36 PM, Alokat <mailing@××××××.org> wrote:
> Hi folks, > > I'm wondering what kind of cpu-type I should use? > > cat /proc/cpuinfo > .............. > > processor       : 1 > vendor_id       : GenuineIntel > cpu family      : 6 > model           : 15 > model name      : Intel(R) Core(TM)2 Duo CPU     L7100  @ 1.20GHz > stepping        : 11 > cpu MHz         : 1197.065 > cache size      : 4096 KB > physical id     : 0 > siblings        : 2 > core id         : 1 > cpu cores       : 2 > apicid          : 1 > initial apicid  : 1 > fpu             : yes > fpu_exception   : yes > cpuid level     : 10 > wp              : yes > 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 nopl aperfmperf pni dtes64 > monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida dts tpr_shadow > vnmi flexpriority > bogomips        : 2394.01 > clflush size    : 64 > cache_alignment : 64 > address sizes   : 36 bits physical, 48 bits virtual > power management: > > .............. > > After a short research on this website: > http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options > > I guess core2 is the right one? > Is that true? > > Regards, > alokat >
Or let gcc figure it out using -march=native which is what I eventually did: # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. CFLAGS="-O2 -march=native -pipe" #Safe CFlags for the Core-i7 (web info) saved for reference #CFLAGS="-march=core2 -msse4 -mcx16 -msahf -O2 -pipe" CXXFLAGS="${CFLAGS}" # WARNING: Changing your CHOST is not something that should be done lightly. # Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing. CHOST="x86_64-pc-linux-gnu" HTH, Mark