Safe Cflags/Via
From Gentoo Linux Wiki
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.
Contents |
[edit] Eden
GCC 4.2+:
CHOST="i686-pc-linux-gnu" CFLAGS="-march=c3-2 -mtune=c3-2 -pipe -mfpmath=sse,387 -msse2 -mmmx -msse"
[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.
Forcing -mss* can produce broken code under certain circumstances, following is safe in this regard:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
[edit] C3 Nehemiah (C5X/C5XL/C5P)
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)
processor : 0 vendor_id : CentaurHauls cpu family : 6 model : 7 model name : VIA Samuel 2
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
