selfjungle Just another WordPress weblog

28Feb/150

gentoo gcc optimalization – make.conf

edit you /etc/portage/make.conf

# chost [4] 
# 64bit intel processors are AMD64 or x86_64, IA64 is for ithanium
CHOST="x86_64-gentoo-linux-gnu"

# CPU arch
# use gcc to detech your arch: gcc -c -Q -march=native --help=target | grep march
CFLAGS="-march=broadwell -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

# emerge -1v app-portage/cpuinfo2cpuflags
# cpuinfo2cpuflags
CPU_FLAGS_X86="mmx mmxext sse sse2 sse3"
USE="${CPU_FLAGS_X86} ..."

# N = #CPUs + 1 or just #CPUs, see link[3]
# interl 5y10 has 2 cores (x2 hyper threading):
MAKEOPTS="-j4"
ABI_X86="64"

# debug symbols stripped
FEATURES="splitdebug"

#misc:

# accept all unstable packages too
ACCEPT_KEYWORDS="~amd64"
# accept all licenses
ACCEPT_LICENSE="*"
# x11-base/xorg-drivers
VIDEO_CARDS="intel i965"
INPUT_DEVICES="evdev keyboard mouse mutouch virtualbox synaptics"
# pick the highest if possible
PYTHON_TARGETS="pypy python3_4"
RUBY_TARGETS="ruby22"

[1] Gentoo wiki: http://wiki.gentoo.org/wiki/GCC_optimization
[2] Look up your CPU architecture https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options
[3]https://blogs.gentoo.org/ago/2013/01/14/makeopts-jcore-1-is-not-the-best-optimization
[4]http://wiki.gentoo.org/wiki/CHOST

Tagged as: Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

 

No trackbacks yet.