diff --git a/sys-config/ltoize/files/make.conf.lto b/sys-config/ltoize/files/make.conf.lto index b6cf5daf..6b32db8d 100644 --- a/sys-config/ltoize/files/make.conf.lto +++ b/sys-config/ltoize/files/make.conf.lto @@ -74,4 +74,4 @@ source make.conf.lto.defines #Thanks to issue #49, no action necessary for preventing stripping of static libraries -CFLAGS="-O3 ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${SEMINTERPOS} ${FLTO} -fuse-linker-plugin" +CFLAGS="-O3 ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${SEMINTERPOS} ${LTO}" diff --git a/sys-config/ltoize/files/make.conf.lto.defines b/sys-config/ltoize/files/make.conf.lto.defines index 654fef56..cd428f48 100644 --- a/sys-config/ltoize/files/make.conf.lto.defines +++ b/sys-config/ltoize/files/make.conf.lto.defines @@ -20,7 +20,9 @@ #FLTO is of the form -flto[=n] where n is the number of threads to use during linking. #It's usually a good idea to set this to the number of hardware threads in your system -FLTO="-flto=${NTHREADS}" + +LTO="-flto=${NTHREADS} -fuse-linker-plugin" +FLTO="${LTO}" #GRAPHITE contains Graphite specific optimizations and other optimizations that are disabled at O3 #but don't influence the compiler's judgement. diff --git a/sys-config/ltoize/files/package.cflags/ltoworkarounds.conf b/sys-config/ltoize/files/package.cflags/ltoworkarounds.conf index 6821715f..573274d1 100644 --- a/sys-config/ltoize/files/package.cflags/ltoworkarounds.conf +++ b/sys-config/ltoize/files/package.cflags/ltoworkarounds.conf @@ -52,7 +52,7 @@ games-emulation/mupen64plus-libretro *FLAGS-=-flto* net-p2p/cpuminer-opt *FLAGS-=-flto* x11-drivers/xf86-video-intel *FLAGS-=-flto* =dev-lang/php-7.2.0 *FLAGS-=-flto* # lto-wrapper link failure / https://github.com/InBetweenNames/gentooLTO/issues/135 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-fs/fuse-common *FLAGS-=-flto* -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/glibc *FLAGS-=-flto* #Alternative: *FLAGS+=-ffat-lto-objects *FLAGS-="-fipa-pta" 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. app-emulation/wine* *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.) 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 @@ -196,19 +196,19 @@ dev-libs/openssl LTO_ENABLE_FLAGOMATIC=yes #>=sys-devel/gcc-9 *FLAGS-=-flto* BOOT_CFLAGS='"${CFLAGS}"' # BEGIN: -fipa-pta workarounds -www-client/firefox *FLAGS-="${IPAPTA}" #ICE on -fipa-pta -www-client/torbrowser *FLAGS-="${IPAPTA}" #ICE on -fipa-pta -=sys-apps/gawk-4.1.4 *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault -dev-qt/qtwebkit *FLAGS-="${IPAPTA}" -dev-lang/R *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault -sys-devel/gcc *FLAGS-="${IPAPTA}" -dev-lang/gnat-gpl *FLAGS-="${IPAPTA}" -dev-lang/php *FLAGS-="${IPAPTA}" # Segfaults when compiled with -fipa-pta -dev-lisp/sbcl *FLAGS-="${IPAPTA}" #ICE on -fipa-pta -x11-wm/bspwm *FLAGS-="${IPAPTA}" # needed for version 0.9.7 on 17.0 profile running the testing branch everywhere with GCC 8.3.0 -media-libs/libwebp *FLAGS-="${IPAPTA}" # no compilation issues, but -fipa-pta causes webp images to be displayed incorrectly -dev-qt/qtgui *FLAGS-="${IPAPTA}" # Same problem as above -dev-db/mongodb *FLAGS-="${IPAPTA}" # ICE with -fipa-pta +www-client/firefox *FLAGS-="-fipa-pta" #ICE on -fipa-pta +www-client/torbrowser *FLAGS-="-fipa-pta" #ICE on -fipa-pta +=sys-apps/gawk-4.1.4 *FLAGS-="-fipa-pta" # during IPA pass: pta lto1: internal compiler error: Segmentation fault +dev-qt/qtwebkit *FLAGS-="-fipa-pta" +dev-lang/R *FLAGS-="-fipa-pta" # during IPA pass: pta lto1: internal compiler error: Segmentation fault +sys-devel/gcc *FLAGS-="-fipa-pta" +dev-lang/gnat-gpl *FLAGS-="-fipa-pta" +dev-lang/php *FLAGS-="-fipa-pta" # Segfaults when compiled with -fipa-pta +dev-lisp/sbcl *FLAGS-="-fipa-pta" #ICE on -fipa-pta +x11-wm/bspwm *FLAGS-="-fipa-pta" # needed for version 0.9.7 on 17.0 profile running the testing branch everywhere with GCC 8.3.0 +media-libs/libwebp *FLAGS-="-fipa-pta" # no compilation issues, but -fipa-pta causes webp images to be displayed incorrectly +dev-qt/qtgui *FLAGS-="-fipa-pta" # Same problem as above +dev-db/mongodb *FLAGS-="-fipa-pta" # ICE with -fipa-pta # END: -fipa-pta workarounds # BEGIN: TLS dialect workarounds @@ -225,11 +225,12 @@ sys-boot/systemd-boot *FLAGS-="-mtls-dialect=gnu2" # END: TLS dialect workarounds # BEGIN: Semantic Interposition workarounds -app-misc/tracker *FLAGS-="${SEMINTERPOS}" # builds but makes gnome-base/nautilus deadlock -net-fs/autofs *FLAGS-="${SEMINTERPOS}" # builds but segfault in lookup_file.so -net-print/cups *FLAGS-="${SEMINTERPOS}" # ICE -sys-devel/llvm *FLAGS-="${SEMINTERPOS}" -sys-libs/glibc *FLAGS-="${SEMINTERPOS}" +app-misc/tracker *FLAGS-="-fno-semantic-interposition" # builds but makes gnome-base/nautilus deadlock +net-fs/autofs *FLAGS-="-fno-semantic-interposition" # builds but segfault in lookup_file.so +net-print/cups *FLAGS-="-fno-semantic-interposition" # ICE +sys-devel/llvm *FLAGS-="-fno-semantic-interposition" +sys-libs/glibc *FLAGS-="-fno-semantic-interposition" +app-office/libreoffice *FLAGS-="-fno-semantic-interposition" #382 # END: Semantic Interposition Workarounds # BEGIN: No PLT workarounds @@ -254,99 +255,103 @@ net-misc/curl *FLAGS+="-fuse-ld=bfd" >=sys-libs/libcap-2.28 *FLAGS+="-fuse-ld=bfd" # Issue #453 # END: GOLD linker workarounds +# BEGIN: GNU linker workarounds +<=media-gfx/blender-2.79b-r1 *FLAGS-="-fuse-ld=bfd" *FLAGS+="-fuse-ld=gold" #381 +# END: GNU linker workarounds + # BEGIN: -fno-common workarounds -app-accessibility/at-spi2-atk *FLAGS-="${NOCOMMON}" -app-admin/logrotate *FLAGS-="${NOCOMMON}" -app-admin/syslog-ng *FLAGS-="${NOCOMMON}" -app-arch/cpio *FLAGS-="${NOCOMMON}" -app-arch/file-roller *FLAGS-="${NOCOMMON}" -app-crypt/gnupg *FLAGS-="${NOCOMMON}" -app-crypt/p11-kit *FLAGS-="${NOCOMMON}" -app-crypt/staticgpg *FLAGS-="${NOCOMMON}" -app-editors/neovim *FLAGS-="${NOCOMMON}" -app-text/mupdf *FLAGS-="${NOCOMMON}" -app-text/texlive-core *FLAGS-="${NOCOMMON}" -app-text/ttf2pk2 *FLAGS-="${NOCOMMON}" -dev-db/redis *FLAGS-="${NOCOMMON}" -dev-java/icedtea *FLAGS-="${NOCOMMON}" -dev-lang/R *FLAGS-="${NOCOMMON}" -dev-lang/erlang *FLAGS-="${NOCOMMON}" -dev-lang/orc *FLAGS-="${NOCOMMON}" -dev-libs/bemenu *FLAGS-="${NOCOMMON}" -dev-libs/dbus-glib *FLAGS-="${NOCOMMON}" -dev-libs/ffcall *FLAGS-="${NOCOMMON}" -dev-libs/fribidi *FLAGS-="${NOCOMMON}" -dev-libs/gobject-introspection *FLAGS-="${NOCOMMON}" -dev-libs/libltdl *FLAGS-="${NOCOMMON}" # builds but causes symbol lookup errors -dev-libs/libmspack *FLAGS-="${NOCOMMON}" -dev-libs/libpipeline *FLAGS-="${NOCOMMON}" -dev-libs/libx86emu *FLAGS-="${NOCOMMON}" -dev-python/dbus-python *FLAGS-="${NOCOMMON}" -dev-python/nautilus-python *FLAGS-="${NOCOMMON}" -dev-util/android-tools *FLAGS-="${NOCOMMON}" -dev-util/pkgconf *FLAGS-="${NOCOMMON}" -gnome-base/gnome-control-center *FLAGS-="${NOCOMMON}" -gnome-base/librsvg *FLAGS-="${NOCOMMON}" -gui-apps/wl-clipboard *FLAGS-="${NOCOMMON}" -gui-libs/wlroots *FLAGS-="${NOCOMMON}" -gui-wm/sway *FLAGS-="${NOCOMMON}" -media-gfx/imagemagick *FLAGS-="${NOCOMMON}" -media-libs/freeglut *FLAGS-="${NOCOMMON}" -media-libs/gegl *FLAGS-="${NOCOMMON}" -media-libs/glu *FLAGS-="${NOCOMMON}" -media-libs/gstreamer *FLAGS-="${NOCOMMON}" -media-libs/libv4l *FLAGS-="${NOCOMMON}" -media-libs/mesa *FLAGS-="${NOCOMMON}" -media-libs/openal *FLAGS-="${NOCOMMON}" -media-sound/mpg123 *FLAGS-="${NOCOMMON}" -media-sound/musepack-tools *FLAGS-="${NOCOMMON}" -media-sound/sox *FLAGS-="${NOCOMMON}" -media-sound/wavpack *FLAGS-="${NOCOMMON}" -net-analyzer/iftop *FLAGS-="${NOCOMMON}" -net-analyzer/openvas-manager *FLAGS-="${NOCOMMON}" -net-fs/nfs-utils *FLAGS-="${NOCOMMON}" -net-libs/libmbim *FLAGS-="${NOCOMMON}" -net-libs/libqmi *FLAGS-="${NOCOMMON}" -net-libs/libtirpc *FLAGS-="${NOCOMMON}" -net-misc/curl *FLAGS-="${NOCOMMON}" -net-misc/dhcp *FLAGS-="${NOCOMMON}" -net-misc/iputils *FLAGS-="${NOCOMMON}" -net-misc/modemmanager *FLAGS-="${NOCOMMON}" -net-misc/networkmanager *FLAGS-="${NOCOMMON}" -net-misc/ntpsec *FLAGS-="${NOCOMMON}" -net-misc/socat *FLAGS-="${NOCOMMON}" -net-misc/vinagre *FLAGS-="${NOCOMMON}" -net-print/cups-filters *FLAGS-="${NOCOMMON}" -sys-apps/dtc *FLAGS-="${NOCOMMON}" -sys-apps/iproute2 *FLAGS-="${NOCOMMON}" -sys-apps/kbd *FLAGS-="${NOCOMMON}" -sys-apps/memtester *FLAGS-="${NOCOMMON}" -sys-apps/the_silver_searcher *FLAGS-="${NOCOMMON}" -sys-apps/usbredir *FLAGS-="${NOCOMMON}" -sys-boot/syslinux *FLAGS-="${NOCOMMON}" -sys-devel/bmake *FLAGS-="${NOCOMMON}" -sys-devel/distcc *FLAGS-="${NOCOMMON}" -sys-fs/squashfs-tools *FLAGS-="${NOCOMMON}" ->=sys-fs/xfsprogs-5.2.0 *FLAGS-="${NOCOMMON}" -sys-libs/gdbm *FLAGS-="${NOCOMMON}" -sys-libs/gpm *FLAGS-="${NOCOMMON}" -sys-libs/libunwind *FLAGS-="${NOCOMMON}" -sys-power/cpupower *FLAGS-="${NOCOMMON}" -sys-power/iasl *FLAGS-="${NOCOMMON}" -sys-power/upower *FLAGS-="${NOCOMMON}" -sys-process/audit *FLAGS-="${NOCOMMON}" -sys-process/htop *FLAGS-="${NOCOMMON}" -x11-base/xorg-server *FLAGS-="${NOCOMMON}" -x11-drivers/xf86-video-amdgpu *FLAGS-="${NOCOMMON}" -x11-drivers/xf86-video-ati *FLAGS-="${NOCOMMON}" -x11-drivers/xf86-video-intel *FLAGS-="${NOCOMMON}" -=sys-fs/xfsprogs-5.2.0 *FLAGS-="-fno-common" +sys-libs/gdbm *FLAGS-="-fno-common" +sys-libs/gpm *FLAGS-="-fno-common" +sys-libs/libunwind *FLAGS-="-fno-common" +sys-power/cpupower *FLAGS-="-fno-common" +sys-power/iasl *FLAGS-="-fno-common" +sys-power/upower *FLAGS-="-fno-common" +sys-process/audit *FLAGS-="-fno-common" +sys-process/htop *FLAGS-="-fno-common" +x11-base/xorg-server *FLAGS-="-fno-common" +x11-drivers/xf86-video-amdgpu *FLAGS-="-fno-common" +x11-drivers/xf86-video-ati *FLAGS-="-fno-common" +x11-drivers/xf86-video-intel *FLAGS-="-fno-common" +