Gentoo Linux安装--Intel型号CPU的CFlags设置(包括intel core i7 & i5)

来源:互联网 发布:bim软件有哪些 编辑:程序博客网 时间:2024/04/28 23:47


Warning:
 GCC 4.2 and above support -march=native, which automatically detects the optimum settings to use based on your processor. -march=native also detects and applies additional settings beyond -march specific to your CPU, (eg. -msse4). Unless you have a specific reason not to (e.g. distcc cross-compiling), you should probably be using -march=native rather than anything listed below. To find out what -march=native actually picks on the local hardware see Safe Cflags#-march=native.


Contents

 [hide
  • 1 Pentium
  • 2 Pentium w/ MMX
  • 3 Pentium Pro
  • 4 Pentium II
  • 5 Celeron (Mendocino), aka Celeron1
  • 6 Pentium III/ Mobile Celeron
  • 7 Celeron (Coppermine)
  • 8 Celeron (Willamette)
  • 9 Pentium M(Centrino)/Celeron M
  • 10 Mobile Pentium 4-M (Northwood)
  • 11 Pentium 4
  • 12 Pentium 4 (Prescott) / Celeron D
  • 13 Pentium D 8xx / 9xx
  • 14 Xeon w/o EM64T
  • 15 Xeon w/EM64T (also Pentium 4 P6xx or Celeron M 5xx)
  • 16 Intel Core Solo/Duo, Pentium Dual-Core T20xx/T21xx
  • 17 Core 2 Duo/Quad, Xeon 51xx/53xx/54xx/3360, Pentium Dual-Core T23xx+/Exxxx, Celeron Dual-Core
  • 18 Core i7 and Core i5, Xeon 55xx
  • 19 Atom 230, Atom 330, Atom N-Series

[edit]Pentium

vendor_id : GenuineIntelcpu family : 5model : 2model name : Pentium 75 - 200
CHOST="i586-pc-linux-gnu"CFLAGS="-march=pentium -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

[edit]Pentium w/ MMX

CHOST="i586-pc-linux-gnu"CFLAGS="-march=pentium-mmx -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

[edit]Pentium Pro

CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentiumpro -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

[edit]Pentium II

vendor_id : GenuineIntelcpu family : 6model : 3, 5
CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentium2 -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"
processor       : 0vendor_id       : GenuineIntelcpu family      : 6model           : 6model name      : Mobile Pentium IIstepping        : 10cpu MHz         : 397.082cache size      : 256 KBfdiv_bug        : nohlt_bug         : nof00f_bug        : nocoma_bug        : nofpu             : yesfpu_exception   : yescpuid level     : 2wp              : yesflags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsrbogomips        : 794.75clflush size    : 32

[edit]Celeron (Mendocino), aka Celeron1

vendor_id : GenuineIntelcpu family : 6model : 6stepping : 0
CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentium2 -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"
processor       : 0vendor_id       : GenuineIntelcpu family      : 6model           : 6model name      : Celeron (Mendocino)stepping        : 0cpu MHz         : 334.108cache size      : 128 KBfdiv_bug        : nohlt_bug         : nof00f_bug        : nocoma_bug        : nofpu             : yesfpu_exception   : yescpuid level     : 2wp              : yesflags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr upbogomips        : 686.94clflush size    : 32

[edit]Pentium III/ Mobile Celeron

vendor_id : GenuineIntelcpu family : 6model : 7, 8, 11
CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"
processor       : 0vendor_id       : GenuineIntelcpu family      : 6model           : 8model name      : Pentium III (Coppermine)stepping        : 6cpu MHz         : 863.934cache size      : 256 KBfdiv_bug        : nohlt_bug         : nof00f_bug        : nocoma_bug        : nofpu             : yesfpu_exception   : yescpuid level     : 2wp              : yesflags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr ssebogomips        : 1728.97clflush size    : 32

[edit]Celeron (Coppermine)

vendor_id  : GenuineIntelcpu family  : 6model  : 8stepping  : 10
CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

[edit]Celeron (Willamette)

vendor_id  : GenuineIntelcpu family  : 15model  : 1model name  : Intel(R) Celeron(R) CPU XXXXGHzstepping  : 3
CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

[edit]Pentium M(Centrino)/Celeron M

vendor_id  : GenuineIntelcpu family  : 6model  : 9 or 13model name  : Intel(R) Pentium(R) M processor XXXXMHz

For gcc 3.3 or older:

CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentium3 -msse2 -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

For gcc 3.4 and later:

CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

The Celeron M is based on the Pentium M but it has half the L2 cache and does not support the SpeedStep technology.

processor       : 0vendor_id       : GenuineIntelcpu family      : 6model           : 13model name      : Intel(R) Pentium(R) M processor 2.00GHzstepping        : 8cpu MHz         : 800.000cache size      : 2048 KBfdiv_bug        : nohlt_bug         : nof00f_bug        : nocoma_bug        : nofpu             : yesfpu_exception   : yescpuid level     : 2wp              : yesflags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov                  pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts est tm2bogomips        : 1597.70clflush size    : 64

[edit]Mobile Pentium 4-M (Northwood)

vendor_id  : GenuineIntelcpu family  : 15model  : 2model name  : Mobile Intel(R) Pentium(R) 4 - M CPU X.XXGHz
CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

[edit]Pentium 4

vendor_id  : GenuineIntelcpu family  : 15model  : 0 or 1 or 2model name  : Intel(R) Pentium(R) 4 CPU 1.70GHz
CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

[edit]Pentium 4 (Prescott) / Celeron D

vendor_id : GenuineIntelcpu family : 15model : 3 or 4model name  : Intel(R) Pentium(R) 4 CPU XXXGHz -or- Intel(R) Celeron(R) CPU XXXGHz

32-bit profile (x86):

CHOST="i686-pc-linux-gnu"CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

64-bit profile (amd64):

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=nocona -O2 -pipe"CXXFLAGS="${CFLAGS}"
Note: You can verify the chip is a Prescott by looking for pni in the flags section of /proc/cpuinfo. This indicates support for SSE3.

In 2004, Intel started branding processors with the Prescott core as Intel Celeron D.

[edit]Pentium D 8xx / 9xx

vendor_id : GenuineIntelcpu family : 15model  : 4, 6model name  : Intel(R) Pentium(R) D CPU x.xxGHz

32-bit profile (x86):

CHOST="i686-pc-linux-gnu"CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

64-bit profile (amd64):

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=nocona -O2 -pipe"CXXFLAGS="${CFLAGS}"

[edit]Xeon w/o EM64T

vendor_id  : GenuineIntelcpu family  : 15model  : 2model name  : Intel(R) Xeon(TM) CPU 2.80GHz
CHOST="i686-pc-linux-gnu"CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

[edit]Xeon w/EM64T (also Pentium 4 P6xx or Celeron M 5xx)

vendor_id  : GenuineIntelcpu family  : 15model  : 4,6model name  : Intel(R) Xeon(R) CPU XXXXMHzmodel name  : Intel(R) Celeron(R) M CPU 5xx @ XXXGHz

32-bit profile (x86):

CHOST="i686-pc-linux-gnu"CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

64-bit profile (amd64):

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=nocona -O2 -pipe"CXXFLAGS="${CFLAGS}"

[edit]Intel Core Solo/Duo, Pentium Dual-Core T20xx/T21xx

vendor_id  : GenuineIntelcpu family  : 6model  : 14, 22model name  : Genuine Intel(R) CPU TXXXX @ X.XXGHzmodel name  : Intel(R) Celeron(R) CPU 220 @ 1.20GHzmodel name  : Intel(R) Celeron(R) CPU 4X0 @ X.XXGHzmodel name  : Intel(R) Celeron(R) M CPU 4X0 @ X.XXGHz
CHOST="i686-pc-linux-gnu"CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

Notes:

  • It has been confirmed by hongjiu.lu@intel.com that prescott is the correct microarchitecture to use with this CPU. http://article.gmane.org/gmane.comp.gcc.devel/83870
  • The newer (eg. 420) Celeron-M processors are Core Solo based, not Pentium-M based. If your processor's family and model are 6 and 14, then you should use the -march=prescott option.
  • Both the Celeron 4x0 and 220 run fine with Processor family (Pentium M) selected in the kernel.

[edit]Core 2 Duo/Quad, Xeon 51xx/53xx/54xx/3360, Pentium Dual-Core T23xx+/Exxxx, Celeron Dual-Core

vendor_id  : GenuineIntelcpu family  : 6model  : 15, 23model name  : Intel(R) Core(TM)2 CPU XXXX @ XXXGHzmodel name  : Intel(R) Celeron(R) CPU E3400 @ 2.60GHzmodel name  : Intel(R) Pentium(R) Dual CPU T23xx @ XXXGHzmodel name  : Intel(R) Xeon(R) CPU X3360

32 bit profile (x86) for < GCC 4.3:

CHOST="i686-pc-linux-gnu"CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

32 bit profile (x86) for >= GCC 4.3:

CHOST="i686-pc-linux-gnu"CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"CXXFLAGS="${CFLAGS}"

64 bit profile (amd64) for < GCC 4.3

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=nocona -O2 -pipe"CXXFLAGS="${CFLAGS}"

64 bit profile (amd64) for >= GCC 4.3

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=core2 -O2 -pipe"CXXFLAGS="${CFLAGS}"

[edit]Core i7 and Core i5, Xeon 55xx

vendor_id       : GenuineIntelcpu family      : 6model           : 26model name      : Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
vendor_id       : GenuineIntelcpu family      : 6model           : 37model name      : Intel(R) Core(TM) i5 CPU         650  @ 3.20GHz / 660 @ 3.33 GHz
vendor_id       : GenuineIntelcpu family      : 6model           : 42model name      : Intel(R) Core(TM) i5-2430M CPU @ 2.40GHzstepping        : 7cpu MHz         : 2394.550cache size      : 3072 KB
vendor_id       : GenuineIntelcpu family      : 6model           : 26model name      : Intel(R) Xeon(R) CPU          X5570  @ 2.93GHz

32 bit profile (x86)

CHOST="i686-pc-linux-gnu"CFLAGS="-march=prescott -O2 -fomit-frame-pointer -pipe"CXXFLAGS="${CFLAGS}"

64 bit profile (amd64) for < GCC 4.3

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=nocona -O2 -pipe"CXXFLAGS="${CFLAGS}"

64 bit profile (amd64) for GCC 4.3

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=core2 -mtune=generic -O2 -pipe"CXXFLAGS="${CFLAGS}"

64 bit profile (amd64) for GCC 4.6

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=corei7 -O2 -pipe"CXXFLAGS="${CFLAGS}"
Warning: Note that Sandy Bridge CPUs use a march and mtune of corei7-avx not corei7. See the man page for gcc.

[edit]Atom 230, Atom 330, Atom N-Series

vendor_id       : GenuineIntelcpu family      : 6model           : 28model name      : Intel(R) Atom(TM) CPU  230   @ 1.60GHzstepping        : 2cpu MHz         : 1596.175cache size      : 512 KB
vendor_id       : GenuineIntelcpu family      : 6model           : 38model name      : Genuine Intel(R) CPU        @ 1.60GHzstepping        : 1cpu MHz         : 1600.033cache size      : 512 KB

32 bit profile (x86):

CHOST="i686-pc-linux-gnu"CFLAGS="-march=atom -O2 -fomit-frame-pointer -pipe"CXXFLAGS="${CFLAGS}"

32 bit gcc 4.5.3 (x86)

CHOST="i686-pc-linux-gnu"CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe -mfpmath=sse"CXXFLAGS="${CFLAGS}"

These more aggressive flags above improve single threaded performance benchmarks (ie nbench) on the atom 330 with GCC 4.5.3 considerably, most notably there is a floating point performance increase of ~20%.

64 bit profile (amd64) for < GCC 4.3:

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=nocona -O2 -pipe"CXXFLAGS="${CFLAGS}"

64 bit profile (amd64) for GCC 4.3 and 4.4:

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=core2 -O2 -mtune=generic -pipe"CXXFLAGS="${CFLAGS}"

64 bit profile (amd64) for >= GCC 4.5:

CHOST="x86_64-pc-linux-gnu"CFLAGS="-march=atom -O2 -pipe"CXXFLAGS="${CFLAGS}"


原文地址:http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel


原创粉丝点击