Portage

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=2

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=3

Compilation Optimization Guide

Files and Directories