Tuesday, August 23, 2011

my make.conf

After staying away from it for a few years, I've returned to using Gentoo Linux on my workstation & laptop, both of which I've been using daily for the last several months.  In case it helps someone, I'm going to post my make.conf here with comments.

#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"
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
CXXFLAGS="${CFLAGS}"
FFLAGS="${CFLAGS}"
FCFLAGS="${CFLAGS}"
i.e. use the same CFLAGS for C, C++, Fortran 77, and Fortran 90.
CHOST="x86_64-pc-linux-gnu"
Surprise!  I'm 64 bit.
ICCCFLAGS="-O2 -gcc"
ICCCXXFLAGS="${ICCCFLAGS}"
IFORTFLAGS="${ICCCFLAGS}"
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
USE="3dnow 3dnowext R Xaw3d apng bash-completion blas caps cdda cuda emacs
     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"
Most 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).
MAKEOPTS="-j5 -l5"
EMERGE_DEFAULT_OPTS="-j5 --load-average 5 --autounmask-write --with-bdeps y"
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.
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/"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
Mirrors and a sync server.  I used mirrorselect to pick mine.  I don't remember how.
FEATURES="ccache parallel-fetch"
CCACHE_SIZE="2G"
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!)
VIDEO_CARDS="nvidia nouveau"
ALSA_CARDS="hda-intel"
INPUT_DEVICES="evdev keyboard mouse"
Tells X packages & alsa what hardware I have.
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.conf
I 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.

Intro

So I've decided to start a tech blog, to fill with whatever insights, fixes, implementation details, or pictures of amusingly-subtitled tech pics that I decide to throw in here.

At the moment, I've got a little over a dozen years working in IT.  Even prior to getting work in the field, though, I was a geek.

I got my first computer, some TI with cartridges in the front, when I was 6.  You know, back when tape storage used cassette tapes.  Later I got involved in the local BBS community, and later still I was the one of the first folks in my high school to get on the internet.  I was the guy showing people how to troll on IRC.

Eventually I had to work for a living.  You can find my work exploits on LinkedIn here.

So, yeah.  That's me.

Now I've got enough of a pretext to actually post content.  Let's get to it, shall we?