You are not logged in.
Pages: 1
I am trying to figure out my CFLAGS, due to intel naming convention, I am very confused.
/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Pentium(R) Dual CPU E2200 @ 2.20GHz
stepping : 13
cpu MHz : 1200.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
bogomips : 4399.99
clflush size : 64
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Pentium(R) Dual CPU E2200 @ 2.20GHz
stepping : 13
cpu MHz : 1200.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
bogomips : 4399.87
clflush size : 64
power management:
Pentium 4/Prescott/Celeron 'D'/Pentium 'D'/Core Solo/Core Duo
* i686
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
* x86-64
CHOST="x86_64-unknown-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
[edit] Core 2 Duo/Quad/Xeon
* i686
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
* x86-64
CHOST="x86_64-unknown-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
* Add +1 per extra core to MAKEFLAGS, i.e.:
MAKEFLAGS="-j3"
for multi core CPUs
Which one should I use?
Last edited by kaizoku (2009-12-25 07:17:54)
Offline
I would suggest you use "-march=native" which will pick the correct type based on the instruction sets supported by your CPU. For more details see `man gcc' (search for "Intel 386 and AMD x86-64 Options").
Offline
-march=native results in -march=generic which makes bad codes. I read it somewhere.
Offline
-march=native results in -march=generic which makes bad codes. I read it somewhere.
-march=native will not result in -march=generic. And, -march=generic will produce code that's just fine; It'll just produce a larger binary.
Offline
http://en.gentoo-wiki.com/wiki/CFLAGS
However the side effects, like larger binary size, affects everything. Larger binaries use more memory, load slower, cause more disc I/O, etc.
Can you just tell me do I have Core Duo or Core 2 Duo CPU? Thanks.
Offline
It´s a Dual Core: http://processorfinder.intel.com/detail … Spec=SLA8X
Offline
It´s a Dual Core: http://processorfinder.intel.com/detail … Spec=SLA8X
kaizoku is trying to figure out if it's a Core 2 Duo or a Core Duo. According to many, many search hits it's a Core 2 Duo.
Also from the gentoo page, echoed in the GCC docs:
If you are using gcc-4.2.2 or newer you can also use
-march=native or -mtune=native.
See gcc doc. This comes especially handy if you have an Intel Core* CPU and are planning switching between gcc-4.2 and gcc-4.3.
Offline
Thanks for replies, I appreciate it, will benchmark both to see which is better, thanks again.
Offline
Pages: 1