If you're not using distcc, use the first one. If you are, figure out what "-march=native" actually translates to using this forum post: http://forums.gentoo.org/viewtopic-t-602834.html
#CFLAGS="-O2 -pipe -march=native"
# equivalent to:
CFLAGS="-pipe -march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=k8 -O2"
CXXFLAGS="${CFLAGS}"i.e. use the same CFLAGS for C, C++, Fortran 77, and Fortran 90.
FFLAGS="${CFLAGS}"
FCFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"Surprise! I'm 64 bit.
ICCCFLAGS="-O2 -gcc"At some point I'm going to try using the Intel Compilers w/ portage on a handful of apps to see if there's a performance improvement. The guide I'm planning to use is here: http://www.gentoo-wiki.info/HOWTO_ICC_and_Portage
ICCCXXFLAGS="${ICCCFLAGS}"
IFORTFLAGS="${ICCCFLAGS}"
USE="3dnow 3dnowext R Xaw3d apng bash-completion blas caps cdda cuda emacsMost of this is pretty normal for a workstation, except for jack which is for if/when I finally get around do doing professional audio stuff. I've got an nvidia card, thus nvidia and vdpau (nvidia's hardware support for video codecs/etc).
ffmpeg fluidsynth fontconfig foomaticdb fuse gd icu jack java kerberos
lapack logrotate lvm lzma lzo mmx mono musicbrainz nfs nis nsplugin ntfs
numpy nvidia openal phonon pic pulseaudio qt4 rar samba sasl shaders smp
snmp sqlite sqlite3 sse sse2 tcl theora threads tk twolame v4l v4l2 vdpau
video vim-syntax vlc webkit xcomposite xine xinerama xrandr xvmc
-bluetooth -embedded -oss"
MAKEOPTS="-j5 -l5"MAKEOPTS says to launch 5 jobs, but keep the load around 5. EMERGE_DEFAULT_OPTS says much the same, but also to automatically reconfigure portage to add keywords when I try to upgrade or install apps. The "-j5" in EMERGE_DEFAULT_OPTS also means that provided the load is low enough, it will actually compile up to five packages at the same time.
EMERGE_DEFAULT_OPTS="-j5 --load-average 5 --autounmask-write --with-bdeps y"
GENTOO_MIRRORS="http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/"Mirrors and a sync server. I used mirrorselect to pick mine. I don't remember how.
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
FEATURES="ccache parallel-fetch"Use ccache, which caches C stuff. Also set the CCACHE_SIZE. Also fetch source packages in parallel, rather than waiting for the compile to start. (This last bit saves your time!)
CCACHE_SIZE="2G"
VIDEO_CARDS="nvidia nouveau"Tells X packages & alsa what hardware I have.
ALSA_CARDS="hda-intel"
INPUT_DEVICES="evdev keyboard mouse"
PORTAGE_NICENESS="15"Sets the gcc/portage/etc NICE value to 15 so that its jobs take a lower priority to my normal jobs. Less latency on my workstation == awesome.
source /var/lib/layman/make.confI use layman for extra stuff generic portage doesn't provide. I use the pro-audio, science, and zugaina overlays most frequently.
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"
I also occasionally make my own ebuilds or use some from bugs.gentoo.org. Those go in /usr/local/portage.