主机平台:Gentoo 11.2
内核版本:Linux Kernel 3.2.1
CPU型号:Pentium Dual-Core T2370 32-bit
1、通过查看CPU的信息可以看到Intel Core 2 Duo/Quad / Xeon 51xx/53xx, Pentium Dual-Core T23xx+/Exxxx的硬件信息如下:
首先设置/etc/make.conf中CFLAGS
我的make.conf文件如下:
- CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
- 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="i686-pc-linux-gnu"
- MAKEOPTS="-j3"
- USE="gnome X dbus hal v4l -qt3 -qt4 gtk laptop samba -kde -arts consolekit policykit udev alsa cdr -cups -bluetooth"
-
- GENTOO_MIRRORS="http://mirrors.163.com/gentoo"
-
- SYNC="rsync://mirrors.163.com/gentoo-portage/"
-
- LINGUAS="en_US en_GB uk zh_CN "
如果机器是64位的,则设置CFLAGS如下:
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
2、内核编译选项