# BEGIN: lto # Packages which cannot be built with LTO at all app-admin/keepassxc *FLAGS-=-flto* # segfaults on start since Qt 5.15.1 app-emulation/dosemu *FLAGS-=-flto* # Issue #163 app-emulation/libguestfs *FLAGS-=-flto* app-emulation/libpod *FLAGS-=-flto* app-emulation/qemu *FLAGS-=-flto* *FLAGS+=-fno-strict-aliasing # required to compile qemu app-emulation/virtualbox-extpack-oracle *FLAGS-=-flto* app-emulation/virtualbox *FLAGS-=-flto* app-emulation/wine* *FLAGS-=-flto* app-office/gnucash *FLAGS-=-flto* # error: type ‘struct _iterate’ violates the C++ One Definition Rule [-Werror=odr] app-office/libreoffice "has firebird ${IUSE//+} && use firebird && FlagSubAllFlags -flto*" app-office/scribus *FLAGS-=-flto* # Scribus crashes on startup if compiled with LTO =dev-lang/php-7.2.0 *FLAGS-=-flto* # lto-wrapper link failure / https://github.com/InBetweenNames/gentooLTO/issues/135 dev-lang/rust *FLAGS-=-flto* dev-lang/spidermonkey *FLAGS-=-flto* dev-libs/elfutils *FLAGS-=-flto* dev-libs/intel-neo *FLAGS-=-flto* # error: violates the C++ One Definition Rule [-Werror=odr] dev-libs/libbpf *FLAGS-=-flto* # lto-wrapper link failure dev-libs/libsigsegv *FLAGS-=-flto* # Issue #189 dev-libs/weston *FLAGS-=-flto* dev-python/libvirt-python *FLAGS-=-flto* # ICE with GCC 10.2.0 dev-qt/qtwebkit *FLAGS-=-flto* dev-scheme/guile *FLAGS-=-flto* # Issue #193 dev-scheme/racket *FLAGS-=-flto* *FLAGS-="${IPAPTA}" # Undefined references and multiple segfaults / violations during build. dev-tex/chktex "use pcre && FlagSubAllFlags -flto*" # Segmentation faults as libpcre doesn't get linked-in properly dev-util/github-cli *FLAGS-=-flto* dev-util/perf *FLAGS-=-flto* dev-util/radare2 *FLAGS-=-flto* # ICE in IPA pass dev-util/valgrind *FLAGS-=-flto* dev-vcs/cvs *FLAGS-=-flto* # Undefined references games-action/extreme-tuxracer *FLAGS-=-flto* games-emulation/mupen64plus-libretro *FLAGS-=-flto* games-emulation/parallel-n64-libretro *FLAGS-=-flto* gnome-base/gnome-keyring *FLAGS-=-flto* gnustep-base/gnustep-make *FLAGS-=-flto* # Issue #581, tools to build gnustep-base/gnustep-base, if built with LTO doesn't build gnustep code kde-apps/kdenlive *FLAGS-=-flto* kde-frameworks/kjs *FLAGS-=-flto* # Issue #181 mail-filter/procmail *FLAGS-=-flto* # Causes compile to hang indefinitely media-gfx/shotwell *FLAGS-=-flto* #Library search error with LTO enabled media-libs/alsa-lib *FLAGS-=-flto* media-libs/dav1d *FLAGS-=-flto* # Starting with GCC 11.1.0, various undefined reference errors during linking media-libs/mlt *FLAGS-=-flto* media-sound/pulseaudio *FLAGS-=-flto* media-video/ffmpeg *FLAGS-=-flto* #NOTE: Depending on your CPUFLAGS this may work with LTO. The SSE intrinsics seem to cause problems in some cases. Only x86 requires workaround media-video/mplayer *FLAGS-=-flto* net-analyzer/wireshark *FLAGS-=-flto* # Segfaults trying to load GUI on QT5, see issue 746 net-libs/nodejs *FLAGS-=-flto* # LTO is controlled by a USE flag; currently won't build with LTO and GCC 11 net-libs/webkit-gtk:3 *FLAGS-=-flto* net-libs/webkit-gtk:4 *FLAGS-=-flto* net-misc/autossh *FLAGS-=-flto* # Undefined references net-misc/dhcp "has server ${IUSE//+} && use server && FlagSubAllFlags -flto*" # Cannot be built with LTO by default, but can if "server" USE is disabled net-misc/lksctp-tools *FLAGS-=-flto* # function `main': :(.text.startup+0x16de): undefined reference to `sctp_connectx' net-misc/nextcloud-client *FLAGS-="-flto"* # Segfaults at start with libQt5Core.so net-misc/nx *FLAGS-=-flto* # ODR violation during compilation net-news/newsboat *FLAGS-=-flto* # Fails to build with LTO net-p2p/cpuminer-opt *FLAGS-=-flto* net-p2p/retroshare *FLAGS-=-flto* # Issue #129, ICE on amd64 net-wireless/aircrack-ng *FLAGS-=-flto* sci-electronics/kicad *FLAGS-=-flto* # Issue #168 sci-libs/arrayfire *FLAGS-=-flto* sci-libs/scipy *FLAGS-=-flto* sys-apps/acl *FLAGS-=-flto* # Issue #209, builds fine but we cannot set any acl value using the program. sys-apps/fakechroot *FLAGS-=-flto* # "Cgraph edge statement index out of range" error when linking with LTO enabled sys-apps/fwupd *FLAGS-=-flto* # Issue #225, LTO causes runtime failures sys-apps/man-db *FLAGS-=-flto* # Issue #403, LTO causes runtime failures sys-apps/nix *FLAGS-=-flto* # Issue #222, LTO causes runtime failures sys-cluster/ceph *FLAGS-=-flto* # linking error during compilation sys-cluster/glusterfs *FLAGS-=-flto* # undefined reference to `glfs_subvol_done' sys-devel/clang *FLAGS-=-flto* # Issue #619 Same as above sys-devel/gdb *FLAGS-=-flto* sys-devel/llvm *FLAGS-=-flto* # Issue #619 temporarily disabled for now due to build errors sys-fabric/libibverbs *FLAGS-=-flto* # Issue #506, Undefined references sys-fs/fuse-common *FLAGS-=-flto* sys-fs/fuse *FLAGS-=-flto* # Issue #139 and #142, it appears the symbol __fuse_read_cmd goes missing if LTO is enabled, causing linking problems on some systems. Using gold seems to help. sys-libs/glibc *FLAGS-=-flto* #Alternative: *FLAGS+=-ffat-lto-objects *FLAGS-="${IPAPTA}" Fails in configure stage with LTO enabled, checking for builtin redirect. With -ffat-lto-objects, and no -fipa-pta, we get further, but get multiple definition errors Forcing past that yields undefined symbol errors. sys-libs/libcxxabi *FLAGS-=-flto* # /var/tmp/portage/sys-libs/libcxxabi-4.0.1/temp/ccXYODmk.ltrans0.ltrans.o::DW.ref.__gcc_personality_v0: error: undefined reference to '__gcc_personality_v0' sys-libs/libomp *FLAGS-=-flto* # Issue #619 libomp-11.0.0_rc4 fails to build with LTO sys-libs/libselinux *FLAGS-=-flto* sys-libs/libsemanage *FLAGS-=-flto* sys-libs/libsepol *FLAGS-=-flto* sys-libs/musl *FLAGS-=-flto* sys-process/criu *FLAGS-=-pipe* *FLAGS-=-flto* *FLAGS-="-fuse-linker-plugin" LDFLAGS-="-Wl,--hash-style=gnu" *FLAGS-="${GRAPHITE}" # Fewer settings may be possible. Needs testing. (Dependency of LXC.) sys-process/numactl *FLAGS-=-flto* # Undefined references www-apps/hugo *FLAGS-=-flto* www-misc/shellinabox *FLAGS-=-flto* x11-base/xorg-server *FLAGS-=-flto* # linking error during compilation x11-drivers/xf86-video-intel *FLAGS-=-flto* # END: lto # BEGIN: ffat-lto-objects # Packages which require fat LTO objects in order to build (TESTING: STRIP_MASK) or which others depend on non-LTO symbols app-crypt/efitools *FLAGS+=-ffat-lto-objects # textrel? app-editors/vim "has perl ${IUSE//+} && use perl && FlagAddAllFlags -ffat-lto-objects" # required for perl USE flag dev-haskell/* *FLAGS+=-ffat-lto-objects #This is so non-portage GHC compilations work, as GHC is oblivious to LTO. portage builds are fine. dev-lang/moarvm *FLAGS+=-ffat-lto-objects # required for perl6 (i.e., dev-lang/nqp and dev-lang/rakudo to build) dev-util/cargo *FLAGS+=-ffat-lto-objects # fails to link against git2 functions without dev-util/cargo-c *FLAGS+=-ffat-lto-objects # fails to link against ssh functions without dev-util/sccache *FLAGS+=-ffat-lto-objects # fails to link media-libs/libvpx *FLAGS+=-ffat-lto-objects # Test failure net-libs/quiche *FLAGS+=-ffat-lto-objects # relocation R_X86_64_PC32 against undefined hidden symbol `GFp_ia32cap_P' can not be used when making a shared object sci-libs/mpir *FLAGS+=-ffat-lto-objects # compilation error without fat LTO (not linking error) sys-apps/bat *FLAGS+=-ffat-lto-objects # fails to link against git2 functions sys-apps/exa *FLAGS+=-ffat-lto-objects # fails to link against git2 functions sys-boot/syslinux *FLAGS+=-ffat-lto-objects #Requires ld.bfd sys-libs/libosinfo *FLAGS+=-ffat-lto-objects # Causes virt-manager to segfault when opening VM window. May be related to GCC 11. Seen with 1.9.0 sys-power/nut *FLAGS+=-ffat-lto-objects # fails during configure otherwise x11-terms/alacritty *FLAGS+=-ffat-lto-objects # END: ffat-lto-objects # BEGIN: -flto-partition=none workarounds =sys-libs/efivar-37 *FLAGS+="-flto-partition=none" # END: -flto-partition=none workarounds # BEGIN: LTO not recommended # Packages which can be built with LTO but leads to problems/crashes/segfaults app-cdr/cdrtools *FLAGS-=-flto* # SCSI buffer size 0 when attempting to burn disc, reports "Unknown error 64512" app-crypt/gcr *FLAGS-=-flto* # Test failure dev-lang/ruby *FLAGS-=-flto* # Test failure dev-libs/folks *FLAGS-=-flto* # Programs which depend on folks fail to launch, https://gitlab.gnome.org/GNOME/folks/-/issues/123 >=dev-libs/gjs-1.66.1 *FLAGS-=-flto* # generates general protection fault when starting up gnome dev-libs/libaio *FLAGS-=-flto* # Issue #314, missing symbols in LTO build compared to non-LTO build, leads to problems with sys-fs/lvm2 dev-libs/libbsd *FLAGS-=-flto* # Undefined symbol error when building mail-client/mailx dev-libs/libpcre *FLAGS-=-flto* # Test failure dev-libs/protobuf *FLAGS-=-flto* #Upstream bug https://github.com/protocolbuffers/protobuf/issues/4958 dev-libs/rocr-runtime *FLAGS-=-flto* # Causes crashes in multiple OpenCL tools dev-qt/qtscript *FLAGS-=-flto* #LTO patch exists, but crashes on newer Qt versions. Needs to be updated. dev-scheme/gambit *FLAGS-=-flto* # Runtime errors when gsc when built with LTO on > GCC 8 media-libs/mesa "has video_cards_i965 ${IUSE//+} && use video_cards_i965 && FlagSubAllFlags -flto*" media-sound/jack2 *FLAGS-=-flto* # segfault in libjack.so.0.1.0 when ANY app trying to use it (breaks everithing built w/ JACK support) net-misc/networkmanager *FLAGS-=-flto* # Test failure net-misc/openssh *FLAGS-=-flto* # hangs on exit with lto net-news/rssguard *FLAGS-=-flto* # https://bugreports.qt.io/browse/QTBUG-41301 and https://github.com/martinrotter/rssguard/issues/156 net-proxy/privoxy *FLAGS-=-flto* #Issue #145, service will not start when built with LTO sci-libs/tensorflow *FLAGS-=-flto* # Issue #432 tensorflow-estimator fails with missing symbol __cpu_model sci-misc/boinc *FLAGS-=-flto* # buffer overflow when starting boinc_client sys-apps/apparmor *FLAGS-=-flto* # Issue #299, ODR violation, still builds and runs on some configurations >=sys-apps/attr-2.4.48 *FLAGS-=-flto* # Issue #268, causes segfaults all over the system sys-apps/sandbox *FLAGS-=-flto* # Issue #347, LTO breaks basic sandboxing functionality sys-fs/cryfs *FLAGS-=-flto* # Test failure sys-libs/libapparmor *FLAGS-=-flto* # Undefined symbol error when trying to compile sys-apps/apparmor sys-libs/libxcrypt *FLAGS-=-flto* # Undefined symbols in library files cause dependencies like net-misc/whois to fail to build app-misc/openrgb *FLAGS-=-flto* # Segmentation fault on launch # END: LTO not recommended # BEGIN: Build Workarounds # Packages which require build workarounds to be built with LTO that can be resolved directly in *FLAGS dev-lisp/clisp *FLAGS+=-falign-functions # Issue #128. Function alignment problem. kde-apps/dolphin *FLAGS-="-Wl,--as-needed" # ( https://github.com/InBetweenNames/gentooLTO/issues/50 ) media-libs/ilmbase *FLAGS+=-lrt # needed for linker to build media-libs/openexr with LTO media-video/aegisub NOLDADD=1 C*FLAGS-="-Wl,*" # does not build when -Wl linker flags are passed to the compiler through C*FLAGS net-mail/mailutils "has ldap ${IUSE//+} && use ldap && FlagAdd LDFLAGS -llber" #With LTO, this dependency must be linked in explicitly to resolve undefined reference errors "ber_memvfree" and so on sys-devel/gettext *FLAGS+=-lm # needed for linker to resolve libm's log10 -- only needed for LTO sys-libs/ncurses-compat *FLAGS-=-Wl,--as-needed *FLAGS+=-ldl # checking whether able to link to dl*() functions... configure: error: Cannot link test program for libdl (#111) sys-libs/ncurses *FLAGS-=-Wl,--as-needed *FLAGS+=-ldl # checking whether able to link to dl*() functions... configure: error: Cannot link test program for libdl (#111) sys-power/thermald *FLAGS+=-Wl,--no-fatal-warnings *FLAGS+=-Wno-error x11-libs/wxGTK NOLDADD=1 C*FLAGS-="-Wl,*" # Issue #40, does not build when -Wl linker flags are passed to the compiler through C*FLAGS # END: Build Workarounds # BEGIN: Misc Workarounds dev-lang/ruby *FLAGS+=-fno-strict-aliasing # No build or runtime failures, but recommended by the package to avoid incorrect optimizations sys-libs/compiler-rt-sanitizers *FLAGS+=-Wno-unused-command-line-argument # Test failure # END: Misc Workarounds