# Set to blank instead of inheriting from profile CFLAGS="" # Automatically optimize for my hardware. Doesn't get sse 4.1, though. GCC_4_3_CFLAGS="-march=native" #GCC_4_3_CFLAGS="-march=core2" GCC_3_CFLAGS="-march=nocona" # http://www.linuxhardware.org/article.php?story=07/11/15/2015212 # Linux Hardware: Will GCC do vectorization internally or is this # something the developer will have to code manually? # H. J.: “You only need to add -ftree-vectorize -msse4.1.” # Jan: “There is -ftree-vectorize for automatic vectorization and SSE # intrinsics for writing SSE code by hand. GCC_4_3_CFLAGS="${GCC_4_3_CFLAGS} -ftree-vectorize" # LH: Will there be a "penryn" -march option in GCC or will people need # to specify -msse4 manually? # H. J.: “There is no penryn -march switch since penryn isn't a product # name. You should use -msse4.1. BTW, -msse4 means -msse4.1 -msse4.2. # You should use -msse4.1 for Penryn class processors since they only # support SSE4.1.” GCC_4_3_CFLAGS="${GCC_4_3_CFLAGS} -msse4.1" # Perform tail duplication to enlarge superblock size. This # transformation simplifies the control flow of the function, allowing # other optimizations to do better job. CFLAGS="${CFLAGS} -ftracer" # Constructs webs as commonly used for register allocation purposes and # assign each web individual pseudo register. This allows the register # allocation pass to operate on pseudos directly, but also strengthens # several other optimization passes, such as CSE, loop optimizer and # trivial dead code remover. It can, however, make debugging # impossible, since variables will no longer stay in a "home register". #CFLAGS="${CFLAGS} -fweb" # Similar problem with debugging when using this #CFLAGS="${CFLAGS} -frename-registers" # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28684. Aids vectorization # of floating-point calculations, which almost always reorders them. # Could possibly break some code that can't handle reordering. Changed # to -freciprocal-math only because -fassociative-math requires other # flags that break IEEE. GCC_4_3_CFLAGS="${GCC_4_3_CFLAGS} -funsafe-math-optimizations" # Testing some more flags, mostly related to vectorization. # http://www.redhat.com/magazine/011sep05/features/gcc/ has some info # -ftree-loop-linear has caused ICE in ccp4 at least. # src/refmac5_/cell_symm_subrs.f GCC_4_3_CFLAGS="${GCC_4_3_CFLAGS} -fivopts -fmodulo-sched -minline-stringops-dynamically -ftree-loop-im -funswitch-loops -fvect-cost-model -fvariable-expansion-in-unroller" # Basic optimizations CFLAGS="${CFLAGS} -O2 -pipe -g -w" # Hardening #CFLAGS="${CFLAGS} -DFORTIFY_SOURCE=2 -fstack-protector" # Final setup CFLAGS="${CFLAGS} ${GCC_4_3_CFLAGS}" #CFLAGS="${CFLAGS} ${GCC_3_CFLAGS}" # Experimental parallel implementations of many algorithms # http://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode.html #GCC_4_3_CXXFLAGS="${GCC_4_3_CXXFLAGS} -D_GLIBCXX_PARALLEL -fopenmp" CXXFLAGS="${CFLAGS} ${GCC_4_3_CXXFLAGS}" FFLAGS="${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="x86_64-pc-linux-gnu" # Use short hash chains rather than small hash table size. # See http://lwn.net/Articles/192082/ # Only link in needed symbols. See http://www.gentoo.org/proj/en/qa/asneeded.xml LDFLAGS="-Wl,-O1 -Wl,--as-needed" # These are the USE flags that were used in addition to what is provided by the # profile used for building. USE="mmx sse sse2 ipw4965 webdav emacs bash-completion threads curl xft gzip-el sqlite -acl -nls avahi laptop sasl sidebar smtp smime gpgme imap offensive multiuser glep gd plugins network-cron glitz bzip2 zeroconf ppds glib xinerama autoipd galago fontconfig xosd hdaps aac ffmpeg -arts pulseaudio asyncns bluetooth usb mmap speex wavpack flac musepack libsamplerate sndfile fftw modplug justify xulrunner java mdnsresponder-compat lapack libnotify networkmanager pch djvu gs graphviz lzo guile a52 imlib ieee1394 xvid x264 theora network pda custom-cflags kdtree gphoto2 -scanner umfpack cblas ccache nsplugin xcb branding nautilus networking wifi adns snmp lm_sensors elf diskio smux sensord ruby deskbar gsf applet keyring disk-partition xine imagemagick mng real xvmc device-mapper syslog swat winbind async automount caps soup t1lib -dvi nfs fuse cdda chm ole wmf gedit epiphany daap ipod musicbrainz tagwriting v4l -beagle sound kde sqlite3 odbc xcomposite xscreensaver tunepimp captury zip vnc sms yahoo winpopup inotify hyperestraier gmp icu libwww -ldap -kerberos consolekit gconf qemu policykit kqemu smp exif gtkhtml -samba mysql postgres bcmath suhosin json mysqli fastbuild ftp gd-external pdo apache2 discard-path cgi force-cgi-redirect ctype sharedext posix tidy tokenizer xmlrpc soap sockets hash inifile flatfile simplexml sysvipc xmlreader xmlwriter xsl pcntl mhash filter iodbc -concurrentmodphp -sharedmem smi cpusets server sftp cvs subversion blas pymol pbs nodrm gnuplot pymacs wxwindows plotutils latex lynxkeymap cddb cdio cdparanoia color-console cpudetection dv live openal rtc radio ssse3 mmxext dc1394 rtsp id3tag shout stream taglib twolame upnp v4l2 pnm enca srt amrwb amrnb mp2 sdl-image vlm xanim threadsafe acct java6 log4j avalon-logkit -tracker audit client-only startup-notification mozdevelop postscript jabber inkjar dia gnome-print libssh2 ntp lzma gnome-keyring libburn totem kdrive webdav-serf -webdav-neon -ipv6 dynamic -dmx inquisitio glsa portage qa visibility pygrub screen hvm pae utils mpqc openbabel gamess -x86emu git gimp expat gcdmaster -gnutls ntfs reiserfs dbtool flash svgz moonlight apbs httpd shaders additions tetex science publishers jadetex graphics lyx kpathsea gsl pango xslt libvirt -gcj mopac7 fbcon -ads -libedit kvm dhcp tftp mono -mktemp ssh twisted swig -libffi kdeenablefinal" MAKEOPTS="--jobs --load-average=8 --silent" #MAKEOPTS="--jobs --load-average=8" ACCEPT_KEYWORDS="~amd64" #GENTOO_MIRRORS="http://supernova/" #CCACHE_DIR="/var/tmp/portage/.ccache" CCACHE_SIZE="4G" CLEAN_DELAY="2" FEATURES="-autoaddcvs cvs ccache fixpackages parallel-fetch splitdebug userfetch userpriv usersandbox" PORT_LOGDIR="/var/log/portage" PORTAGE_GPG_DIR="/home/donnie/.gnupg" PORTAGE_GPG_KEY="B4B5AEDB" FEATURES="${FEATURES} sign" INPUT_DEVICES="mouse keyboard" VIDEO_CARDS="i810 intel" PORTDIR_OVERLAY="/usr/local/portage/overlay" #PORTDIR_OVERLAY="/usr/local/portage/overlay /home/donnie/src/gentoo-x86" #SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" # Don't warn me every time I emerge stuff about eclasses in overlays PORTAGE_ECLASS_WARNING_ENABLE="0" LINGUAS="en en_US" EMERGE_DEFAULT_OPTS="--jobs 4 --load-average 8 --keep-going" source /usr/local/portage/layman/make.conf