| [edit] i386 Note: Gentoo's minimum hardware requirement for x86 CPUs is the i486. This is due to glibc-2.4 dropping linuxthreads support and requiring NPTL which doesn't work on i386. If you would like to use a newer machine (eg. a Pentium III) to compile code that will still run on i386 machines use the following:
CHOST="i386-pc-linux-gnu" CFLAGS="-mtune=pentium3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
or
CHOST="i386-pc-linux-gnu" CFLAGS="-march=i386 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
The former will create code optimized for a PIII that will still run on a i386, while the latter will be optimized for the i386 alone.
[edit] i486 CHOST="i486-pc-linux-gnu" CFLAGS="-march=i486 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Intel Processors [edit] Pentium vendor_id : GenuineIntel cpu family : 5 model : 2 model 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] Cyrix MediaGX / AMD Geode GX1 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}"
or
CHOST="i686-pc-linux-gnu" CFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
(these are identical)
[edit] Pentium II vendor_id : GenuineIntel cpu family : 6 model : 3, 5
CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium2 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 6 model name : Mobile Pentium II stepping : 10 cpu MHz : 397.082 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr bogomips : 794.75 clflush size : 32
[edit] Celeron (Mendocino), aka Celeron1 vendor_id : GenuineIntel cpu family : 6 model : 6 stepping : 0
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 6 model name : Celeron (Mendocino) stepping : 0 cpu MHz : 400.932 cache size : 128 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr up bogomips : 802.49 clflush size : 32
[edit] Pentium III vendor_id : GenuineIntel cpu family : 6 model : 7, 8
CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 8 model name : Pentium III (Coppermine) stepping : 6 cpu MHz : 863.934 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse bogomips : 1728.97 clflush size : 32
[edit] Celeron (Coppermine) vendor_id : GenuineIntel cpu family : 6 model : 8 stepping : 10
CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Celeron (Willamette) vendor_id : GenuineIntel cpu family : 15 model : 1 model name : Intel(R) Celeron(R) CPU 1.70GHz stepping : 3
CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Pentium M(Centrino)/Celeron M vendor_id : GenuineIntel cpu family : 6 model : 9 or 13 model name : Intel(R) Pentium(R) M processor XXXXMHz
For gcc 3.3 or older (Warning: dev-java/sun-jdk needs old libstdc++-3.3.so on X86 Systems) :
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.
[edit] Mobile Pentium 4-M (Northwood) vendor_id : GenuineIntel cpu family : 15 model : 2 model 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 : GenuineIntel cpu family : 15 model : 0 or 1 or 2 model name : Intel(R) Pentium(R) 4 CPU XXXXMHz
CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Pentium 4 (Prescott) / Celeron D vendor_id : GenuineIntel cpu family : 15 model : 3 or 4 model 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 -fomit-frame-pointer" 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 : GenuineIntel cpu family : 15 model : 4, 6 model 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 -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Xeon w/o EM64T vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Xeon(R) CPU XXXXMHz
CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Xeon w/EM64T (also Pentium 4 P6xx) vendor_id : GenuineIntel cpu family : 15 model : 4, 6 model name : Intel(R) Xeon(R) CPU XXXXMHz
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 -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Intel Core Solo/Duo vendor_id : GenuineIntel cpu family : 6 model : 14 model name : Genuine Intel(R) CPU TXXXX @ XXXGHz
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. [edit] Intel Core 2 Duo/Quad / Xeon 51xx/53xx vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 CPU XXXX @ 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:
GCC 4.3 has -march=core2[1], but Gentoo has nothing above 4.2 in portage. [edit] VIA Processors Note: EPIA is the name of all VIA's mini-ITX and nano-ITX motherboards with onboard VIA processor. Eden is low-power CPU variant, this name itself also does not tell anything about CPU core. [edit] Esther C5J (Via C7) vendor_id : CentaurHauls cpu family : 6 model : 10 model name : VIA Esther processor 2000MHz
CHOST="i686-pc-linux-gnu" CFLAGS="-march=i686 -mmmx -msse -msse2 -msse3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
As the C7 has the pni flag in /proc/cpuinfo, it supports SSE3. Search for pni on this page to get the explanation.
[edit] C3 Nehemiah (C5X/C5XL/C5P) (VIA) vendor_id : CentaurHauls cpu family : 6 model : 9 model name : VIA Nehemiah
Note: Despite the C5 core name, these processors are marketed as C3s. GCC 3.3 and earlier
CHOST="i686-pc-linux-gnu" CFLAGS="-march=i686 -msse -mmmx -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
GCC 3.4 and later
CHOST="i686-pc-linux-gnu" CFLAGS="-march=c3-2 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
Note: These cores do support the cmov instruction and hence are supported by i686 - and of course c3-2. If you must be compatible with all VIA C3 versions, do not use the settings in this section and instead use the flags in the C3 entry below. [edit] C3 Samuel/Ezra (Via EPIA) CHOST="i586-pc-linux-gnu" CFLAGS="-march=c3 -m3dnow -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
Warning: Do not use any stages or packages containing i686 instructions (such as cmov) with the Samuel 2 and Ezra versions of the C3. The Ezra doesn't have any special instructions that you could optimize for, just consider it a K6-3 - basically a Pentium 2 with 3DNow.
Note: The Mini-ITX EPIA-SP features a VIA C3 Eden processor, even if /proc/cpuinfo answers: model name: VIA Nehemiah [edit] Transmeta Processors [edit] Transmeta Crusoe vendor_id : GenuineTMx86 cpu family : 6 model : 4 model name : Transmeta(tm) Crusoe(tm) Processor TM5800 stepping : 3
CHOST="i686-pc-linux-gnu" CFLAGS="-march=i686 -Os -mmmx -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Transmeta Efficeon vendor_id : GenuineTMx86 cpu family : 15 model : 2 model name : Transmeta Efficeon(tm) Processor TM8000 stepping : 4
CHOST="i686-pc-linux-gnu" CFLAGS="-mtune=pentium3 -msse2 -O2 -pipe -falign-functions=0 -falign-jumps=0 -falign-loops=0" CXXFLAGS="${CFLAGS}"
Note: The Efficeon processor will reorder and realign instructions on translating from x86 to VLIW (Very Large Instruction Word), so not aligning functions/jumps/loops will produce smaller executable without any effect on speed.
[edit] AMD Processors [edit] K6 (AMD) CHOST="i586-pc-linux-gnu" CFLAGS="-march=k6 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] K6-2 (AMD) vendor_id : AuthenticAMD cpu family : 5 model : 8
CHOST="i586-pc-linux-gnu" CFLAGS="-march=k6-2 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 5 model : 8 model name : AMD-K6(tm) 3D processor stepping : 12 cpu MHz : 451.031 cache size : 64 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow k6_mtrr up bogomips : 902.84 clflush size : 32
Note: /proc/cpuinfo may be confusing. The model name may say "AMD-K6(tm) 3D Processor" but it is not a AMD K6-3. Rely on the vendor_id, CPU family, and model number.Note: If you get "Illegal Instruction" errors on compiles (especially long ones), you may be running into a cooling problem, or worse yet, a Sig11 (segmentation fault/bad ram) problem. Bug #24379 has a discussion about it.
[edit] Geode LX (AMD) vendor_id : AuthenticAMD cpu family : 5 model : 10
CHOST="i586-pc-linux-gnu" CFLAGS="-march=k6-2 -Os -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] K6-3 (AMD) CHOST="i586-pc-linux-gnu" CFLAGS="-march=k6-3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Duron (AMD) From 600 to 900 MHz (these models have a tbird-alike core model)
product: AMD Duron(tm) Processor version: 6.3.1
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Mobile Duron (AMD) vendor_id : AuthenticAMD cpu family : 6 model : 3 model name : AMD Duron(tm) Processor
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Duron Morgan (AMD) From 900 to 1300 MHz The Morgan Durons are based on the Palomino core, and hence can be treated as Athlon XP's.
vendor_id : AuthenticAMD cpu family : 6 model : 7 model name : AMD Duron(tm) Processor stepping : 1
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Athlon (AMD) vendor_id : AuthenticAMD cpu family : 6 model : 4 or 2 or 1 model name : AMD Athlon(TM)Processor or AMD-K7(TM)Processor stepping : 4 or 2
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Athlon-tbird, aka K75 (AMD) vendor_id : AuthenticAMD cpu family : 6 model : 4 model name : AMD Athlon(tm) Processor
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Athlon-tbird XP/Duron (AMD) vendor_id : AuthenticAMD cpu family : 6 model : 8 model name : AMD Athlon(tm)
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
Sempron 2400+ (2000MHz) is also identified as cpu family:6 model:8 model_name:AMD Sempron(TM) 2400+ (256kB cache) The Duron 1800+ is also included in this list.
[edit] Athlon 4 (AMD) CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-4 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Athlon XP/Geode NX (AMD) vendor_id : AuthenticAMD cpu family : 6 model : 6 stepping : 2 Some CPUs have also been observed with the following: model : 10 model name : AMD Athlon(tm) XP 2500+ stepping : 0
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 6 model name : AMD Athlon(tm) XP 2000+ stepping : 2 cpu MHz : 1670.597 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts bogomips : 3343.54
# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 8 model name : AMD Geode NX 1750 stepping : 1 cpu MHz : 1400.115 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow up ts fid vid bogomips : 2801.55 clflush size : 32
[edit] Athlon MP (AMD) vendor_id : AuthenticAMD cpu family : 6 model : 10 model name : AMD Sempron(tm) stepping : 0
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-mp -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Athlon 64 (AMD) 32 bit
CHOST="i686-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
64 bit cpu family :15 model :4 model name :AMD Athlon(tm) 64 Processor 3200+ stepping :8
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CXXFLAGS="${CFLAGS}"
# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 63 model name : AMD Athlon(tm) 64 Processor 3200+ stepping : 2 cpu MHz : 1999.821 cache size : 512 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm bogomips : 4001.79 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp
[edit] Athlon 64 X2 (AMD) vendor_id: AuthenticAMD cpu family: 15 model: 35, 43, or 75 stepping: 1 or 2 model name: AMD Athlon(tm) X2 Dual Core Processor
32 bit
CHOST="i686-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
64 bit
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe" CXXFLAGS="${CFLAGS}"
If you have a newer Athlon64("Venice" or "San Diego")/Athlon64-X2("Manchester", "Toledo", or "Windsor") (check for pni in cat /proc/cpuinfo) you can also add -msse3 to your CFLAGS to enable SSE3 support. Any chip using the 90nm process except for the "Winchester" class Athlon64 supports SSE3.
Also bear in mind that all Athlon64 X2 and Opteron 165, 170, 175, 180, and 185 processors are dual-core CPUs so make sure that you use MAKEOPTS="-j3" in your make.conf. This doesn't affect the code but might reduce compile times.
All socket AM2 processors are SSE3 capable as well.
[edit] 1xx Opteron (AMD) vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron(tm) Processor 1xx stepping : 8
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=opteron -O2 -pipe" CXXFLAGS="${CFLAGS}"
socket 939 # cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 39 model name : AMD Opteron(tm) Processor 144 stepping : 1 cpu MHz : 1800.000 cache size : 1024 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up pni lahf_lm bogomips : 3593.50 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp
[edit] 2xx/8xx Opteron (AMD) vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron(tm) Processor xxx stepping : 8
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=opteron -O2 -pipe" CXXFLAGS="${CFLAGS}"
[edit] 22xx Dual-Core Opteron (AMD) vendor_id : AuthenticAMD cpu family : 15 model : 65 model name : Dual-Core AMD Opteron(tm) Processor 22xx stepping : 2
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=opteron -O2 -pipe" CXXFLAGS="${CFLAGS}"
[edit] 23xx Quad-Core Barcelona (AMD) vendor_id : AuthenticAMD cpu family : 16 model : 2 model name : Quad-Core AMD Opteron(tm) Processor 23xx stepping : 10
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CXXFLAGS="${CFLAGS}"
[edit] Sempron/Sempron64 (AMD) If it is a Socket A (Socket 462) Sempron you can be sure it is neither 64-bit capable nor SSE2/SSE3 capable. If it is a Socket AM2 Sempron you can be sure it is both 64-bit and SSE3 capable. If it is a Socket 754 it depends on the stepping (part number): Steppings: CG (Part No.: *AX) or D0 (Part No.: *BA) have neither SSE3 nor AMD64 Stepping: E3 (Part No.: *BO) has SSE3 Stepping: E6 (Part No.: *BX) has SSE3 and AMD64 Anyway you should check /proc/cpuinfo for pni (SSE3) string before using -msse3. vendor_id : AuthenticAMD cpu family : 15 model : 44 model name : AMD Sempron(tm) Processor
Note: The model number may differ.
32 bit (Socket A)
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
64 bit
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CXXFLAGS="${CFLAGS}"
64 bit (SSE3 capable)
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -msse3 -O2 -pipe" CXXFLAGS="${CFLAGS}"
Sempron64 - 32 bit
CHOST="i686-pc-linux-gnu" CFLAGS="-march=k8 -msse3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
Sempron64 - 64 bit
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -msse3 -O2 -pipe" CXXFLAGS="${CFLAGS}"
[edit] Turion64 (AMD) 32 bit
CHOST="i686-pc-linux-gnu" CFLAGS="-march=k8 -msse3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
64 bit
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -msse3 -O2 -pipe" CXXFLAGS="${CFLAGS}"
SSE3 is called pni in /proc/cpuinfo for this Central Processing Unit.
[edit] Mobile Sempron (AMD) vendor_id : AuthenticAMD cpu family : 15 model : 8 model name : Mobile AMD Sempron Processor 2800+
CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -msse3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
If you have a Sempron without SSE3 (earlier chips), omit "-msse3". SSE3 is called pni (prescott new instuction) by cpuinfo (cat /proc/cpuinfo).
Check it out, there are many different sempron mobile CPUs on sale, those that work at 1.8GHz are K8 (i.e. AMD SM 3000+), some others, older, aren't yet k8 but they're still k7 so you must specify athlon-xp instead of athlon64, anyway AMD announced in 2006 there will be 64bit Sempron Mobile CPUs so be carefull and pay attention, run a cat /proc/cpuinfo and then ask on AMD forums if you don't know what to do.
[edit] PowerPC Processors [edit] PowerPC 601 The PowerPC 601 CPU is a mixture between POWER and PowerPC architectures and it is a must you specify -mcpu=601 for taking advantage of the POWER part of the processor and do not use unimplemented PowerPC instructions (implementation of both ISAs is incomplete on 601).
CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=601 -O2 -pipe" CXXFLAGS="${CFLAGS}"
NOTE: Code created with this flags will not run in any other CPU but PowerPC 601, if you want to run on 601 and others use -mcpu=common and code will run in ANY POWER or PowerPC CPU.
[edit] PowerPC 603 CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=603 -O2 -pipe" CXXFLAGS="${CFLAGS}"
[edit] PowerPC 603e CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=603e -O2 -pipe" CXXFLAGS="${CFLAGS}"
[edit] PowerPC 604 CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=604 -O2 -pipe" CXXFLAGS="${CFLAGS}"
[edit] PowerPC 604e CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=604e -O2 -pipe" CXXFLAGS="${CFLAGS}"
-Os may be beneficial on older processors (of any kind, not just PowerPCs).
[edit] PowerPC 604e CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=604e -O2 -pipe -fno-strict-aliasing" CXXFLAGS="${CFLAGS}"
[edit] PowerPC 750 (G3) CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=750 -Os -pipe -fno-strict-aliasing" CXXFLAGS="${CFLAGS}"
Given the smaller cache sizes, and the fact that the L2 cache is off-die on the G3, better performance may be achieved with -Os rather than -O2.
[edit] PowerPC 750cx (G3e) CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=750 -O2 -pipe -fno-strict-aliasing" CXXFLAGS="${CFLAGS}"
The 750cx offers more L2 cache than its predecessor, and moves it on-die for a performance boost. Better performance may be achieved with -O2.
[edit] PowerPC 7400 (G4) CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=7400 -O2 -pipe -maltivec -mabi=altivec" CXXFLAGS="${CFLAGS}"
Note: -O3 is unstable on G4
[edit] PowerPC 7450 (G4 second generation) CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=7450 -O2 -pipe -maltivec -mabi=altivec" CXXFLAGS="${CFLAGS}"
[edit] PowerPC 970 (G5) CHOST="powerpc64-unknown-linux-gnu" CFLAGS="-mcpu=G5 -O2 -pipe -maltivec -mabi=altivec -fno-strict-aliasing" CXXFLAGS="${CFLAGS}" LDFLAGS="-Wl,-O1"
[edit] Cell Broadband Engine (Playstation 3) Don't use -mcpu=970 it will make the PS3 slower due to the different pipeline (after all it is a CELL B.E and not a G5). GCC 4.3 or SDK 2.1+ is recommended. A second hint: Unlike x86-64 architecture, it is better to use 32bit user land on a PowerPC with a 64bit kernel. The benefit is, that pointers are 32bits so memory usage goes down slightly. In fact unlike x86_64, the number of registers don't change and the register size does not change (though the Linux kernel has issues with interrupts) and the kernel will save all 64bits of the register across context switches.
CHOST="powerpc64-unknown-linux-gnu" CFLAGS="-O2 -pipe -mcpu=cell -mabi=altivec" CXXFLAGS="${CFLAGS}" LDFLAGS=""
[edit] PowerPC (If you don't know which one) CHOST="powerpc-unknown-linux-gnu" CFLAGS="-O2 -pipe" CXXFLAGS="${CFLAGS}"
[edit] Embedded PowerPC CPUs You should check /proc/cpuinfo for the CPU model and then for a correct -mcpu flag on man gcc. If you do not find it, use powerpc.
CHOST="powerpc-unknown-linux-gnu" CFLAGS="-mcpu=<flag> -Os -pipe" CXXFLAGS="${CFLAGS}"
[edit] Other Processors [edit] Sparc CHOST="sparc-unknown-linux-gnu" CFLAGS="-O2 -pipe" CXXFLAGS="${CFLAGS}"
[edit] Sparc 64 CHOST="sparc-unknown-linux-gnu" CFLAGS="-mcpu=ultrasparc -mtune=ultrasparc -O2 -pipe" CXXFLAGS="${CFLAGS}"
Be careful! The CHOST for Sparc64 is still sparc-unknown-linux-gnu, not sparc64-!
[edit] HPPA 1.1 CHOST="hppa1.1-unknown-linux-gnu" CFLAGS="-O2 -pipe -mschedule=7100LC -march=1.1 -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] HPPA 2.0 CHOST="hppa2.0-unknown-linux-gnu" CFLAGS="-O2 -pipe -mschedule=8000 -march=2.0 -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"
[edit] Alpha ev56 CHOST="alpha-unknown-linux-gnu" CFLAGS="-mcpu=ev56 -mieee -O2 -pipe" CXXFLAGS="${CFLAGS}"
[edit] Alpha ev67 CHOST="alpha-unknown-linux-gnu" CFLAGS="-mieee -mcpu=ev67 -Wa,-mev6 -O2 -pipe " CXXFLAGS="${CFLAGS}"
This applies to ev68 (Compaq Alpha DS25) machines too. Without -mcpu=ev67 -Wa,-mev6 flags it cannot bootstrap at all.
|