Skip to content

Instantly share code, notes, and snippets.

@codefionn
Last active March 19, 2020 08:34
Show Gist options
  • Save codefionn/5b3d81e7e5c6eee0d35739c32bfa315f to your computer and use it in GitHub Desktop.
Save codefionn/5b3d81e7e5c6eee0d35739c32bfa315f to your computer and use it in GitHub Desktop.
/etc/portage/package.env - clang-flto
CC="clang"
CXX="clang++"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
LDFLAGS="-Wl,-O2 -Wl,--as-needed"
CC="clang"
CXX="clang++"
CFLAGS="${CFLAGS} -flto=thin"
CXXFLAGS="${CXXFLAGS} -flto=thin"
LDFLAGS="-flto=thin -Wl,--as-needed -Wl,-O2"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"
CFLAGS="${CFLAGS} -ggdb"
CXXFLAGS="${CXXFLAGS} -ggdb"
FEATURES="${FEATURES} splitdebug compressdebug -nostrip installsources"
CC="gcc"
CXX="g++"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
LDFLAGS="-Wl,-O2 -Wl,--as-needed"
CC="gcc"
CXX="g++"
FEATURES="${FEATURES} -ccache"
# Better debugging
sys-libs/glibc strlen
media-libs/glfw debugsyms test
x11-libs/libdrm debugsyms
net-vpn/strongswan noccache
# Things that have to be tested
app-arch/tar test
app-arch/xz-utils test
app-arch/gzip test
media-libs/mesa test
# This file requires clang/clang++ flto as default
# These are edge cases where clang-flto fails, so gcc-flto,clang,gcc
# are used instead
# noccache
x11-misc/i3status noccache
# gmp doesn't work with flto
# testing gmp is always recommonded
dev-libs/gmp gcc test
# doesn't work with flto
sys-devel/binutils gcc
sys-libs/binutils-libs gcc-flto
dev-libs/elfutils gcc
sys-devel/llvm clang
sys-devel/gcc gcc
dev-lang/rust gcc
# fuse no flto because ntfs3g fails to compile ontop
# some necessary codepoints are deleted
sys-fs/fuse clang
media-libs/x264 clang
media-sound/pulseaudio gcc
x11-libs/cairo clang
app-text/texlive-core clang
x11-terms/alacritty gcc
# doesn't work with clang-flto
dev-libs/libdaemon gcc-flto
media-libs/libcddb gcc-flto
sys-devel/m4 gcc-flto
sys-apps/sysvinit gcc-flto
sci-libs/fftw gcc-flto
dev-libs/libgcrypt gcc-flto
sys-apps/kexec-tools gcc-flto
dev-libs/popt gcc-flto
media-libs/ladspa-sdk gcc-flto
sys-boot/efibootmgr gcc-flto
media-libs/libmp4v2 gcc-flto
sys-devel/gettext gcc-flto
net-dns/libidn2 gcc-flto
sys-libs/libunwind gcc-flto
net-print/cups gcc-flto
app-text/opensp gcc-flto
mail-mta/nullmailer gcc-flto
app-text/openjade gcc-flto
dev-qt/qtcore gcc-flto
x11-base/xorg-server gcc-flto
sys-cluster/openmpi gcc-flto
media-libs/libmpeg2 gcc-flto
media-video/ffmpeg gcc-flto
app-doc/doxygen gcc-flto
# polkit fails with clang
# that's why: https://bugzilla.mozilla.org/show_bug.cgi?id=1426865
dev-lang/spidermonkey gcc-flto
# don't install list:
# sys-power/suspend
# =openvpn-2.4.6 doesn't compile with clang-flto
CFLAGS="${CFLAGS} -fno-builtin-strlen"
CXXFLAGS="${CFLAGS} -fno-builtin-strlen"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment