From 66a281a742b717c82f87e0449ba50c979c2f6a76 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 26 Dec 2023 12:58:58 -0500 Subject: [PATCH 01/63] fix: addressing missing and renamed packages This removes workarounds for packages which are not present in the portage tree. It also updates the names of some packages which have been renamed. This is based on the upstream issue referenced below. Refs: https://github.com/InBetweenNames/gentooLTO/issues/859 Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/ipa-pta.conf | 3 --- .../ltoize/files/package.cflags/lto.conf | 21 ++----------------- .../package.cflags/no-common-libtool.conf | 3 --- .../files/package.cflags/optimizations.conf | 5 ++--- .../files/package.cflags/tls-dialect.conf | 1 - 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/ipa-pta.conf b/sys-config/ltoize/files/package.cflags/ipa-pta.conf index 19bf6bb3..2851da7e 100644 --- a/sys-config/ltoize/files/package.cflags/ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/ipa-pta.conf @@ -1,8 +1,5 @@ # 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/duktape *FLAGS-="${IPAPTA}" # fixes polkit from musl overlay not starting diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 10bdf0e0..0cdbcee1 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -3,7 +3,6 @@ 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* @@ -11,7 +10,6 @@ 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 -=sys-libs/efivar-38 *FLAGS-="-flto*" # Error when compiling with LTO per PR #823 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 @@ -100,7 +90,6 @@ 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 @@ -111,7 +100,6 @@ 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 @@ -125,10 +113,6 @@ 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" @@ -164,7 +148,6 @@ app-misc/openrgb *FLAGS-=-flto* # Segmentation fault on launch # 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 diff --git a/sys-config/ltoize/files/package.cflags/no-common-libtool.conf b/sys-config/ltoize/files/package.cflags/no-common-libtool.conf index 4753fd26..0713b9c2 100644 --- a/sys-config/ltoize/files/package.cflags/no-common-libtool.conf +++ b/sys-config/ltoize/files/package.cflags/no-common-libtool.conf @@ -14,11 +14,8 @@ dev-libs/libindicator NOCOMMON_OVERRIDE_LIBTOOL=yes dev-libs/libmspack NOCOMMON_OVERRIDE_LIBTOOL=yes dev-libs/libpipeline NOCOMMON_OVERRIDE_LIBTOOL=yes dev-python/dbus-python NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-python/notify-python NOCOMMON_OVERRIDE_LIBTOOL=yes dev-util/umockdev NOCOMMON_OVERRIDE_LIBTOOL=yes -gnome-base/gconf NOCOMMON_OVERRIDE_LIBTOOL=yes gnome-base/libglade NOCOMMON_OVERRIDE_LIBTOOL=yes -gnome-base/libgnome-keyring NOCOMMON_OVERRIDE_LIBTOOL=yes gnome-base/librsvg NOCOMMON_OVERRIDE_LIBTOOL=yes lxde-base/menu-cache NOCOMMON_OVERRIDE_LIBTOOL=yes media-gfx/imagemagick NOCOMMON_OVERRIDE_LIBTOOL=yes diff --git a/sys-config/ltoize/files/package.cflags/optimizations.conf b/sys-config/ltoize/files/package.cflags/optimizations.conf index 9eae09c4..9a77c7d4 100644 --- a/sys-config/ltoize/files/package.cflags/optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/optimizations.conf @@ -17,10 +17,8 @@ dev-python/numpy /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MAT dev-python/pillow *FLAGS+='-fno-finite-math-only' # compiles fine but causes `import matplotlib.pyplot` to fail with `undefined symbol: __log_finite` dev-qt/qtcore *FLAGS+='-fno-finite-math-only' # compiles fine but causes most forms of scrolling to stop working in okular dev-scheme/guile *FLAGS+='-fno-finite-math-only' # build fails with `floating point exception` -gui-apps/gammastep *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly kde-frameworks/kjs /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled -=sys-devel/llvm-10.0.0 *FLAGS+='-fno-finite-math-only' # compiles fine but causes clang to fail to emerge with ``undefined reference to `__log10_finite'`` >=sys-libs/glibc-2.30 /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled www-client/firefox /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # won't build with flags activated by -ffast-math on Clang, requires investigation +x11-misc/gammastep *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly x11-misc/redshift *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly # END: -Ofast workarounds diff --git a/sys-config/ltoize/files/package.cflags/tls-dialect.conf b/sys-config/ltoize/files/package.cflags/tls-dialect.conf index db2dd8a5..9b44e6fc 100644 --- a/sys-config/ltoize/files/package.cflags/tls-dialect.conf +++ b/sys-config/ltoize/files/package.cflags/tls-dialect.conf @@ -1,6 +1,5 @@ # BEGIN: TLS dialect workarounds www-client/firefox *FLAGS-="-mtls-dialect=gnu2" -www-client/torbrowser *FLAGS-="-mtls-dialect=gnu2" sys-fs/eudev *FLAGS-="-mtls-dialect=gnu2" sys-libs/glibc *FLAGS-="-mtls-dialect=gnu2" dev-lang/mono *FLAGS-="-mtls-dialect=gnu2" From 23cc0f536a9e79fdacbcef5de6543572696131d1 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 26 Dec 2023 13:08:51 -0500 Subject: [PATCH 02/63] fix: remove unnecessary workarounds from neeshy This removes the workarounds verified by neeshy to be unnecessary. See neeshy's comments reference in the below issue for more context. Refs: https://github.com/InBetweenNames/gentooLTO/issues/883 Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/ipa-pta.conf | 5 --- .../ltoize/files/package.cflags/lto.conf | 36 ------------------- .../package.cflags/no-common-libtool.conf | 13 ------- .../ltoize/files/package.cflags/no-plt.conf | 4 --- .../no-semantic-interposition.conf | 3 -- .../files/package.cflags/tls-dialect.conf | 1 - 6 files changed, 62 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/ipa-pta.conf b/sys-config/ltoize/files/package.cflags/ipa-pta.conf index 2851da7e..b88353d4 100644 --- a/sys-config/ltoize/files/package.cflags/ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/ipa-pta.conf @@ -1,11 +1,9 @@ # BEGIN: -fipa-pta workarounds -www-client/firefox *FLAGS-="${IPAPTA}" #ICE on -fipa-pta dev-lang/R *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault sys-devel/gcc *FLAGS-="${IPAPTA}" dev-lang/duktape *FLAGS-="${IPAPTA}" # fixes polkit from musl overlay not starting 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 @@ -14,13 +12,10 @@ dev-lang/ocaml *FLAGS-="${IPAPTA}" # ICE during IPA pass: pta in lto1: Segmentat app-emulation/libvirt *FLAGS-="${IPAPTA}" # Segmentation fault when starting libvirtd dev-python/libvirt-python *FLAGS-="${IPAPTA}" # Test failure dev-db/postgresql *FLAGS-="${IPAPTA}" # Test failure -dev-libs/protobuf *FLAGS-="${IPAPTA}" # Test failure media-video/ffmpeg *FLAGS-="${IPAPTA}" # Test failure -sys-devel/clang *FLAGS-="${IPAPTA}" # Test failure net-p2p/monero *FLAGS-="${IPAPTA}" # ICE with -fipa-pta mail-client/thunderbird *FLAGS-="${IPAPTA}" # ICE with GCC 10.2.0 (seen with thunderbird 68.12.0) >=dev-lang/spidermonkey-78.3.1 *FLAGS-="${IPAPTA}" # Segfault during build with GCC 10.2.0 >=media-libs/mesa-21.1.0 *FLAGS-="${IPAPTA}" # Segfault with vulkan x11-base/xwayland *FLAGS-="${IPAPTA}" # SIGABRT when querying for GLX information ->=dev-vcs/git-2.32.0 *FLAGS-="${IPAPTA}" # Segfault in git fetch with GCC < 11.3.0 # END: -fipa-pta workarounds diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 0cdbcee1..ff8c3ada 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -3,14 +3,12 @@ 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/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 -app-text/texlive-core *FLAGS-=-flto* app-text/yodl *FLAGS-=-flto* # Fixes build cross-arm-none-eabi/newlib *FLAGS-=-flto* # Causes 'arm-none-eabi-gcc' to segfault cross-i686-w64-mingw32/mingw64-runtime *FLAGS-=-flto* # linking errors @@ -24,21 +22,15 @@ dev-java/icedtea *FLAGS-=-flto* dev-lang/erlang *FLAGS-=-flto* # Starting with Erlang 24.0, yeccparser.erl: internal error in pass beam_kernel_to_ssa dev-lang/lua *FLAGS-=-flto* # Causes issues building packages like neovim and awesomewm, fixes #772 dev-lang/mono *FLAGS-=-flto* -dev-lang/perl *FLAGS-=-flto* >=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/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-scheme/guile *FLAGS-=-flto* # Issue #193 -dev-scheme/racket *FLAGS-=-flto* *FLAGS-="${IPAPTA}" # Undefined references and multiple segfaults / violations during build. 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* gnome-base/gnome-keyring *FLAGS-=-flto* @@ -47,14 +39,9 @@ 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 @@ -71,26 +58,16 @@ dev-python/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-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-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/efivar-38 *FLAGS-="-flto*" # Error when compiling with LTO per PR #823 -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* -x11-base/xorg-server *FLAGS-=-flto* # linking error during compilation x11-drivers/xf86-video-intel *FLAGS-=-flto* # END: lto @@ -102,7 +79,6 @@ dev-haskell/* *FLAGS+=-ffat-lto-objects #This is so non-portage GHC compilations dev-lang/moarvm *FLAGS+=-ffat-lto-objects # required for perl6 (i.e., dev-lang/nqp and dev-lang/rakudo to build) 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 @@ -120,27 +96,19 @@ 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 @@ -150,11 +118,7 @@ dev-lisp/clisp *FLAGS+=-falign-functions # Issue #128. Function alignment probl kde-apps/dolphin *FLAGS-="-Wl,--as-needed" # ( https://github.com/InBetweenNames/gentooLTO/issues/50 ) 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 diff --git a/sys-config/ltoize/files/package.cflags/no-common-libtool.conf b/sys-config/ltoize/files/package.cflags/no-common-libtool.conf index 0713b9c2..ada2e5d4 100644 --- a/sys-config/ltoize/files/package.cflags/no-common-libtool.conf +++ b/sys-config/ltoize/files/package.cflags/no-common-libtool.conf @@ -1,47 +1,34 @@ # BEGIN: -fno-common libtool hack workarounds (#484) app-crypt/libsecret NOCOMMON_OVERRIDE_LIBTOOL=yes -app-crypt/p11-kit NOCOMMON_OVERRIDE_LIBTOOL=yes app-text/enchant NOCOMMON_OVERRIDE_LIBTOOL=yes app-text/evince NOCOMMON_OVERRIDE_LIBTOOL=yes dev-libs/dbus-glib NOCOMMON_OVERRIDE_LIBTOOL=yes dev-libs/ffcall NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/fribidi NOCOMMON_OVERRIDE_LIBTOOL=yes dev-libs/jansson NOCOMMON_OVERRIDE_LIBTOOL=yes dev-libs/libappindicator NOCOMMON_OVERRIDE_LIBTOOL=yes dev-libs/libatasmart NOCOMMON_OVERRIDE_LIBTOOL=yes dev-libs/libdbusmenu NOCOMMON_OVERRIDE_LIBTOOL=yes dev-libs/libindicator NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libmspack NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libpipeline NOCOMMON_OVERRIDE_LIBTOOL=yes dev-python/dbus-python NOCOMMON_OVERRIDE_LIBTOOL=yes dev-util/umockdev NOCOMMON_OVERRIDE_LIBTOOL=yes gnome-base/libglade NOCOMMON_OVERRIDE_LIBTOOL=yes -gnome-base/librsvg NOCOMMON_OVERRIDE_LIBTOOL=yes lxde-base/menu-cache NOCOMMON_OVERRIDE_LIBTOOL=yes -media-gfx/imagemagick NOCOMMON_OVERRIDE_LIBTOOL=yes media-gfx/ttfautohint NOCOMMON_OVERRIDE_LIBTOOL=yes -media-libs/glu NOCOMMON_OVERRIDE_LIBTOOL=yes media-libs/libdvdnav NOCOMMON_OVERRIDE_LIBTOOL=yes media-libs/libdvdread NOCOMMON_OVERRIDE_LIBTOOL=yes media-plugins/gst-plugins-libav NOCOMMON_OVERRIDE_LIBTOOL=yes media-plugins/gst-plugins-vaapi NOCOMMON_OVERRIDE_LIBTOOL=yes -media-sound/mpg123 NOCOMMON_OVERRIDE_LIBTOOL=yes media-sound/sox NOCOMMON_OVERRIDE_LIBTOOL=yes media-sound/wavpack NOCOMMON_OVERRIDE_LIBTOOL=yes media-video/vlc NOCOMMON_OVERRIDE_LIBTOOL=yes net-libs/libmbim NOCOMMON_OVERRIDE_LIBTOOL=yes -net-misc/curl NOCOMMON_OVERRIDE_LIBTOOL=yes net-misc/modemmanager NOCOMMON_OVERRIDE_LIBTOOL=yes sys-apps/accountsservice NOCOMMON_OVERRIDE_LIBTOOL=yes sys-apps/usbredir NOCOMMON_OVERRIDE_LIBTOOL=yes sys-auth/polkit NOCOMMON_OVERRIDE_LIBTOOL=yes sys-boot/plymouth NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-devel/gettext NOCOMMON_OVERRIDE_LIBTOOL=yes sys-fs/udisks NOCOMMON_OVERRIDE_LIBTOOL=yes sys-power/upower NOCOMMON_OVERRIDE_LIBTOOL=yes x11-libs/libfm NOCOMMON_OVERRIDE_LIBTOOL=yes x11-libs/libfm-extra NOCOMMON_OVERRIDE_LIBTOOL=yes -x11-libs/pango NOCOMMON_OVERRIDE_LIBTOOL=yes -x11-libs/xcb-util-cursor NOCOMMON_OVERRIDE_LIBTOOL=yes -x11-libs/xcb-util-xrm NOCOMMON_OVERRIDE_LIBTOOL=yes # END: -fno-common libtool hack workarounds (#484) NOCOMMON_OVERRIDE_LIBTOOL=yes diff --git a/sys-config/ltoize/files/package.cflags/no-plt.conf b/sys-config/ltoize/files/package.cflags/no-plt.conf index d31caee5..20ffbd45 100644 --- a/sys-config/ltoize/files/package.cflags/no-plt.conf +++ b/sys-config/ltoize/files/package.cflags/no-plt.conf @@ -2,9 +2,5 @@ app-emulation/wine-staging *FLAGS-="-fno-plt" app-emulation/wine-vanilla *FLAGS-="-fno-plt" dev-db/mysql-connector-c *FLAGS-="-fno-plt" # SIGABRT during compile if not used -dev-libs/nss *FLAGS-="-fno-plt" -media-video/ffmpeg *FLAGS-="-fno-plt" -sys-libs/glibc *FLAGS-="-fno-plt" #When using prelink, will cause a bunch of segfaults. sys-libs/compiler-rt-sanitizers *FLAGS-="-fno-plt" -x11-base/xorg-server *FLAGS-="-fno-plt" # Undefined symbol in i956 driver # END: No PLT workarounds diff --git a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf index 7904603f..0b106713 100644 --- a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf +++ b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf @@ -6,11 +6,8 @@ dev-lang/jimtcl *FLAGS-="${SEMINTERPOS}" # buffer overflow error when running an dev-lang/swi-prolog *FLAGS-="${SEMINTERPOS}" # segfaults during build dev-util/umockdev *FLAGS-="${SEMINTERPOS}" # /usr/include/bits/unistd.h:145:1: error: inlining failed in call to 'always_inline' 'readlink.localalias': function not inlinable media-sound/ardour *FLAGS-="${SEMINTERPOS}" # ICE in record_target_from_binfo during GIMPLE pass -media-video/ffmpeg *FLAGS-="${SEMINTERPOS}" # doesn't build, function inlining fails net-fs/autofs *FLAGS-="${SEMINTERPOS}" # builds but segfault in lookup_file.so net-libs/libiscsi *FLAGS-="${SEMINTERPOS}" -net-print/cups *FLAGS-="${SEMINTERPOS}" # ICE sys-devel/llvm *FLAGS-="${SEMINTERPOS}" sys-libs/glibc *FLAGS-="${SEMINTERPOS}" -sys-libs/readline *FLAGS-="${SEMINTERPOS}" # breaks ncurses for some users, #681 #392 # END: Semantic Interposition Workarounds diff --git a/sys-config/ltoize/files/package.cflags/tls-dialect.conf b/sys-config/ltoize/files/package.cflags/tls-dialect.conf index 9b44e6fc..39383259 100644 --- a/sys-config/ltoize/files/package.cflags/tls-dialect.conf +++ b/sys-config/ltoize/files/package.cflags/tls-dialect.conf @@ -3,7 +3,6 @@ www-client/firefox *FLAGS-="-mtls-dialect=gnu2" sys-fs/eudev *FLAGS-="-mtls-dialect=gnu2" sys-libs/glibc *FLAGS-="-mtls-dialect=gnu2" dev-lang/mono *FLAGS-="-mtls-dialect=gnu2" -dev-lang/python *FLAGS-="-mtls-dialect=gnu2" dev-util/lldb *FLAGS-="-mtls-dialect=gnu2" dev-db/firebird *FLAGS-="-mtls-dialect=gnu2" dev-lang/spidermonkey *FLAGS-="-mtls-dialect=gnu2" From 10cb60e025e798cbd77cb3e3bc82004706facb19 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 26 Dec 2023 13:16:53 -0500 Subject: [PATCH 03/63] feat: prefix all workarounds with untested The GentooLTO project has not gone through the effort of testing all of the workarounds it's accumulated over the years. This commit renames all of the .cflags files to be prefixed with untested- so that users know that they are not tested and may not be needed. It also adds a new version of the ltoize rebuild (0.10.0) that uses the new files. Signed-off-by: Jaremy Hatler --- .../{clang.conf => untested-clang.conf} | 0 ...file.conf => untested-cmake-makefile.conf} | 0 ...f => untested-devirtualize-at-ltrans.conf} | 0 ...-matic.conf => untested-flag-o-matic.conf} | 0 .../{graphite.conf => untested-graphite.conf} | 0 .../{ipa-pta.conf => untested-ipa-pta.conf} | 0 .../{lto.conf => untested-lto.conf} | 0 ...l.conf => untested-no-common-libtool.conf} | 0 ...no-common.conf => untested-no-common.conf} | 0 .../{no-plt.conf => untested-no-plt.conf} | 0 ...> untested-no-semantic-interposition.conf} | 0 ...tions.conf => untested-optimizations.conf} | 0 ...v.conf => untested-portage-bashrc-mv.conf} | 0 ...dialect.conf => untested-tls-dialect.conf} | 0 .../{use-ld.conf => untested-use-ld.conf} | 0 sys-config/ltoize/ltoize-0.10.0.ebuild | 135 ++++++++++++++++++ 16 files changed, 135 insertions(+) rename sys-config/ltoize/files/package.cflags/{clang.conf => untested-clang.conf} (100%) rename sys-config/ltoize/files/package.cflags/{cmake-makefile.conf => untested-cmake-makefile.conf} (100%) rename sys-config/ltoize/files/package.cflags/{devirtualize-at-ltrans.conf => untested-devirtualize-at-ltrans.conf} (100%) rename sys-config/ltoize/files/package.cflags/{flag-o-matic.conf => untested-flag-o-matic.conf} (100%) rename sys-config/ltoize/files/package.cflags/{graphite.conf => untested-graphite.conf} (100%) rename sys-config/ltoize/files/package.cflags/{ipa-pta.conf => untested-ipa-pta.conf} (100%) rename sys-config/ltoize/files/package.cflags/{lto.conf => untested-lto.conf} (100%) rename sys-config/ltoize/files/package.cflags/{no-common-libtool.conf => untested-no-common-libtool.conf} (100%) rename sys-config/ltoize/files/package.cflags/{no-common.conf => untested-no-common.conf} (100%) rename sys-config/ltoize/files/package.cflags/{no-plt.conf => untested-no-plt.conf} (100%) rename sys-config/ltoize/files/package.cflags/{no-semantic-interposition.conf => untested-no-semantic-interposition.conf} (100%) rename sys-config/ltoize/files/package.cflags/{optimizations.conf => untested-optimizations.conf} (100%) rename sys-config/ltoize/files/package.cflags/{portage-bashrc-mv.conf => untested-portage-bashrc-mv.conf} (100%) rename sys-config/ltoize/files/package.cflags/{tls-dialect.conf => untested-tls-dialect.conf} (100%) rename sys-config/ltoize/files/package.cflags/{use-ld.conf => untested-use-ld.conf} (100%) create mode 100644 sys-config/ltoize/ltoize-0.10.0.ebuild diff --git a/sys-config/ltoize/files/package.cflags/clang.conf b/sys-config/ltoize/files/package.cflags/untested-clang.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/clang.conf rename to sys-config/ltoize/files/package.cflags/untested-clang.conf diff --git a/sys-config/ltoize/files/package.cflags/cmake-makefile.conf b/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/cmake-makefile.conf rename to sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf diff --git a/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf b/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf rename to sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf diff --git a/sys-config/ltoize/files/package.cflags/flag-o-matic.conf b/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/flag-o-matic.conf rename to sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf diff --git a/sys-config/ltoize/files/package.cflags/graphite.conf b/sys-config/ltoize/files/package.cflags/untested-graphite.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/graphite.conf rename to sys-config/ltoize/files/package.cflags/untested-graphite.conf diff --git a/sys-config/ltoize/files/package.cflags/ipa-pta.conf b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/ipa-pta.conf rename to sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/lto.conf rename to sys-config/ltoize/files/package.cflags/untested-lto.conf diff --git a/sys-config/ltoize/files/package.cflags/no-common-libtool.conf b/sys-config/ltoize/files/package.cflags/untested-no-common-libtool.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/no-common-libtool.conf rename to sys-config/ltoize/files/package.cflags/untested-no-common-libtool.conf diff --git a/sys-config/ltoize/files/package.cflags/no-common.conf b/sys-config/ltoize/files/package.cflags/untested-no-common.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/no-common.conf rename to sys-config/ltoize/files/package.cflags/untested-no-common.conf diff --git a/sys-config/ltoize/files/package.cflags/no-plt.conf b/sys-config/ltoize/files/package.cflags/untested-no-plt.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/no-plt.conf rename to sys-config/ltoize/files/package.cflags/untested-no-plt.conf diff --git a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf rename to sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf diff --git a/sys-config/ltoize/files/package.cflags/optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/optimizations.conf rename to sys-config/ltoize/files/package.cflags/untested-optimizations.conf diff --git a/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf b/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf rename to sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf diff --git a/sys-config/ltoize/files/package.cflags/tls-dialect.conf b/sys-config/ltoize/files/package.cflags/untested-tls-dialect.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/tls-dialect.conf rename to sys-config/ltoize/files/package.cflags/untested-tls-dialect.conf diff --git a/sys-config/ltoize/files/package.cflags/use-ld.conf b/sys-config/ltoize/files/package.cflags/untested-use-ld.conf similarity index 100% rename from sys-config/ltoize/files/package.cflags/use-ld.conf rename to sys-config/ltoize/files/package.cflags/untested-use-ld.conf diff --git a/sys-config/ltoize/ltoize-0.10.0.ebuild b/sys-config/ltoize/ltoize-0.10.0.ebuild new file mode 100644 index 00000000..e10dbf78 --- /dev/null +++ b/sys-config/ltoize/ltoize-0.10.0.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="A configuration for portage to make building with LTO easy" +HOMEPAGE="https://github.com/jhatler/gentooLTO" + +#Note: there's nothing preventing this from working on stable, but the dependencies of ltoize aren't keyworded for +#stable, so we only can do testing +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" + +SRC_URI="" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="clang keep-nocommon override-flagomatic" + +#portage-bashrc-mv can be obtained from mv overlay +DEPEND=" + app-portage/portage-bashrc-mv[cflags] + sys-apps/portage + sys-devel/gcc-config +" +RDEPEND="${DEPEND}" + +#Test binutils and gcc version +pkg_setup() { + + ACTIVE_GCC=$(gcc-fullversion) + + if ver_test "${ACTIVE_GCC}" -lt 10.2.0; then + ewarn "Warning: Active GCC version '$ACTIVE_GCC' is lower then the expected version '10.2.0', it is recommended that you use the newest GCC if you want LTO." + if [ "${I_KNOW_WHAT_I_AM_DOING}" != "y" ]; then + eerror "Aborting LTOize installation due to older GCC version '$ACTIVE_GCC' -- set I_KNOW_WHAT_I_AM_DOING=y if you want to override this behaviour." + die + else + ewarn "I_KNOW_WHAT_I_AM_DOING=y -- continuing anyway" + fi + fi + + if [ -f "${PORTAGE_CONFIGROOT%/}/etc/portage/package.cflags" ]; then + eerror "${PORTAGE_CONFIGROOT%/}/etc/portage/package.cflags is a file not a directory. Please convert package.cflags to a directory with the current contents of package.cflags being moved to a file inside it." + die + fi + +} + +pkg_preinst() { + ACTIVE_GCC=$(gcc-fullversion) + if use override-flagomatic; then + if [ -z "${LTO_OVERLAY_PATH}" ]; then + eerror "It seems you're using the override-flagomatic feature of GentooLTO. You must set LTO_OVERLAY_PATH in your make.conf to point to where lto-overlay lives." + eerror "You can use: 'portageq get_repo_path ${PORTAGE_CONFIGROOT} lto-overlay' to obtain it if you're not sure." + die + fi + fi + + GENTOOLTO_PORTDIR="${LTO_OVERLAY_PATH}" + LTO_PORTAGE_DIR="${GENTOOLTO_PORTDIR}/${CATEGORY}/${PN}/files" + + COMMON_WORKAROUNDS=( + untested-cmake-makefile.conf + untested-devirtualize-at-ltrans.conf + untested-graphite.conf + untested-ipa-pta.conf + untested-lto.conf + untested-no-common-libtool.conf + untested-no-plt.conf + untested-no-semantic-interposition.conf + untested-optimizations.conf + untested-portage-bashrc-mv.conf + untested-tls-dialect.conf + untested-use-ld.conf + ) + + #Install make.conf settings + elog "Installing make.conf.lto.defines definitions for optimizations used in this overlay" + dosym "${LTO_PORTAGE_DIR}/make.conf.lto.defines" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/make.conf.lto.defines" + + elog "Installing make.conf.lto default full optimization config for make.conf" + dosym "${LTO_PORTAGE_DIR}/make.conf.lto" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/make.conf.lto" + + #Install main workarounds files + for i in "${COMMON_WORKAROUNDS[@]}"; do + elog "Installing package.cflags ${i} override" + dosym "${LTO_PORTAGE_DIR}/package.cflags/${i}" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/${i}" + done + + #Install -fno-common workarounds file + use keep-nocommon && dosym "${LTO_PORTAGE_DIR}/package.cflags/untested-no-common.conf" \ + "${PORTAGE_CONFIGROOT#${EPREFIX}%/}/etc/portage/package.cflags/untested-no-common.conf" + + # Install Clang LTO workarounds + use clang && dosym "${LTO_PORTAGE_DIR}/package.cflags/untested-clang.conf" \ + "${PORTAGE_CONFIGROOT#${EPREFIX}%/}/etc/portage/package.cflags/untested-clang.conf" + + #Install patch framework + elog "Installing bashrc.d hook symlink to apply LTO patches directly from lto-overlay" + dosym "${LTO_PORTAGE_DIR}/bashrc.d/41-lto-patch.sh" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/bashrc.d/41-lto-patch.sh" + + #Optional: install flag-o-matic overrides + if use override-flagomatic; then + ewarn "Installing bashrc.d hook to override strip-flags and replace-flags functions in flag-o-matic. This is an experimental feature!" + dosym "${LTO_PORTAGE_DIR}/bashrc.d/42-lto-flag-o-matic.sh" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/bashrc.d/42-lto-flag-o-matic.sh" + dosym "${LTO_PORTAGE_DIR}/package.cflags/untested-flag-o-matic.conf" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/untested-flag-o-matic.conf" + fi + + elog "Installing bashrc.d hook symlink to override package libtool lt_cv_sys_global_symbol_pipe and lt_cv_sys_global_symbol_to_cdecl" + dosym "${LTO_PORTAGE_DIR}/bashrc.d/43-lto-no-common.sh" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/bashrc.d/43-lto-no-common.sh" +} + +pkg_postinst() +{ + elog "If you have not done so, you will need to modify your make.conf settings to enable LTO building on your system." + elog "A symlink has been placed in ${PORTAGE_CONFIGROOT%/}/etc/portage/make.conf.lto that can be used as a basis for these modifications." + elog "See README.md for more details." + elog "lto-overlay and ltoize are part of a project to help find undefined behaviour in C and C++ programs through the use of aggressive compiler optimizations." + elog "One of the aims of this project is also to improve the performance of linux distributions through these mechanisms as well." + elog "Occasionally, you will experience breakage due to LTO problems. These are documented in the README.md of this repository." + elog "If you add an override for a particular package, please consider sending a pull request upstream so that other users of this repository can benefit." + ewarn "You will require a complete system rebuild in order to gain the benefits of LTO system-wide." + echo + elog "Please consider reading the README.md at the root of this repository before attempting to rebuild your system to familiarize yourself with the goals of this project and potential pitfalls you could run into." + echo + ewarn "This is an experimental project and should not be used on a stable system in its current state." + + BINUTILS_VER=$(binutils-config ${CHOST} -c | sed -e "s/.*-//") + + if ver_test "${BINUTILS_VER}" -lt 2.34; then + ewarn "Warning: active binutils version < 2.34, it is recommended that you use the newest binutils for LTO." + fi +} From 1511e3a76798421f883afce5a4ca97bde4e003a3 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 26 Dec 2023 13:25:02 -0500 Subject: [PATCH 04/63] feat: recreate package.cflags files This recreates the original package.cflags files to hold workarounds which have been tested and deemed safe and necessary. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/clang.conf | 8 ++++++++ .../files/package.cflags/cmake-makefile.conf | 2 ++ .../package.cflags/devirtualize-at-ltrans.conf | 2 ++ .../files/package.cflags/flag-o-matic.conf | 2 ++ .../ltoize/files/package.cflags/graphite.conf | 3 +++ .../ltoize/files/package.cflags/ipa-pta.conf | 2 ++ .../ltoize/files/package.cflags/lto.conf | 18 ++++++++++++++++++ .../package.cflags/no-common-libtool.conf | 2 ++ .../ltoize/files/package.cflags/no-common.conf | 7 +++++++ .../ltoize/files/package.cflags/no-plt.conf | 2 ++ .../no-semantic-interposition.conf | 2 ++ .../files/package.cflags/optimizations.conf | 5 +++++ .../package.cflags/portage-bashrc-mv.conf | 2 ++ .../files/package.cflags/tls-dialect.conf | 2 ++ .../ltoize/files/package.cflags/use-ld.conf | 2 ++ sys-config/ltoize/ltoize-0.10.0.ebuild | 17 +++++++++++++++++ 16 files changed, 78 insertions(+) create mode 100644 sys-config/ltoize/files/package.cflags/clang.conf create mode 100644 sys-config/ltoize/files/package.cflags/cmake-makefile.conf create mode 100644 sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf create mode 100644 sys-config/ltoize/files/package.cflags/flag-o-matic.conf create mode 100644 sys-config/ltoize/files/package.cflags/graphite.conf create mode 100644 sys-config/ltoize/files/package.cflags/ipa-pta.conf create mode 100644 sys-config/ltoize/files/package.cflags/lto.conf create mode 100644 sys-config/ltoize/files/package.cflags/no-common-libtool.conf create mode 100644 sys-config/ltoize/files/package.cflags/no-common.conf create mode 100644 sys-config/ltoize/files/package.cflags/no-plt.conf create mode 100644 sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf create mode 100644 sys-config/ltoize/files/package.cflags/optimizations.conf create mode 100644 sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf create mode 100644 sys-config/ltoize/files/package.cflags/tls-dialect.conf create mode 100644 sys-config/ltoize/files/package.cflags/use-ld.conf diff --git a/sys-config/ltoize/files/package.cflags/clang.conf b/sys-config/ltoize/files/package.cflags/clang.conf new file mode 100644 index 00000000..ba4b804c --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/clang.conf @@ -0,0 +1,8 @@ +# BEGIN: Workarounds for LTO with Clang +# END: Workarounds for LTO with Clang + +# BEGIN: Packages which require Full LTO +# END: Packages which require Full LTO + +# BEGIN: Packages which require libstdc++ +# END: Packages which require libstdc++ diff --git a/sys-config/ltoize/files/package.cflags/cmake-makefile.conf b/sys-config/ltoize/files/package.cflags/cmake-makefile.conf new file mode 100644 index 00000000..2237e4fa --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/cmake-makefile.conf @@ -0,0 +1,2 @@ +# BEGIN: Will not build with ninja +# END: Will not build with ninja diff --git a/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf b/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf new file mode 100644 index 00000000..275e2c5d --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf @@ -0,0 +1,2 @@ +# BEGIN: -fdevirtualize-at-ltrans workarounds +# END: -fdevirtualize-at-ltrans workarounds diff --git a/sys-config/ltoize/files/package.cflags/flag-o-matic.conf b/sys-config/ltoize/files/package.cflags/flag-o-matic.conf new file mode 100644 index 00000000..f7cd92eb --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/flag-o-matic.conf @@ -0,0 +1,2 @@ +# BEGIN: override-flagomatic workarounds +# END: override-flagomatic workarounds diff --git a/sys-config/ltoize/files/package.cflags/graphite.conf b/sys-config/ltoize/files/package.cflags/graphite.conf new file mode 100644 index 00000000..c198ce0d --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/graphite.conf @@ -0,0 +1,3 @@ +# BEGIN: Graphite ICE (Internal Compiler Error) +# Report them to the GCC team +# END: Graphite ICE (Internal Compiler Error) diff --git a/sys-config/ltoize/files/package.cflags/ipa-pta.conf b/sys-config/ltoize/files/package.cflags/ipa-pta.conf new file mode 100644 index 00000000..0af9acf3 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/ipa-pta.conf @@ -0,0 +1,2 @@ +# BEGIN: -fipa-pta workarounds +# END: -fipa-pta workarounds diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf new file mode 100644 index 00000000..532471f3 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -0,0 +1,18 @@ +# BEGIN: lto +# Packages which cannot be built with LTO at all +# 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 +# END: ffat-lto-objects + +# BEGIN: LTO not recommended +# Packages which can be built with LTO but leads to problems/crashes/segfaults +# END: LTO not recommended + +# BEGIN: Build Workarounds +# Packages which require build workarounds to be built with LTO that can be resolved directly in *FLAGS +# END: Build Workarounds + +# BEGIN: Misc Workarounds +# END: Misc Workarounds diff --git a/sys-config/ltoize/files/package.cflags/no-common-libtool.conf b/sys-config/ltoize/files/package.cflags/no-common-libtool.conf new file mode 100644 index 00000000..720ee7d9 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/no-common-libtool.conf @@ -0,0 +1,2 @@ +# BEGIN: -fno-common libtool hack workarounds (#484) +# END: -fno-common libtool hack workarounds (#484) NOCOMMON_OVERRIDE_LIBTOOL=yes diff --git a/sys-config/ltoize/files/package.cflags/no-common.conf b/sys-config/ltoize/files/package.cflags/no-common.conf new file mode 100644 index 00000000..a7f4046c --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/no-common.conf @@ -0,0 +1,7 @@ +# These workarounds apply to GCC 9.x and below. `-fno-common` is default on GCC 10 now +# and many ebuilds have already been patched, with Gentoo upstream leading the charge. +# If you are having trouble with a package in this list, try explicitly setting it to -fcommon. +# If that works, please file an issue at the GentooLTO GitHub. + +# BEGIN: -fno-common workarounds +# END: -fno-common workarounds diff --git a/sys-config/ltoize/files/package.cflags/no-plt.conf b/sys-config/ltoize/files/package.cflags/no-plt.conf new file mode 100644 index 00000000..681a9047 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/no-plt.conf @@ -0,0 +1,2 @@ +# BEGIN: No PLT workarounds +# END: No PLT workarounds diff --git a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf new file mode 100644 index 00000000..587f7daf --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf @@ -0,0 +1,2 @@ +# BEGIN: Semantic Interposition workarounds +# END: Semantic Interposition Workarounds diff --git a/sys-config/ltoize/files/package.cflags/optimizations.conf b/sys-config/ltoize/files/package.cflags/optimizations.conf new file mode 100644 index 00000000..400cd6ce --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/optimizations.conf @@ -0,0 +1,5 @@ +# BEGIN: Deliberate -O3 workarounds +# END: Deliberate -O3 workarounds + +# BEGIN: -Ofast workarounds +# END: -Ofast workarounds diff --git a/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf b/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf new file mode 100644 index 00000000..d4354c74 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf @@ -0,0 +1,2 @@ +# BEGIN: portage-bashrc-mv remove-la workarounds +# END: portage-bashrc-mv remove-la workarounds diff --git a/sys-config/ltoize/files/package.cflags/tls-dialect.conf b/sys-config/ltoize/files/package.cflags/tls-dialect.conf new file mode 100644 index 00000000..decfcf6c --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/tls-dialect.conf @@ -0,0 +1,2 @@ +# BEGIN: TLS dialect workarounds +# END: TLS dialect workarounds diff --git a/sys-config/ltoize/files/package.cflags/use-ld.conf b/sys-config/ltoize/files/package.cflags/use-ld.conf new file mode 100644 index 00000000..c335e989 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/use-ld.conf @@ -0,0 +1,2 @@ +# BEGIN: GOLD linker workarounds +# END: GOLD linker workarounds diff --git a/sys-config/ltoize/ltoize-0.10.0.ebuild b/sys-config/ltoize/ltoize-0.10.0.ebuild index e10dbf78..a348f5ab 100644 --- a/sys-config/ltoize/ltoize-0.10.0.ebuild +++ b/sys-config/ltoize/ltoize-0.10.0.ebuild @@ -62,6 +62,18 @@ pkg_preinst() { LTO_PORTAGE_DIR="${GENTOOLTO_PORTDIR}/${CATEGORY}/${PN}/files" COMMON_WORKAROUNDS=( + cmake-makefile.conf + devirtualize-at-ltrans.conf + graphite.conf + ipa-pta.conf + lto.conf + no-common-libtool.conf + no-plt.conf + no-semantic-interposition.conf + optimizations.conf + portage-bashrc-mv.conf + tls-dialect.conf + use-ld.conf untested-cmake-makefile.conf untested-devirtualize-at-ltrans.conf untested-graphite.conf @@ -92,10 +104,14 @@ pkg_preinst() { #Install -fno-common workarounds file use keep-nocommon && dosym "${LTO_PORTAGE_DIR}/package.cflags/untested-no-common.conf" \ "${PORTAGE_CONFIGROOT#${EPREFIX}%/}/etc/portage/package.cflags/untested-no-common.conf" + use keep-nocommon && dosym "${LTO_PORTAGE_DIR}/package.cflags/no-common.conf" \ + "${PORTAGE_CONFIGROOT#${EPREFIX}%/}/etc/portage/package.cflags/no-common.conf" # Install Clang LTO workarounds use clang && dosym "${LTO_PORTAGE_DIR}/package.cflags/untested-clang.conf" \ "${PORTAGE_CONFIGROOT#${EPREFIX}%/}/etc/portage/package.cflags/untested-clang.conf" + use clang && dosym "${LTO_PORTAGE_DIR}/package.cflags/clang.conf" \ + "${PORTAGE_CONFIGROOT#${EPREFIX}%/}/etc/portage/package.cflags/clang.conf" #Install patch framework elog "Installing bashrc.d hook symlink to apply LTO patches directly from lto-overlay" @@ -106,6 +122,7 @@ pkg_preinst() { ewarn "Installing bashrc.d hook to override strip-flags and replace-flags functions in flag-o-matic. This is an experimental feature!" dosym "${LTO_PORTAGE_DIR}/bashrc.d/42-lto-flag-o-matic.sh" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/bashrc.d/42-lto-flag-o-matic.sh" dosym "${LTO_PORTAGE_DIR}/package.cflags/untested-flag-o-matic.conf" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/untested-flag-o-matic.conf" + dosym "${LTO_PORTAGE_DIR}/package.cflags/flag-o-matic.conf" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/wflag-o-matic.conf" fi elog "Installing bashrc.d hook symlink to override package libtool lt_cv_sys_global_symbol_pipe and lt_cv_sys_global_symbol_to_cdecl" From 6131ea335b8ef55c337e787f28801ec6ca82c23c Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 26 Dec 2023 13:31:33 -0500 Subject: [PATCH 05/63] feat: commented all untested workarounds This comments all untested workarounds. This will make it easier to see which are needed and incrementatlly enable them. Once tested, they can be moved to the un-prefixed package.cflags files. Signed-off-by: Jaremy Hatler --- .../files/package.cflags/untested-clang.conf | 28 +-- .../untested-cmake-makefile.conf | 14 +- .../untested-devirtualize-at-ltrans.conf | 6 +- .../package.cflags/untested-flag-o-matic.conf | 68 ++--- .../package.cflags/untested-graphite.conf | 6 +- .../package.cflags/untested-ipa-pta.conf | 42 ++-- .../files/package.cflags/untested-lto.conf | 238 +++++++++--------- .../untested-no-common-libtool.conf | 68 ++--- .../package.cflags/untested-no-common.conf | 192 +++++++------- .../files/package.cflags/untested-no-plt.conf | 12 +- .../untested-no-semantic-interposition.conf | 26 +- .../untested-optimizations.conf | 62 ++--- .../untested-portage-bashrc-mv.conf | 6 +- .../package.cflags/untested-tls-dialect.conf | 24 +- .../files/package.cflags/untested-use-ld.conf | 14 +- 15 files changed, 403 insertions(+), 403 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-clang.conf b/sys-config/ltoize/files/package.cflags/untested-clang.conf index 7cc8bec4..c8c7b9e2 100644 --- a/sys-config/ltoize/files/package.cflags/untested-clang.conf +++ b/sys-config/ltoize/files/package.cflags/untested-clang.conf @@ -1,16 +1,16 @@ -# BEGIN: Workarounds for LTO with Clang -dev-lang/python *FLAGS-=-flto* # https://bugs.gentoo.org/700012 : No -ffat-lto-objects on clang -dev-libs/libffi *FLAGS-=-flto* # error: changed section flags for .eh_frame https://github.com/libffi/libffi/issues/626 (abi_x86_32) -dev-util/colm *FLAGS-=-flto* # ld: libcolm.a: error adding symbols: file format not recognized -media-libs/dav1d *FLAGS-=-flto* # general protection fault https://code.videolan.org/videolan/dav1d/-/issues/362 ->=app-office/libreoffice-7.1.2.2 "has clang ${IUSE//+} && use clang && NOLDADD=1" "has clang ${IUSE//+} && use clang && has custom-cflags ${IUSE//+} && use custom-cflags && FlagSubAllFlags ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${FLTO} -fuse-linker-plugin" # fails to configure, see issue #734 -# END: Workarounds for LTO with Clang +# BEGIN: Untested Workarounds for LTO with Clang +# dev-lang/python *FLAGS-=-flto* # https://bugs.gentoo.org/700012 : No -ffat-lto-objects on clang +# dev-libs/libffi *FLAGS-=-flto* # error: changed section flags for .eh_frame https://github.com/libffi/libffi/issues/626 (abi_x86_32) +# dev-util/colm *FLAGS-=-flto* # ld: libcolm.a: error adding symbols: file format not recognized +# media-libs/dav1d *FLAGS-=-flto* # general protection fault https://code.videolan.org/videolan/dav1d/-/issues/362 +# >=app-office/libreoffice-7.1.2.2 "has clang ${IUSE//+} && use clang && NOLDADD=1" "has clang ${IUSE//+} && use clang && has custom-cflags ${IUSE//+} && use custom-cflags && FlagSubAllFlags ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${FLTO} -fuse-linker-plugin" # fails to configure, see issue #734 +# END: Untested Workarounds for LTO with Clang -# BEGIN: Packages which require Full LTO -media-libs/libglvnd LTO_FULL=1 # ld.lld: error: undefined symbol: entrypointFunctions -# END: Packages which require Full LTO +# BEGIN: Untested Packages which require Full LTO +# media-libs/libglvnd LTO_FULL=1 # ld.lld: error: undefined symbol: entrypointFunctions +# END: Untested Packages which require Full LTO -# BEGIN: Packages which require libstdc++ -media-libs/exempi CXXFLAGS+=-stdlib=libstdc++ # fatal error: 'tr1/memory' file not found -net-libs/webkit-gtk CXXFLAGS+=-stdlib=libstdc++ # error: use of undeclared identifier 'LC_ALL' -# END: Packages which require libstdc++ +# BEGIN: Untested Packages which require libstdc++ +# media-libs/exempi CXXFLAGS+=-stdlib=libstdc++ # fatal error: 'tr1/memory' file not found +# net-libs/webkit-gtk CXXFLAGS+=-stdlib=libstdc++ # error: use of undeclared identifier 'LC_ALL' +# END: Untested Packages which require libstdc++ diff --git a/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf b/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf index 911945b0..f90c5fea 100644 --- a/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf +++ b/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf @@ -1,7 +1,7 @@ -# BEGIN: Will not build with ninja -app-doc/doxygen CMAKE_MAKEFILE_GENERATOR=emake -dev-lang/swi-prolog CMAKE_MAKEFILE_GENERATOR=emake -games-arcade/supertux CMAKE_MAKEFILE_GENERATOR=emake -media-libs/musicbrainz CMAKE_MAKEFILE_GENERATOR=emake -x11-misc/polybar CMAKE_MAKEFILE_GENERATOR=emake -# END: Will not build with ninja +# BEGIN: Untested Will not build with ninja +# app-doc/doxygen CMAKE_MAKEFILE_GENERATOR=emake +# dev-lang/swi-prolog CMAKE_MAKEFILE_GENERATOR=emake +# games-arcade/supertux CMAKE_MAKEFILE_GENERATOR=emake +# media-libs/musicbrainz CMAKE_MAKEFILE_GENERATOR=emake +# x11-misc/polybar CMAKE_MAKEFILE_GENERATOR=emake +# END: Untested Will not build with ninja diff --git a/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf b/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf index c024089c..4f00649b 100644 --- a/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf +++ b/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf @@ -1,3 +1,3 @@ -# BEGIN: -fdevirtualize-at-ltrans workarounds -app-text/lcdf-typetools *FLAGS-="-fdevirtualize-at-ltrans" # ICE on static-var pass -# END: -fdevirtualize-at-ltrans workarounds +# BEGIN: Untested -fdevirtualize-at-ltrans workarounds +# app-text/lcdf-typetools *FLAGS-="-fdevirtualize-at-ltrans" # ICE on static-var pass +# END: Untested -fdevirtualize-at-ltrans workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf b/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf index a16daf1a..a1ab2a0c 100644 --- a/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf +++ b/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf @@ -1,34 +1,34 @@ -# BEGIN: override-flagomatic workarounds -app-crypt/johntheripper-jumbo LTO_ENABLE_FLAGOMATIC=yes -app-crypt/johntheripper LTO_ENABLE_FLAGOMATIC=yes -app-emulation/hercules LTO_ENABLE_FLAGOMATIC=yes -app-emulation/wine-any LTO_ENABLE_FLAGOMATIC=yes -app-emulation/wine-d3d9 LTO_ENABLE_FLAGOMATIC=yes -app-emulation/wine-staging LTO_ENABLE_FLAGOMATIC=yes -app-emulation/wine-vanilla LTO_ENABLE_FLAGOMATIC=yes -app-emulation/xen LTO_ENABLE_FLAGOMATIC=yes -app-emulation/xen-pvgrub LTO_ENABLE_FLAGOMATIC=yes -app-emulation/xen-tools LTO_ENABLE_FLAGOMATIC=yes -dev-lang/ghc LTO_ENABLE_FLAGOMATIC=yes -dev-lang/gnat-gpl LTO_ENABLE_FLAGOMATIC=yes -dev-libs/klibc LTO_ENABLE_FLAGOMATIC=yes -dev-libs/openssl LTO_ENABLE_FLAGOMATIC=yes -dev-util/electron LTO_ENABLE_FLAGOMATIC=yes -games-emulation/zsnes LTO_ENABLE_FLAGOMATIC=yes -media-libs/libsdl LTO_ENABLE_FLAGOMATIC=yes -media-video/libav LTO_ENABLE_FLAGOMATIC=yes -media-video/x264-encoder LTO_ENABLE_FLAGOMATIC=yes -sci-biology/shrimp LTO_ENABLE_FLAGOMATIC=yes -sci-biology/unafold LTO_ENABLE_FLAGOMATIC=yes -sci-chemistry/tm-align LTO_ENABLE_FLAGOMATIC=yes -sys-boot/refind LTO_ENABLE_FLAGOMATIC=yes # USE='custom-cflags' currently masked by profile -sys-boot/syslinux LTO_ENABLE_FLAGOMATIC=yes -sys-boot/tboot LTO_ENABLE_FLAGOMATIC=yes -sys-devel/gcc LTO_ENABLE_FLAGOMATIC=yes # Build system requires special attention, use BOOT_CFLAGS to inject flags. Do not inject -flto, use the USE flag to do this. -sys-fs/zfs-kmod LTO_ENABLE_FLAGOMATIC=yes -sys-fs/zfs LTO_ENABLE_FLAGOMATIC=yes -sys-kernel/spl LTO_ENABLE_FLAGOMATIC=yes -www-client/chromium LTO_ENABLE_FLAGOMATIC=yes -www-client/firefox LTO_ENABLE_FLAGOMATIC=yes # The ebuild does respect your CFLAGS, it just does some messing around for enabling -flto and -O3. -www-client/torbrowser LTO_ENABLE_FLAGOMATIC=yes -# END: override-flagomatic workarounds +# BEGIN: Untested verride-flagomatic workarounds +# app-crypt/johntheripper-jumbo LTO_ENABLE_FLAGOMATIC=yes +# app-crypt/johntheripper LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/hercules LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/wine-any LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/wine-d3d9 LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/wine-staging LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/wine-vanilla LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/xen LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/xen-pvgrub LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/xen-tools LTO_ENABLE_FLAGOMATIC=yes +# dev-lang/ghc LTO_ENABLE_FLAGOMATIC=yes +# dev-lang/gnat-gpl LTO_ENABLE_FLAGOMATIC=yes +# dev-libs/klibc LTO_ENABLE_FLAGOMATIC=yes +# dev-libs/openssl LTO_ENABLE_FLAGOMATIC=yes +# dev-util/electron LTO_ENABLE_FLAGOMATIC=yes +# games-emulation/zsnes LTO_ENABLE_FLAGOMATIC=yes +# media-libs/libsdl LTO_ENABLE_FLAGOMATIC=yes +# media-video/libav LTO_ENABLE_FLAGOMATIC=yes +# media-video/x264-encoder LTO_ENABLE_FLAGOMATIC=yes +# sci-biology/shrimp LTO_ENABLE_FLAGOMATIC=yes +# sci-biology/unafold LTO_ENABLE_FLAGOMATIC=yes +# sci-chemistry/tm-align LTO_ENABLE_FLAGOMATIC=yes +# sys-boot/refind LTO_ENABLE_FLAGOMATIC=yes # USE='custom-cflags' currently masked by profile +# sys-boot/syslinux LTO_ENABLE_FLAGOMATIC=yes +# sys-boot/tboot LTO_ENABLE_FLAGOMATIC=yes +# sys-devel/gcc LTO_ENABLE_FLAGOMATIC=yes # Build system requires special attention, use BOOT_CFLAGS to inject flags. Do not inject -flto, use the USE flag to do this. +# sys-fs/zfs-kmod LTO_ENABLE_FLAGOMATIC=yes +# sys-fs/zfs LTO_ENABLE_FLAGOMATIC=yes +# sys-kernel/spl LTO_ENABLE_FLAGOMATIC=yes +# www-client/chromium LTO_ENABLE_FLAGOMATIC=yes +# www-client/firefox LTO_ENABLE_FLAGOMATIC=yes # The ebuild does respect your CFLAGS, it just does some messing around for enabling -flto and -O3. +# www-client/torbrowser LTO_ENABLE_FLAGOMATIC=yes +# END: Untested override-flagomatic workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-graphite.conf b/sys-config/ltoize/files/package.cflags/untested-graphite.conf index e7f570c8..390150f1 100644 --- a/sys-config/ltoize/files/package.cflags/untested-graphite.conf +++ b/sys-config/ltoize/files/package.cflags/untested-graphite.conf @@ -1,4 +1,4 @@ -# BEGIN: Graphite ICE (Internal Compiler Error) +# BEGIN: Untested Graphite ICE (Internal Compiler Error) # Report them to the GCC team -sci-visualization/paraview *FLAGS-="${GRAPHITE}" # Removing Graphite optimizations allows build to complete with sane memory usage for --jobs > 1 -# END: Graphite ICE (Internal Compiler Error) +# sci-visualization/paraview *FLAGS-="${GRAPHITE}" # Removing Graphite optimizations allows build to complete with sane memory usage for --jobs > 1 +# END: Untested Graphite ICE (Internal Compiler Error) diff --git a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf index b88353d4..2e0d22be 100644 --- a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf @@ -1,21 +1,21 @@ -# BEGIN: -fipa-pta workarounds -dev-lang/R *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault -sys-devel/gcc *FLAGS-="${IPAPTA}" -dev-lang/duktape *FLAGS-="${IPAPTA}" # fixes polkit from musl overlay not starting -dev-lang/gnat-gpl *FLAGS-="${IPAPTA}" -dev-lang/php *FLAGS-="${IPAPTA}" # Segfaults when compiled with -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 -dev-lang/ocaml *FLAGS-="${IPAPTA}" # ICE during IPA pass: pta in lto1: Segmentation fault -app-emulation/libvirt *FLAGS-="${IPAPTA}" # Segmentation fault when starting libvirtd -dev-python/libvirt-python *FLAGS-="${IPAPTA}" # Test failure -dev-db/postgresql *FLAGS-="${IPAPTA}" # Test failure -media-video/ffmpeg *FLAGS-="${IPAPTA}" # Test failure -net-p2p/monero *FLAGS-="${IPAPTA}" # ICE with -fipa-pta -mail-client/thunderbird *FLAGS-="${IPAPTA}" # ICE with GCC 10.2.0 (seen with thunderbird 68.12.0) ->=dev-lang/spidermonkey-78.3.1 *FLAGS-="${IPAPTA}" # Segfault during build with GCC 10.2.0 ->=media-libs/mesa-21.1.0 *FLAGS-="${IPAPTA}" # Segfault with vulkan -x11-base/xwayland *FLAGS-="${IPAPTA}" # SIGABRT when querying for GLX information -# END: -fipa-pta workarounds +# BEGIN: Untested -fipa-pta workarounds +# dev-lang/R *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault +# sys-devel/gcc *FLAGS-="${IPAPTA}" +# dev-lang/duktape *FLAGS-="${IPAPTA}" # fixes polkit from musl overlay not starting +# dev-lang/gnat-gpl *FLAGS-="${IPAPTA}" +# dev-lang/php *FLAGS-="${IPAPTA}" # Segfaults when compiled with -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 +# dev-lang/ocaml *FLAGS-="${IPAPTA}" # ICE during IPA pass: pta in lto1: Segmentation fault +# app-emulation/libvirt *FLAGS-="${IPAPTA}" # Segmentation fault when starting libvirtd +# dev-python/libvirt-python *FLAGS-="${IPAPTA}" # Test failure +# dev-db/postgresql *FLAGS-="${IPAPTA}" # Test failure +# media-video/ffmpeg *FLAGS-="${IPAPTA}" # Test failure +# net-p2p/monero *FLAGS-="${IPAPTA}" # ICE with -fipa-pta +# mail-client/thunderbird *FLAGS-="${IPAPTA}" # ICE with GCC 10.2.0 (seen with thunderbird 68.12.0) +# >=dev-lang/spidermonkey-78.3.1 *FLAGS-="${IPAPTA}" # Segfault during build with GCC 10.2.0 +# >=media-libs/mesa-21.1.0 *FLAGS-="${IPAPTA}" # Segfault with vulkan +# x11-base/xwayland *FLAGS-="${IPAPTA}" # SIGABRT when querying for GLX information +# END: Untested -fipa-pta workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf index ff8c3ada..6676309e 100644 --- a/sys-config/ltoize/files/package.cflags/untested-lto.conf +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -1,127 +1,127 @@ -# BEGIN: lto +# BEGIN: Untested 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/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 -app-text/yodl *FLAGS-=-flto* # Fixes build -cross-arm-none-eabi/newlib *FLAGS-=-flto* # Causes 'arm-none-eabi-gcc' to segfault -cross-i686-w64-mingw32/mingw64-runtime *FLAGS-=-flto* # linking errors -cross-x86_64-w64-mingw32/mingw64-runtime *FLAGS-=-flto* # linking errors -dev-db/firebird *FLAGS-=-flto* -dev-db/mariadb *FLAGS-=-flto* -dev-db/mysql-connector-c *FLAGS-=-flto* # required to compiled mysql-connector-c -games-fps/gzdoom *FLAGS-=-flto* # Assertion `Class != nullptr' failed. SIGABRT -dev-java/icedtea *FLAGS-=-flto* -=dev-lang/php-7.2.0 *FLAGS-=-flto* # lto-wrapper link failure / https://github.com/InBetweenNames/gentooLTO/issues/135 -dev-lang/spidermonkey *FLAGS-=-flto* -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-scheme/guile *FLAGS-=-flto* # Issue #193 -dev-util/github-cli *FLAGS-=-flto* -dev-util/radare2 *FLAGS-=-flto* # ICE in IPA pass -dev-vcs/cvs *FLAGS-=-flto* # Undefined references -games-action/extreme-tuxracer *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/mlt *FLAGS-=-flto* -media-sound/pulseaudio *FLAGS-=-flto* -media-video/mplayer *FLAGS-=-flto* -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 -dev-python/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-cluster/ceph *FLAGS-=-flto* # linking error during compilation -sys-cluster/glusterfs *FLAGS-=-flto* # undefined reference to `glfs_subvol_done' ->=sys-libs/efivar-38 *FLAGS-="-flto*" # Error when compiling with LTO per PR #823 -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/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.) -www-apps/hugo *FLAGS-=-flto* -x11-drivers/xf86-video-intel *FLAGS-=-flto* -# END: lto +# 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/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 +# app-text/yodl *FLAGS-=-flto* # Fixes build +# cross-arm-none-eabi/newlib *FLAGS-=-flto* # Causes 'arm-none-eabi-gcc' to segfault +# cross-i686-w64-mingw32/mingw64-runtime *FLAGS-=-flto* # linking errors +# cross-x86_64-w64-mingw32/mingw64-runtime *FLAGS-=-flto* # linking errors +# dev-db/firebird *FLAGS-=-flto* +# dev-db/mariadb *FLAGS-=-flto* +# dev-db/mysql-connector-c *FLAGS-=-flto* # required to compiled mysql-connector-c +# games-fps/gzdoom *FLAGS-=-flto* # Assertion `Class != nullptr' failed. SIGABRT +# dev-java/icedtea *FLAGS-=-flto* +# =dev-lang/php-7.2.0 *FLAGS-=-flto* # lto-wrapper link failure / https://github.com/InBetweenNames/gentooLTO/issues/135 +# dev-lang/spidermonkey *FLAGS-=-flto* +# 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-scheme/guile *FLAGS-=-flto* # Issue #193 +# dev-util/github-cli *FLAGS-=-flto* +# dev-util/radare2 *FLAGS-=-flto* # ICE in IPA pass +# dev-vcs/cvs *FLAGS-=-flto* # Undefined references +# games-action/extreme-tuxracer *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/mlt *FLAGS-=-flto* +# media-sound/pulseaudio *FLAGS-=-flto* +# media-video/mplayer *FLAGS-=-flto* +# 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 +# dev-python/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-cluster/ceph *FLAGS-=-flto* # linking error during compilation +# sys-cluster/glusterfs *FLAGS-=-flto* # undefined reference to `glfs_subvol_done' +# >=sys-libs/efivar-38 *FLAGS-="-flto*" # Error when compiling with LTO per PR #823 +# 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/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.) +# www-apps/hugo *FLAGS-=-flto* +# x11-drivers/xf86-video-intel *FLAGS-=-flto* +# END: Untested lto -# BEGIN: ffat-lto-objects +# BEGIN: Untested 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-c *FLAGS+=-ffat-lto-objects # fails to link against ssh functions without -dev-util/sccache *FLAGS+=-ffat-lto-objects # fails to link -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 +# 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-c *FLAGS+=-ffat-lto-objects # fails to link against ssh functions without +# dev-util/sccache *FLAGS+=-ffat-lto-objects # fails to link +# 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: Untested ffat-lto-objects -# BEGIN: LTO not recommended +# BEGIN: Untested 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/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-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-fs/cryfs *FLAGS-=-flto* # Test failure -sys-libs/libapparmor *FLAGS-=-flto* # Undefined symbol error when trying to compile sys-apps/apparmor -app-misc/openrgb *FLAGS-=-flto* # Segmentation fault on launch -# END: LTO not recommended +# 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/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-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-fs/cryfs *FLAGS-=-flto* # Test failure +# sys-libs/libapparmor *FLAGS-=-flto* # Undefined symbol error when trying to compile sys-apps/apparmor +# app-misc/openrgb *FLAGS-=-flto* # Segmentation fault on launch +# END: Untested LTO not recommended -# BEGIN: Build Workarounds +# BEGIN: Untested 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-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-power/thermald *FLAGS+=-Wl,--no-fatal-warnings *FLAGS+=-Wno-error -# END: Build Workarounds +# 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-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-power/thermald *FLAGS+=-Wl,--no-fatal-warnings *FLAGS+=-Wno-error +# END: Untested 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 +# BEGIN: Untested 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: Untested Misc Workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-no-common-libtool.conf b/sys-config/ltoize/files/package.cflags/untested-no-common-libtool.conf index ada2e5d4..7cddcfa4 100644 --- a/sys-config/ltoize/files/package.cflags/untested-no-common-libtool.conf +++ b/sys-config/ltoize/files/package.cflags/untested-no-common-libtool.conf @@ -1,34 +1,34 @@ -# BEGIN: -fno-common libtool hack workarounds (#484) -app-crypt/libsecret NOCOMMON_OVERRIDE_LIBTOOL=yes -app-text/enchant NOCOMMON_OVERRIDE_LIBTOOL=yes -app-text/evince NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/dbus-glib NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/ffcall NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/jansson NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libappindicator NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libatasmart NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libdbusmenu NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libindicator NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-python/dbus-python NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-util/umockdev NOCOMMON_OVERRIDE_LIBTOOL=yes -gnome-base/libglade NOCOMMON_OVERRIDE_LIBTOOL=yes -lxde-base/menu-cache NOCOMMON_OVERRIDE_LIBTOOL=yes -media-gfx/ttfautohint NOCOMMON_OVERRIDE_LIBTOOL=yes -media-libs/libdvdnav NOCOMMON_OVERRIDE_LIBTOOL=yes -media-libs/libdvdread NOCOMMON_OVERRIDE_LIBTOOL=yes -media-plugins/gst-plugins-libav NOCOMMON_OVERRIDE_LIBTOOL=yes -media-plugins/gst-plugins-vaapi NOCOMMON_OVERRIDE_LIBTOOL=yes -media-sound/sox NOCOMMON_OVERRIDE_LIBTOOL=yes -media-sound/wavpack NOCOMMON_OVERRIDE_LIBTOOL=yes -media-video/vlc NOCOMMON_OVERRIDE_LIBTOOL=yes -net-libs/libmbim NOCOMMON_OVERRIDE_LIBTOOL=yes -net-misc/modemmanager NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-apps/accountsservice NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-apps/usbredir NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-auth/polkit NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-boot/plymouth NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-fs/udisks NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-power/upower NOCOMMON_OVERRIDE_LIBTOOL=yes -x11-libs/libfm NOCOMMON_OVERRIDE_LIBTOOL=yes -x11-libs/libfm-extra NOCOMMON_OVERRIDE_LIBTOOL=yes -# END: -fno-common libtool hack workarounds (#484) NOCOMMON_OVERRIDE_LIBTOOL=yes +# BEGIN: Untested -fno-common libtool hack workarounds (#484) +# app-crypt/libsecret NOCOMMON_OVERRIDE_LIBTOOL=yes +# app-text/enchant NOCOMMON_OVERRIDE_LIBTOOL=yes +# app-text/evince NOCOMMON_OVERRIDE_LIBTOOL=yes +# dev-libs/dbus-glib NOCOMMON_OVERRIDE_LIBTOOL=yes +# dev-libs/ffcall NOCOMMON_OVERRIDE_LIBTOOL=yes +# dev-libs/jansson NOCOMMON_OVERRIDE_LIBTOOL=yes +# dev-libs/libappindicator NOCOMMON_OVERRIDE_LIBTOOL=yes +# dev-libs/libatasmart NOCOMMON_OVERRIDE_LIBTOOL=yes +# dev-libs/libdbusmenu NOCOMMON_OVERRIDE_LIBTOOL=yes +# dev-libs/libindicator NOCOMMON_OVERRIDE_LIBTOOL=yes +# dev-python/dbus-python NOCOMMON_OVERRIDE_LIBTOOL=yes +# dev-util/umockdev NOCOMMON_OVERRIDE_LIBTOOL=yes +# gnome-base/libglade NOCOMMON_OVERRIDE_LIBTOOL=yes +# lxde-base/menu-cache NOCOMMON_OVERRIDE_LIBTOOL=yes +# media-gfx/ttfautohint NOCOMMON_OVERRIDE_LIBTOOL=yes +# media-libs/libdvdnav NOCOMMON_OVERRIDE_LIBTOOL=yes +# media-libs/libdvdread NOCOMMON_OVERRIDE_LIBTOOL=yes +# media-plugins/gst-plugins-libav NOCOMMON_OVERRIDE_LIBTOOL=yes +# media-plugins/gst-plugins-vaapi NOCOMMON_OVERRIDE_LIBTOOL=yes +# media-sound/sox NOCOMMON_OVERRIDE_LIBTOOL=yes +# media-sound/wavpack NOCOMMON_OVERRIDE_LIBTOOL=yes +# media-video/vlc NOCOMMON_OVERRIDE_LIBTOOL=yes +# net-libs/libmbim NOCOMMON_OVERRIDE_LIBTOOL=yes +# net-misc/modemmanager NOCOMMON_OVERRIDE_LIBTOOL=yes +# sys-apps/accountsservice NOCOMMON_OVERRIDE_LIBTOOL=yes +# sys-apps/usbredir NOCOMMON_OVERRIDE_LIBTOOL=yes +# sys-auth/polkit NOCOMMON_OVERRIDE_LIBTOOL=yes +# sys-boot/plymouth NOCOMMON_OVERRIDE_LIBTOOL=yes +# sys-fs/udisks NOCOMMON_OVERRIDE_LIBTOOL=yes +# sys-power/upower NOCOMMON_OVERRIDE_LIBTOOL=yes +# x11-libs/libfm NOCOMMON_OVERRIDE_LIBTOOL=yes +# x11-libs/libfm-extra NOCOMMON_OVERRIDE_LIBTOOL=yes +# END: Untested -fno-common libtool hack workarounds (#484) NOCOMMON_OVERRIDE_LIBTOOL=yes diff --git a/sys-config/ltoize/files/package.cflags/untested-no-common.conf b/sys-config/ltoize/files/package.cflags/untested-no-common.conf index ed056a8c..f259c0d1 100644 --- a/sys-config/ltoize/files/package.cflags/untested-no-common.conf +++ b/sys-config/ltoize/files/package.cflags/untested-no-common.conf @@ -3,99 +3,99 @@ # If you are having trouble with a package in this list, try explicitly setting it to -fcommon. # If that works, please file an issue at the GentooLTO GitHub. -# 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/erlang *FLAGS-="${NOCOMMON}" -dev-lang/orc *FLAGS-="${NOCOMMON}" -dev-lang/R *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/bluez-alsa *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}" -net-vpn/libreswan *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-="${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-apps/coreutils-8.31 *FLAGS+='-fno-finite-math-only' # causes multiple definition of `minus_zero` error during linking ->=sys-apps/groff-1.22.4 *FLAGS+='-fsigned-zeros' # causes conflicting declaration of `signbit` compilation error ->=sys-devel/llvm-10.0.0 *FLAGS+='-fno-finite-math-only' # compiles fine but causes clang to fail to emerge with ``undefined reference to `__log10_finite'`` ->=sys-libs/glibc-2.30 /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled -www-client/firefox /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # won't build with flags activated by -ffast-math on Clang, requires investigation -x11-misc/gammastep *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly -x11-misc/redshift *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly -# END: -Ofast workarounds +# BEGIN: Untested -Ofast workarounds +# app-editors/emacs *FLAGS+='-fno-finite-math-only' # explicitly required by the ebuild +# dev-lang/python *FLAGS+='-fno-finite-math-only' # instrumentation tests hang/segfault during emerge +# dev-lang/R *FLAGS+='-fno-finite-math-only' # R itself compiles fine, but runtime errors cause installation of R library tools to fail during emerge +# dev-python/numpy /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' /-funsafe-math-optimizations/'${SAFER_UNSAFE_MATH_OPTS}' *FLAGS-='-ffinite-math-only' # no compilation error, but -funsafe-math-optimizations (implied by -Ofast or -ffast-math) causes an undefined symbol error when trying to import numpy in python; '-ffinite-math-only' causes incorrect runtime handling of infinite values +# dev-python/pillow *FLAGS+='-fno-finite-math-only' # compiles fine but causes `import matplotlib.pyplot` to fail with `undefined symbol: __log_finite` +# dev-qt/qtcore *FLAGS+='-fno-finite-math-only' # compiles fine but causes most forms of scrolling to stop working in okular +# dev-scheme/guile *FLAGS+='-fno-finite-math-only' # build fails with `floating point exception` +# kde-frameworks/kjs /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled +# net-voip/mumble /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the libopus source throws an error if ffast-math is enabled +# media-video/mpv /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # causes incorrect behavior (black screen) when enabling interpolation or downscaling +# net-analyzer/rrdtool *FLAGS+='-fno-finite-math-only' # configure fails due to non-compliant IEEE arithmetic +# net-libs/nodejs *FLAGS+='-fno-finite-math-only' # compiles fine but `npm` returns error whenever it starts running +# >=sys-apps/coreutils-8.31 *FLAGS+='-fno-finite-math-only' # causes multiple definition of `minus_zero` error during linking +# >=sys-apps/groff-1.22.4 *FLAGS+='-fsigned-zeros' # causes conflicting declaration of `signbit` compilation error +# >=sys-devel/llvm-10.0.0 *FLAGS+='-fno-finite-math-only' # compiles fine but causes clang to fail to emerge with ``undefined reference to `__log10_finite'`` +# >=sys-libs/glibc-2.30 /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled +# www-client/firefox /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # won't build with flags activated by -ffast-math on Clang, requires investigation +# x11-misc/gammastep *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly +# x11-misc/redshift *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly +# END: Untested -Ofast workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf b/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf index 2f65ea9e..2cb9232e 100644 --- a/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf +++ b/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf @@ -1,3 +1,3 @@ -# BEGIN: portage-bashrc-mv remove-la workarounds -dev-util/colm NOLAFILEREMOVE=true # See issue 690 and https://bugs.gentoo.org/766210 -# END: portage-bashrc-mv remove-la workarounds +# BEGIN: Untested portage-bashrc-mv remove-la workarounds +# dev-util/colm NOLAFILEREMOVE=true # See issue 690 and https://bugs.gentoo.org/766210 +# END: Untested portage-bashrc-mv remove-la workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-tls-dialect.conf b/sys-config/ltoize/files/package.cflags/untested-tls-dialect.conf index 39383259..9f52436c 100644 --- a/sys-config/ltoize/files/package.cflags/untested-tls-dialect.conf +++ b/sys-config/ltoize/files/package.cflags/untested-tls-dialect.conf @@ -1,12 +1,12 @@ -# BEGIN: TLS dialect workarounds -www-client/firefox *FLAGS-="-mtls-dialect=gnu2" -sys-fs/eudev *FLAGS-="-mtls-dialect=gnu2" -sys-libs/glibc *FLAGS-="-mtls-dialect=gnu2" -dev-lang/mono *FLAGS-="-mtls-dialect=gnu2" -dev-util/lldb *FLAGS-="-mtls-dialect=gnu2" -dev-db/firebird *FLAGS-="-mtls-dialect=gnu2" -dev-lang/spidermonkey *FLAGS-="-mtls-dialect=gnu2" -sys-fs/btrfs-progs *FLAGS-="-mtls-dialect=gnu2" -sys-boot/systemd-boot *FLAGS-="-mtls-dialect=gnu2" -net-libs/libtorrent-rasterbar *FLAGS-="-mtls-dialect=gnu2" # causes memory corruption at runtime -# END: TLS dialect workarounds +# BEGIN: Untested TLS dialect workarounds +# www-client/firefox *FLAGS-="-mtls-dialect=gnu2" +# sys-fs/eudev *FLAGS-="-mtls-dialect=gnu2" +# sys-libs/glibc *FLAGS-="-mtls-dialect=gnu2" +# dev-lang/mono *FLAGS-="-mtls-dialect=gnu2" +# dev-util/lldb *FLAGS-="-mtls-dialect=gnu2" +# dev-db/firebird *FLAGS-="-mtls-dialect=gnu2" +# dev-lang/spidermonkey *FLAGS-="-mtls-dialect=gnu2" +# sys-fs/btrfs-progs *FLAGS-="-mtls-dialect=gnu2" +# sys-boot/systemd-boot *FLAGS-="-mtls-dialect=gnu2" +# net-libs/libtorrent-rasterbar *FLAGS-="-mtls-dialect=gnu2" # causes memory corruption at runtime +# END: Untested TLS dialect workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-use-ld.conf b/sys-config/ltoize/files/package.cflags/untested-use-ld.conf index cc4c2860..452e1b9c 100644 --- a/sys-config/ltoize/files/package.cflags/untested-use-ld.conf +++ b/sys-config/ltoize/files/package.cflags/untested-use-ld.conf @@ -1,7 +1,7 @@ -# BEGIN: GOLD linker workarounds -dev-util/kbuild *FLAGS+="-fuse-ld=bfd" -games-emulation/pcsx2 *FLAGS+="-fuse-ld=bfd" -media-libs/libcaca *FLAGS+="-fuse-ld=bfd" -net-misc/curl *FLAGS+="-fuse-ld=bfd" ->=sys-libs/libcap-2.28 *FLAGS+="-fuse-ld=bfd" # Issue #453 -# END: GOLD linker workarounds +# BEGIN: Untested GOLD linker workarounds +# dev-util/kbuild *FLAGS+="-fuse-ld=bfd" +# games-emulation/pcsx2 *FLAGS+="-fuse-ld=bfd" +# media-libs/libcaca *FLAGS+="-fuse-ld=bfd" +# net-misc/curl *FLAGS+="-fuse-ld=bfd" +# >=sys-libs/libcap-2.28 *FLAGS+="-fuse-ld=bfd" # Issue #453 +# END: Untested GOLD linker workarounds From 53699f87c6eca72adc6fe984a23d9a3000065189 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 17:00:56 -0500 Subject: [PATCH 06/63] feat: enable pgo and lto USE flags by default This updated the make.conf.lto file to enable the pgo and lto USE flags by default. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/make.conf.lto | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-config/ltoize/files/make.conf.lto b/sys-config/ltoize/files/make.conf.lto index 9bb6e106..c07ffe4f 100644 --- a/sys-config/ltoize/files/make.conf.lto +++ b/sys-config/ltoize/files/make.conf.lto @@ -75,4 +75,5 @@ source /etc/portage/make.conf.lto.defines #Thanks to issue #49, no action necessary for preventing stripping of static libraries +USE="lto pgo" CFLAGS="-O3 ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${SEMINTERPOS} ${FLTO} -fuse-linker-plugin" From d0786beace3683c5d64526f65ee192a908dd9bdd Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 17:01:28 -0500 Subject: [PATCH 07/63] feat: default to using override-flagomatic flag This makes the override-flagomatic flag enabled in the ebuild by default, without changing the default behavior. This was done by adding LTO_ENABLE_FLAGOMATIC=yes to make.conf.lto. This allows the user to now use the flag-o-matic.conf file to disable flagomatic instead of using it to enable it. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/make.conf.lto | 1 + sys-config/ltoize/ltoize-0.10.0.ebuild | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys-config/ltoize/files/make.conf.lto b/sys-config/ltoize/files/make.conf.lto index c07ffe4f..9d11bd49 100644 --- a/sys-config/ltoize/files/make.conf.lto +++ b/sys-config/ltoize/files/make.conf.lto @@ -76,4 +76,5 @@ source /etc/portage/make.conf.lto.defines #Thanks to issue #49, no action necessary for preventing stripping of static libraries USE="lto pgo" +LTO_ENABLE_FLAGOMATIC=yes CFLAGS="-O3 ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${SEMINTERPOS} ${FLTO} -fuse-linker-plugin" diff --git a/sys-config/ltoize/ltoize-0.10.0.ebuild b/sys-config/ltoize/ltoize-0.10.0.ebuild index a348f5ab..fd360f46 100644 --- a/sys-config/ltoize/ltoize-0.10.0.ebuild +++ b/sys-config/ltoize/ltoize-0.10.0.ebuild @@ -16,7 +16,7 @@ SRC_URI="" LICENSE="GPL-2+" SLOT="0" -IUSE="clang keep-nocommon override-flagomatic" +IUSE="clang keep-nocommon +override-flagomatic" #portage-bashrc-mv can be obtained from mv overlay DEPEND=" From 1dad4f2c189a2cbe0601f237dce148ab27a11101 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 17:10:22 -0500 Subject: [PATCH 08/63] fix: sys-devel/binutils workarounds sys-devel/binutils handles its own LTO, so we need to disable the flags we add ourselves for it. Graphite and ipa-pta are tested to work, but flag-o-matic needs disabled for them to be applied. devirtualize-at-ltrans breaks the tests. no-semantic-interposition breaks the tests. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/devirtualize-at-ltrans.conf | 1 + sys-config/ltoize/files/package.cflags/flag-o-matic.conf | 1 + sys-config/ltoize/files/package.cflags/lto.conf | 1 + .../ltoize/files/package.cflags/no-semantic-interposition.conf | 1 + 4 files changed, 4 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf b/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf index 275e2c5d..cd1ff35f 100644 --- a/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf +++ b/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf @@ -1,2 +1,3 @@ # BEGIN: -fdevirtualize-at-ltrans workarounds +sys-devel/binutils *FLAGS-="${DEVIRTLTO}" # tests fail when present # END: -fdevirtualize-at-ltrans workarounds diff --git a/sys-config/ltoize/files/package.cflags/flag-o-matic.conf b/sys-config/ltoize/files/package.cflags/flag-o-matic.conf index f7cd92eb..de336b89 100644 --- a/sys-config/ltoize/files/package.cflags/flag-o-matic.conf +++ b/sys-config/ltoize/files/package.cflags/flag-o-matic.conf @@ -1,2 +1,3 @@ # BEGIN: override-flagomatic workarounds +sys-devel/binutils LTO_ENABLE_FLAGOMATIC=no # needed to enable graphite and ipa-pta # END: override-flagomatic workarounds diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 532471f3..8e4470e6 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -12,6 +12,7 @@ # BEGIN: Build Workarounds # Packages which require build workarounds to be built with LTO that can be resolved directly in *FLAGS +sys-devel/binutils *FLAGS-="-flto*" # package handles its own LTO and setting it here breaks that # END: Build Workarounds # BEGIN: Misc Workarounds diff --git a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf index 587f7daf..83f20fc0 100644 --- a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf +++ b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf @@ -1,2 +1,3 @@ # BEGIN: Semantic Interposition workarounds +sys-devel/binutils *FLAGS-="${SEMINTERPOS}" # tests fail when present # END: Semantic Interposition Workarounds From 285405eae02c8af87276091fc8a134cf335aff34 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 17:42:28 -0500 Subject: [PATCH 09/63] fix: correct typo in flag-o-matic.conf symlink The symlink was incorrectly named wflag-o-matic.conf. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/ltoize-0.10.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-config/ltoize/ltoize-0.10.0.ebuild b/sys-config/ltoize/ltoize-0.10.0.ebuild index fd360f46..f8512590 100644 --- a/sys-config/ltoize/ltoize-0.10.0.ebuild +++ b/sys-config/ltoize/ltoize-0.10.0.ebuild @@ -122,7 +122,7 @@ pkg_preinst() { ewarn "Installing bashrc.d hook to override strip-flags and replace-flags functions in flag-o-matic. This is an experimental feature!" dosym "${LTO_PORTAGE_DIR}/bashrc.d/42-lto-flag-o-matic.sh" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/bashrc.d/42-lto-flag-o-matic.sh" dosym "${LTO_PORTAGE_DIR}/package.cflags/untested-flag-o-matic.conf" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/untested-flag-o-matic.conf" - dosym "${LTO_PORTAGE_DIR}/package.cflags/flag-o-matic.conf" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/wflag-o-matic.conf" + dosym "${LTO_PORTAGE_DIR}/package.cflags/flag-o-matic.conf" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/flag-o-matic.conf" fi elog "Installing bashrc.d hook symlink to override package libtool lt_cv_sys_global_symbol_pipe and lt_cv_sys_global_symbol_to_cdecl" From 9901e9f59457072c12b86b9be748e45e1a17dde2 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 17:43:24 -0500 Subject: [PATCH 10/63] fix: remove dev-lang/python workaround This was tested to be unneeded, all python tests passed. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/untested-optimizations.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index f73a1986..c706c047 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -11,7 +11,6 @@ # BEGIN: Untested -Ofast workarounds # app-editors/emacs *FLAGS+='-fno-finite-math-only' # explicitly required by the ebuild -# dev-lang/python *FLAGS+='-fno-finite-math-only' # instrumentation tests hang/segfault during emerge # dev-lang/R *FLAGS+='-fno-finite-math-only' # R itself compiles fine, but runtime errors cause installation of R library tools to fail during emerge # dev-python/numpy /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' /-funsafe-math-optimizations/'${SAFER_UNSAFE_MATH_OPTS}' *FLAGS-='-ffinite-math-only' # no compilation error, but -funsafe-math-optimizations (implied by -Ofast or -ffast-math) causes an undefined symbol error when trying to import numpy in python; '-ffinite-math-only' causes incorrect runtime handling of infinite values # dev-python/pillow *FLAGS+='-fno-finite-math-only' # compiles fine but causes `import matplotlib.pyplot` to fail with `undefined symbol: __log_finite` From c7c56246170d14e9d757f5d3247538579ff2eec2 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 17:48:32 -0500 Subject: [PATCH 11/63] fix: remove gold linker workarounds The gold linker has not be recommended for use with GentooLTO for some time. This removes the workarounds for it. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/untested-use-ld.conf | 7 ------- sys-config/ltoize/files/package.cflags/use-ld.conf | 2 -- sys-config/ltoize/ltoize-0.10.0.ebuild | 2 -- 3 files changed, 11 deletions(-) delete mode 100644 sys-config/ltoize/files/package.cflags/untested-use-ld.conf delete mode 100644 sys-config/ltoize/files/package.cflags/use-ld.conf diff --git a/sys-config/ltoize/files/package.cflags/untested-use-ld.conf b/sys-config/ltoize/files/package.cflags/untested-use-ld.conf deleted file mode 100644 index 452e1b9c..00000000 --- a/sys-config/ltoize/files/package.cflags/untested-use-ld.conf +++ /dev/null @@ -1,7 +0,0 @@ -# BEGIN: Untested GOLD linker workarounds -# dev-util/kbuild *FLAGS+="-fuse-ld=bfd" -# games-emulation/pcsx2 *FLAGS+="-fuse-ld=bfd" -# media-libs/libcaca *FLAGS+="-fuse-ld=bfd" -# net-misc/curl *FLAGS+="-fuse-ld=bfd" -# >=sys-libs/libcap-2.28 *FLAGS+="-fuse-ld=bfd" # Issue #453 -# END: Untested GOLD linker workarounds diff --git a/sys-config/ltoize/files/package.cflags/use-ld.conf b/sys-config/ltoize/files/package.cflags/use-ld.conf deleted file mode 100644 index c335e989..00000000 --- a/sys-config/ltoize/files/package.cflags/use-ld.conf +++ /dev/null @@ -1,2 +0,0 @@ -# BEGIN: GOLD linker workarounds -# END: GOLD linker workarounds diff --git a/sys-config/ltoize/ltoize-0.10.0.ebuild b/sys-config/ltoize/ltoize-0.10.0.ebuild index f8512590..28f09718 100644 --- a/sys-config/ltoize/ltoize-0.10.0.ebuild +++ b/sys-config/ltoize/ltoize-0.10.0.ebuild @@ -73,7 +73,6 @@ pkg_preinst() { optimizations.conf portage-bashrc-mv.conf tls-dialect.conf - use-ld.conf untested-cmake-makefile.conf untested-devirtualize-at-ltrans.conf untested-graphite.conf @@ -85,7 +84,6 @@ pkg_preinst() { untested-optimizations.conf untested-portage-bashrc-mv.conf untested-tls-dialect.conf - untested-use-ld.conf ) #Install make.conf settings From fe8644cb78c76bac010b1ee8de7d0f3ee3184bb9 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 17:52:29 -0500 Subject: [PATCH 12/63] fix: remove sys-apps/acl workarounds This was built without the workaround and tested to work correctly. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/untested-lto.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf index 6676309e..5079d331 100644 --- a/sys-config/ltoize/files/package.cflags/untested-lto.conf +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -55,7 +55,6 @@ # net-wireless/aircrack-ng *FLAGS-=-flto* # sci-electronics/kicad *FLAGS-=-flto* # Issue #168 # dev-python/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-cluster/ceph *FLAGS-=-flto* # linking error during compilation From d848a51f175aeed27c3e4695861f7d57faa2b7c0 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 17:53:41 -0500 Subject: [PATCH 13/63] fix: remove sys-apps/coreutils workarounds No isues were encountered when building this without the workarounds. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/untested-optimizations.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index c706c047..4ad102c4 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -21,7 +21,6 @@ # media-video/mpv /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # causes incorrect behavior (black screen) when enabling interpolation or downscaling # net-analyzer/rrdtool *FLAGS+='-fno-finite-math-only' # configure fails due to non-compliant IEEE arithmetic # net-libs/nodejs *FLAGS+='-fno-finite-math-only' # compiles fine but `npm` returns error whenever it starts running -# >=sys-apps/coreutils-8.31 *FLAGS+='-fno-finite-math-only' # causes multiple definition of `minus_zero` error during linking # >=sys-apps/groff-1.22.4 *FLAGS+='-fsigned-zeros' # causes conflicting declaration of `signbit` compilation error # >=sys-devel/llvm-10.0.0 *FLAGS+='-fno-finite-math-only' # compiles fine but causes clang to fail to emerge with ``undefined reference to `__log10_finite'`` # >=sys-libs/glibc-2.30 /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled From ff0126425227a024a6b6bac3a2e0ad3562a58f40 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 17:54:26 -0500 Subject: [PATCH 14/63] fix: remove sys-apps/groff workarounds No issues were encountered building this without workarounds. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/untested-optimizations.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index 4ad102c4..ac559c73 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -21,7 +21,6 @@ # media-video/mpv /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # causes incorrect behavior (black screen) when enabling interpolation or downscaling # net-analyzer/rrdtool *FLAGS+='-fno-finite-math-only' # configure fails due to non-compliant IEEE arithmetic # net-libs/nodejs *FLAGS+='-fno-finite-math-only' # compiles fine but `npm` returns error whenever it starts running -# >=sys-apps/groff-1.22.4 *FLAGS+='-fsigned-zeros' # causes conflicting declaration of `signbit` compilation error # >=sys-devel/llvm-10.0.0 *FLAGS+='-fno-finite-math-only' # compiles fine but causes clang to fail to emerge with ``undefined reference to `__log10_finite'`` # >=sys-libs/glibc-2.30 /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled # www-client/firefox /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # won't build with flags activated by -ffast-math on Clang, requires investigation From b0cd07c73be97444cf671472d52d878533427c76 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 18:02:36 -0500 Subject: [PATCH 15/63] fix: remove no-common workarounds The no-common workarounds were primarily needed for GCC 9. Reviewing the GentooLTO issue tracker, and GentooLTO#484 in particular, it seems that GCC 10 and binutils 2.34 have resolved the issues. This commit removes the no-common workarounds and the keep-nocommon USE flag. Signed-off-by: Jaremy Hatler --- .../ltoize/files/bashrc.d/43-lto-no-common.sh | 16 --- sys-config/ltoize/files/make.conf.lto.defines | 6 -- .../package.cflags/no-common-libtool.conf | 2 - .../files/package.cflags/no-common.conf | 7 -- .../untested-no-common-libtool.conf | 34 ------ .../package.cflags/untested-no-common.conf | 101 ------------------ sys-config/ltoize/ltoize-0.10.0.ebuild | 8 +- 7 files changed, 1 insertion(+), 173 deletions(-) delete mode 100644 sys-config/ltoize/files/bashrc.d/43-lto-no-common.sh delete mode 100644 sys-config/ltoize/files/package.cflags/no-common-libtool.conf delete mode 100644 sys-config/ltoize/files/package.cflags/no-common.conf delete mode 100644 sys-config/ltoize/files/package.cflags/untested-no-common-libtool.conf delete mode 100644 sys-config/ltoize/files/package.cflags/untested-no-common.conf diff --git a/sys-config/ltoize/files/bashrc.d/43-lto-no-common.sh b/sys-config/ltoize/files/bashrc.d/43-lto-no-common.sh deleted file mode 100644 index 203af9eb..00000000 --- a/sys-config/ltoize/files/bashrc.d/43-lto-no-common.sh +++ /dev/null @@ -1,16 +0,0 @@ -#From #484, contributed by nivedita76 and pchome, needed for some packages that have a weird libtool setup. -#Essentially, these two variables don't get set properly when `-flto` and `-fno-common` are used together. -#This is a hack to set them ourselves. Define NOCOMMON_OVERRIDE_LIBTOOL=yes to activate it per-package or globally -#via make.conf. - -nocommon_configure() { - if [[ "${NOCOMMON_OVERRIDE_LIBTOOL}" == "yes" ]]; then - ewarn "lto-overlay: libtool global_symbol_pipe and global_symbol_to_cdecl OVERRIDDEN" - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'" - export lt_cv_sys_global_symbol_pipe - lt_cv_sys_global_symbol_to_cdecl="" - export lt_cv_sys_global_symbol_to_cdecl - fi -} - -BashrcdPhase configure nocommon_configure diff --git a/sys-config/ltoize/files/make.conf.lto.defines b/sys-config/ltoize/files/make.conf.lto.defines index 5b7193ef..dab4d01f 100644 --- a/sys-config/ltoize/files/make.conf.lto.defines +++ b/sys-config/ltoize/files/make.conf.lto.defines @@ -42,12 +42,6 @@ SEMINTERPOS="-fno-semantic-interposition" #Similarly if interposition happens for variables, the constructor of the variable will be the same. #The flag has no effect for functions explicitly declared inline (where it is never allowed for interposition to change semantics) and for symbols explicitly declared weak. -NOCOMMON="-fno-common" - -# This option only affects C code. Only non-conformant C code needs -fcommon, which is enabled by default. Clear Linux leaves this flag off by default. -# This is enabled by default with GCC 10 and is kept here only for documentation purposes. Use `-fcommon` to restore -# GCC 9.x behaviour and below. - SAFEST_FAST_MATH="-fno-math-errno -fno-trapping-math" SAFER_UNSAFE_MATH_OPTS="-fno-signed-zeros -fno-trapping-math -fassociative-math -freciprocal-math" SAFER_FAST_MATH="${SAFER_UNSAFE_MATH_OPTS} -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fcx-limited-range -fexcess-precision=fast" diff --git a/sys-config/ltoize/files/package.cflags/no-common-libtool.conf b/sys-config/ltoize/files/package.cflags/no-common-libtool.conf deleted file mode 100644 index 720ee7d9..00000000 --- a/sys-config/ltoize/files/package.cflags/no-common-libtool.conf +++ /dev/null @@ -1,2 +0,0 @@ -# BEGIN: -fno-common libtool hack workarounds (#484) -# END: -fno-common libtool hack workarounds (#484) NOCOMMON_OVERRIDE_LIBTOOL=yes diff --git a/sys-config/ltoize/files/package.cflags/no-common.conf b/sys-config/ltoize/files/package.cflags/no-common.conf deleted file mode 100644 index a7f4046c..00000000 --- a/sys-config/ltoize/files/package.cflags/no-common.conf +++ /dev/null @@ -1,7 +0,0 @@ -# These workarounds apply to GCC 9.x and below. `-fno-common` is default on GCC 10 now -# and many ebuilds have already been patched, with Gentoo upstream leading the charge. -# If you are having trouble with a package in this list, try explicitly setting it to -fcommon. -# If that works, please file an issue at the GentooLTO GitHub. - -# BEGIN: -fno-common workarounds -# END: -fno-common workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-no-common-libtool.conf b/sys-config/ltoize/files/package.cflags/untested-no-common-libtool.conf deleted file mode 100644 index 7cddcfa4..00000000 --- a/sys-config/ltoize/files/package.cflags/untested-no-common-libtool.conf +++ /dev/null @@ -1,34 +0,0 @@ -# BEGIN: Untested -fno-common libtool hack workarounds (#484) -# app-crypt/libsecret NOCOMMON_OVERRIDE_LIBTOOL=yes -# app-text/enchant NOCOMMON_OVERRIDE_LIBTOOL=yes -# app-text/evince NOCOMMON_OVERRIDE_LIBTOOL=yes -# dev-libs/dbus-glib NOCOMMON_OVERRIDE_LIBTOOL=yes -# dev-libs/ffcall NOCOMMON_OVERRIDE_LIBTOOL=yes -# dev-libs/jansson NOCOMMON_OVERRIDE_LIBTOOL=yes -# dev-libs/libappindicator NOCOMMON_OVERRIDE_LIBTOOL=yes -# dev-libs/libatasmart NOCOMMON_OVERRIDE_LIBTOOL=yes -# dev-libs/libdbusmenu NOCOMMON_OVERRIDE_LIBTOOL=yes -# dev-libs/libindicator NOCOMMON_OVERRIDE_LIBTOOL=yes -# dev-python/dbus-python NOCOMMON_OVERRIDE_LIBTOOL=yes -# dev-util/umockdev NOCOMMON_OVERRIDE_LIBTOOL=yes -# gnome-base/libglade NOCOMMON_OVERRIDE_LIBTOOL=yes -# lxde-base/menu-cache NOCOMMON_OVERRIDE_LIBTOOL=yes -# media-gfx/ttfautohint NOCOMMON_OVERRIDE_LIBTOOL=yes -# media-libs/libdvdnav NOCOMMON_OVERRIDE_LIBTOOL=yes -# media-libs/libdvdread NOCOMMON_OVERRIDE_LIBTOOL=yes -# media-plugins/gst-plugins-libav NOCOMMON_OVERRIDE_LIBTOOL=yes -# media-plugins/gst-plugins-vaapi NOCOMMON_OVERRIDE_LIBTOOL=yes -# media-sound/sox NOCOMMON_OVERRIDE_LIBTOOL=yes -# media-sound/wavpack NOCOMMON_OVERRIDE_LIBTOOL=yes -# media-video/vlc NOCOMMON_OVERRIDE_LIBTOOL=yes -# net-libs/libmbim NOCOMMON_OVERRIDE_LIBTOOL=yes -# net-misc/modemmanager NOCOMMON_OVERRIDE_LIBTOOL=yes -# sys-apps/accountsservice NOCOMMON_OVERRIDE_LIBTOOL=yes -# sys-apps/usbredir NOCOMMON_OVERRIDE_LIBTOOL=yes -# sys-auth/polkit NOCOMMON_OVERRIDE_LIBTOOL=yes -# sys-boot/plymouth NOCOMMON_OVERRIDE_LIBTOOL=yes -# sys-fs/udisks NOCOMMON_OVERRIDE_LIBTOOL=yes -# sys-power/upower NOCOMMON_OVERRIDE_LIBTOOL=yes -# x11-libs/libfm NOCOMMON_OVERRIDE_LIBTOOL=yes -# x11-libs/libfm-extra NOCOMMON_OVERRIDE_LIBTOOL=yes -# END: Untested -fno-common libtool hack workarounds (#484) NOCOMMON_OVERRIDE_LIBTOOL=yes diff --git a/sys-config/ltoize/files/package.cflags/untested-no-common.conf b/sys-config/ltoize/files/package.cflags/untested-no-common.conf deleted file mode 100644 index f259c0d1..00000000 --- a/sys-config/ltoize/files/package.cflags/untested-no-common.conf +++ /dev/null @@ -1,101 +0,0 @@ -# These workarounds apply to GCC 9.x and below. `-fno-common` is default on GCC 10 now -# and many ebuilds have already been patched, with Gentoo upstream leading the charge. -# If you are having trouble with a package in this list, try explicitly setting it to -fcommon. -# If that works, please file an issue at the GentooLTO GitHub. - -# BEGIN: Untested -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/erlang *FLAGS-="${NOCOMMON}" -# dev-lang/orc *FLAGS-="${NOCOMMON}" -# dev-lang/R *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/bluez-alsa *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}" -# net-vpn/libreswan *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}" -# Date: Wed, 27 Dec 2023 18:18:25 -0500 Subject: [PATCH 16/63] fix: remove tls-dialect workarounds It appears that the tls-dialect setting in GCC has very little testing and is not used very much. This removes the workarounds for it and I'll not be supporting it in the future. RefS: https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg170586.html Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/tls-dialect.conf | 2 -- .../files/package.cflags/untested-tls-dialect.conf | 12 ------------ sys-config/ltoize/ltoize-0.10.0.ebuild | 2 -- 3 files changed, 16 deletions(-) delete mode 100644 sys-config/ltoize/files/package.cflags/tls-dialect.conf delete mode 100644 sys-config/ltoize/files/package.cflags/untested-tls-dialect.conf diff --git a/sys-config/ltoize/files/package.cflags/tls-dialect.conf b/sys-config/ltoize/files/package.cflags/tls-dialect.conf deleted file mode 100644 index decfcf6c..00000000 --- a/sys-config/ltoize/files/package.cflags/tls-dialect.conf +++ /dev/null @@ -1,2 +0,0 @@ -# BEGIN: TLS dialect workarounds -# END: TLS dialect workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-tls-dialect.conf b/sys-config/ltoize/files/package.cflags/untested-tls-dialect.conf deleted file mode 100644 index 9f52436c..00000000 --- a/sys-config/ltoize/files/package.cflags/untested-tls-dialect.conf +++ /dev/null @@ -1,12 +0,0 @@ -# BEGIN: Untested TLS dialect workarounds -# www-client/firefox *FLAGS-="-mtls-dialect=gnu2" -# sys-fs/eudev *FLAGS-="-mtls-dialect=gnu2" -# sys-libs/glibc *FLAGS-="-mtls-dialect=gnu2" -# dev-lang/mono *FLAGS-="-mtls-dialect=gnu2" -# dev-util/lldb *FLAGS-="-mtls-dialect=gnu2" -# dev-db/firebird *FLAGS-="-mtls-dialect=gnu2" -# dev-lang/spidermonkey *FLAGS-="-mtls-dialect=gnu2" -# sys-fs/btrfs-progs *FLAGS-="-mtls-dialect=gnu2" -# sys-boot/systemd-boot *FLAGS-="-mtls-dialect=gnu2" -# net-libs/libtorrent-rasterbar *FLAGS-="-mtls-dialect=gnu2" # causes memory corruption at runtime -# END: Untested TLS dialect workarounds diff --git a/sys-config/ltoize/ltoize-0.10.0.ebuild b/sys-config/ltoize/ltoize-0.10.0.ebuild index 1928463a..9fe14445 100644 --- a/sys-config/ltoize/ltoize-0.10.0.ebuild +++ b/sys-config/ltoize/ltoize-0.10.0.ebuild @@ -72,7 +72,6 @@ pkg_preinst() { no-semantic-interposition.conf optimizations.conf portage-bashrc-mv.conf - tls-dialect.conf untested-cmake-makefile.conf untested-devirtualize-at-ltrans.conf untested-graphite.conf @@ -83,7 +82,6 @@ pkg_preinst() { untested-no-semantic-interposition.conf untested-optimizations.conf untested-portage-bashrc-mv.conf - untested-tls-dialect.conf ) #Install make.conf settings From 550501afa7826d4cf1a19b4000f95c1ffd0f6428 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 18:24:21 -0500 Subject: [PATCH 17/63] fix: remove prelink support This removes the prelink support from this project. It seems to have few users left and is not worth the effort to maintain. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/make.conf.lto.defines | 3 +- .../prelink/experimental-glibc-231.patch | 16 ---------- .../patches/sys-devel/prelink/noplt.patch | 31 ------------------- 3 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 sys-config/ltoize/files/patches/sys-devel/prelink/experimental-glibc-231.patch delete mode 100644 sys-config/ltoize/files/patches/sys-devel/prelink/noplt.patch diff --git a/sys-config/ltoize/files/make.conf.lto.defines b/sys-config/ltoize/files/make.conf.lto.defines index dab4d01f..a08a47be 100644 --- a/sys-config/ltoize/files/make.conf.lto.defines +++ b/sys-config/ltoize/files/make.conf.lto.defines @@ -58,5 +58,4 @@ DEVIRTLTO="-fdevirtualize-at-ltrans" NOPLT="-fno-plt" #This option omits the PLT from the executable, making calls go through the GOT directly. -#It inhibits lazy binding, so this is not enabled by default. If you use prelink, this is -#strictly better than lazy binding. +#It inhibits lazy binding, so this is not enabled by default. diff --git a/sys-config/ltoize/files/patches/sys-devel/prelink/experimental-glibc-231.patch b/sys-config/ltoize/files/patches/sys-devel/prelink/experimental-glibc-231.patch deleted file mode 100644 index 984365ea..00000000 --- a/sys-config/ltoize/files/patches/sys-devel/prelink/experimental-glibc-231.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/gather.c b/src/gather.c -index 277f1b5..3cdc7fd 100644 ---- a/src/gather.c -+++ b/src/gather.c -@@ -189,6 +189,11 @@ gather_deps (DSO *dso, struct prelink_entry *ent) - if (line[n - 1] == '\n') - line[n - 1] = '\0'; - -+ if (strncmp (line, "lookup", sizeof ("lookup") - 1) == 0) -+ { -+ continue; -+ } -+ - p = strstr (line, " => "); - if (p) - { diff --git a/sys-config/ltoize/files/patches/sys-devel/prelink/noplt.patch b/sys-config/ltoize/files/patches/sys-devel/prelink/noplt.patch deleted file mode 100644 index 64bf0943..00000000 --- a/sys-config/ltoize/files/patches/sys-devel/prelink/noplt.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2cc1d58caaba994855516b50d5af057854c94fe8 Mon Sep 17 00:00:00 2001 -From: Shane Peelar -Date: Sat, 25 May 2019 08:45:45 -0400 -Subject: [PATCH] arch-x86_64.c: Make assert conditional - -Make the assert in arch_prelink a condition instead of an assert, -keeping things consistent with the other arches. This makes -prelink not bail out on `-fno-plt` executables. - -Signed-off-by: Shane Peelar ---- - src/arch-x86_64.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/arch-x86_64.c b/src/arch-x86_64.c -index 2f6c551..aa739e6 100644 ---- a/src/arch-x86_64.c -+++ b/src/arch-x86_64.c -@@ -418,7 +418,8 @@ x86_64_arch_prelink (struct prelink_info *info) - ".plt")) - break; - -- assert (i < dso->ehdr.e_shnum); -+ if (i == dso->ehdr.e_shnum) -+ return 0; - data = dso->shdr[i].sh_addr + 0x16; - write_le64 (dso, dso->info[DT_PLTGOT] + 8, data); - } --- -2.21.0 - From 3faf1b1519a548f318bb211541f47e2503e296a8 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 18:26:05 -0500 Subject: [PATCH 18/63] fix: remove no-plt support This removes the support and workarounds for the no-plt flag. Usage of the flag interferes with lazy binding and doesn't seem to be worth the effort to maintain. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/make.conf.lto.defines | 5 ----- sys-config/ltoize/files/package.cflags/no-plt.conf | 2 -- sys-config/ltoize/files/package.cflags/untested-no-plt.conf | 6 ------ sys-config/ltoize/ltoize-0.10.0.ebuild | 2 -- 4 files changed, 15 deletions(-) delete mode 100644 sys-config/ltoize/files/package.cflags/no-plt.conf delete mode 100644 sys-config/ltoize/files/package.cflags/untested-no-plt.conf diff --git a/sys-config/ltoize/files/make.conf.lto.defines b/sys-config/ltoize/files/make.conf.lto.defines index a08a47be..8a58e18d 100644 --- a/sys-config/ltoize/files/make.conf.lto.defines +++ b/sys-config/ltoize/files/make.conf.lto.defines @@ -54,8 +54,3 @@ SAFER_FAST_MATH="${SAFER_UNSAFE_MATH_OPTS} -fno-math-errno -ffinite-math-only -f DEVIRTLTO="-fdevirtualize-at-ltrans" #This allows GCC to perform devirtualization across object file boundaries using LTO. - -NOPLT="-fno-plt" - -#This option omits the PLT from the executable, making calls go through the GOT directly. -#It inhibits lazy binding, so this is not enabled by default. diff --git a/sys-config/ltoize/files/package.cflags/no-plt.conf b/sys-config/ltoize/files/package.cflags/no-plt.conf deleted file mode 100644 index 681a9047..00000000 --- a/sys-config/ltoize/files/package.cflags/no-plt.conf +++ /dev/null @@ -1,2 +0,0 @@ -# BEGIN: No PLT workarounds -# END: No PLT workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-no-plt.conf b/sys-config/ltoize/files/package.cflags/untested-no-plt.conf deleted file mode 100644 index 44c79de5..00000000 --- a/sys-config/ltoize/files/package.cflags/untested-no-plt.conf +++ /dev/null @@ -1,6 +0,0 @@ -# BEGIN: Untested No PLT workarounds -# app-emulation/wine-staging *FLAGS-="-fno-plt" -# app-emulation/wine-vanilla *FLAGS-="-fno-plt" -# dev-db/mysql-connector-c *FLAGS-="-fno-plt" # SIGABRT during compile if not used -# sys-libs/compiler-rt-sanitizers *FLAGS-="-fno-plt" -# END: Untested No PLT workarounds diff --git a/sys-config/ltoize/ltoize-0.10.0.ebuild b/sys-config/ltoize/ltoize-0.10.0.ebuild index 9fe14445..fa7ad8c0 100644 --- a/sys-config/ltoize/ltoize-0.10.0.ebuild +++ b/sys-config/ltoize/ltoize-0.10.0.ebuild @@ -68,7 +68,6 @@ pkg_preinst() { ipa-pta.conf lto.conf no-common-libtool.conf - no-plt.conf no-semantic-interposition.conf optimizations.conf portage-bashrc-mv.conf @@ -78,7 +77,6 @@ pkg_preinst() { untested-ipa-pta.conf untested-lto.conf untested-no-common-libtool.conf - untested-no-plt.conf untested-no-semantic-interposition.conf untested-optimizations.conf untested-portage-bashrc-mv.conf From f5587647aef6a16b57d11c277802968271ea076e Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 18:27:59 -0500 Subject: [PATCH 19/63] fix: remove dev-lang/python from this repo As of Python 3.12, the gentoo repo supports both an LTO and PGO flag. Maintaining a distinct python package in this repo is no longer necessary. Signed-off-by: Jaremy Hatler --- dev-lang/python/Manifest | 18 - ...emove-testPeek-test.test_socket.RDST.patch | 37 -- .../python-3.7.5-fix-regrtest-hang.patch | 174 -------- dev-lang/python/files/pydoc.conf | 6 - dev-lang/python/files/pydoc.init | 24 -- .../python/files/python-2.7.15-PGO-r1.patch | 78 ---- dev-lang/python/metadata.xml | 15 - dev-lang/python/profile.patch | 39 -- dev-lang/python/python-2.7.18_p11-r100.ebuild | 374 ------------------ dev-lang/python/python-3.10.0_beta3-r1.ebuild | 362 ----------------- dev-lang/python/python-3.6.14-r1.ebuild | 353 ----------------- dev-lang/python/python-3.7.11-r1.ebuild | 346 ---------------- dev-lang/python/python-3.8.11-r1.ebuild | 351 ---------------- dev-lang/python/python-3.9.6-r1.ebuild | 360 ----------------- metadata/pkg_desc_index | 1 - 15 files changed, 2538 deletions(-) delete mode 100644 dev-lang/python/Manifest delete mode 100644 dev-lang/python/files/clearlinux-pkgs/python-3.7.5-0001-test_socket.py-remove-testPeek-test.test_socket.RDST.patch delete mode 100644 dev-lang/python/files/clearlinux-pkgs/python-3.7.5-fix-regrtest-hang.patch delete mode 100644 dev-lang/python/files/pydoc.conf delete mode 100644 dev-lang/python/files/pydoc.init delete mode 100644 dev-lang/python/files/python-2.7.15-PGO-r1.patch delete mode 100644 dev-lang/python/metadata.xml delete mode 100644 dev-lang/python/profile.patch delete mode 100644 dev-lang/python/python-2.7.18_p11-r100.ebuild delete mode 100644 dev-lang/python/python-3.10.0_beta3-r1.ebuild delete mode 100644 dev-lang/python/python-3.6.14-r1.ebuild delete mode 100644 dev-lang/python/python-3.7.11-r1.ebuild delete mode 100644 dev-lang/python/python-3.8.11-r1.ebuild delete mode 100644 dev-lang/python/python-3.9.6-r1.ebuild diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest deleted file mode 100644 index a5a67acc..00000000 --- a/dev-lang/python/Manifest +++ /dev/null @@ -1,18 +0,0 @@ -DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381998256a1a002d316b38288349884d5960de35c49352d03129ed0bae599e641ec2225898158ebce50a7a2fd74d2c SHA512 a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c -DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8 -DIST Python-3.10.0b3.tar.xz 18640292 BLAKE2B 29af2d0e042714d6cfed08f6ecc5846dded1bec9a3efce01cca740e7dbfb036c06389ba638cd984410613067021bdd4291cb8f1fda353ed21444ee4dc4404a89 SHA512 ef0dc5eddb5f9702ab88faa2827455347caa81ab6c03192d6e37c968a40c53ab485d5c923905c511d19bc35e10129aa302f6733e0a7d296da8f725367dd1b258 -DIST Python-3.10.0b3.tar.xz.asc 833 BLAKE2B 8978db8f2443e4a9d8f8997b64a731f7d8d5cdc9028dfc8812c3363298777aa227d9dd896a518e08f2793fbcc93a71bac4b422277b3ecd2ee4210b03e665385f SHA512 6b8d2caf753f0d92019e18d1441e323a44aff06ee8bdc272572a67359dc4bece833db56b9318c91962d39ee4d09bf701b548d71ae02c4b64f3c21f1c23ed1d36 -DIST Python-3.6.14.tar.xz 17218148 BLAKE2B efe655cb907ffa678ca135f88ba9d867e523969ad82dbc09ffb6d8d383824a4b43c525e156a3c35484a526b4b3ea755109e5ef15d17852d44e3351c307fc5e91 SHA512 15b82b7285db97cb27a6fcd57ce9e258fdf8dbdb2f00e22e4331161b8557c8244342546c4143e84c72730759e0276770396b6ca5bb7cf87310cca8e175423006 -DIST Python-3.6.14.tar.xz.asc 833 BLAKE2B 81c79dca5728b21b8c2badcaa1242836f1cf13984bb755463cfe9e4fd96a02ebf31f1a9239759a937c6d6a04c18bfc682a82cb0ab2e5a473de153423a7248c9c SHA512 600bf504f2c0d3ce7d1e8e953b4f27a7a7c996b7b9cd70efb876178fa5424130bff5414d5ac7deb8b45103ed417fd40d830613db39750d35a0c967c8fdfea50d -DIST Python-3.7.11.tar.xz 17393380 BLAKE2B 6394d69935950366da7c4cecd4816d76254170d5313adeb4de9edddae13bda7dea373308517c2abe00cb7eeea8eb428619124feed8df858f9bb904bd423e96d6 SHA512 b8d8c6958444ee9bdd59f0804f7e61d9657c0805c7c58c3352d1c1efb33ba2be8d3485cd2656a2b2b99618a439879687a918f57dfdd125e989af637043600a59 -DIST Python-3.7.11.tar.xz.asc 833 BLAKE2B 8af6b3e58b607a34c91f57af2fbe9c3f3c7cb6fa5e435e963edd7edcf7649e70c3a76bd346ff8ef1b3c890d8a92d3b2fed27ee01b512c579ff8ce80be61274fb SHA512 f19db95e88c9269174a2b4ac4d8c68fa7ed666b6698af26d2da202e30d145686e8679be763eecba9f8a0c34a207639724094463cffce659c3855ed4b133b0a59 -DIST Python-3.8.11.tar.xz 18437648 BLAKE2B 957c553ced3387d19c1d1baf2eea7d41e9abfbf398c4514f475eadae29336dc02dbd2cdf7b90ab5fee1e49c083a366c113dcd73149445b663fcdf81a3b2b04f6 SHA512 c8c17491b05d83a9f8940474019034780a6b1ff4148654cd62c8f708c539718a0312cf0665efa2b8c42ed773f4306080bd105701a211ed56e6cab40837d5b2df -DIST Python-3.8.11.tar.xz.asc 833 BLAKE2B 52239149331a6529351714db10b5f6b2a37e9a9ce13470e0ab8ae4bf439544878df095995bdc28a534d55039a539c400f532aec8fb7d9b9ce7132167f0e39529 SHA512 40381e83a1bef996333d5044a361ce441c4631725457f8382588e9a86f586a9539ee139b8398aff3d988a317041fa87476f29cf6fcd2b31fe0e9b4cd21ede68a -DIST Python-3.9.6.tar.xz 19051972 BLAKE2B 0d8586b2935088eeab7138cf2210c1a74f1bf7359359d25750af5f69de55eb39c92f518b887a8b749c772ed7d33e85b912928ae6d878514eb58d85ef210f54f0 SHA512 01c529e3207738d8771caeb5ed6217e10745c21aa39832fe3185e1c87fdb6aedead97ce38dbb11e02d873654028bd8071c3f345c18452769520723284efe9dc1 -DIST Python-3.9.6.tar.xz.asc 833 BLAKE2B 41901bfb80a901f2f14e86769e6d08ded8f75656d347201345183162e180e61442da871a1067572a54da579551166a19bf5436e51581bb10cb78afc4d28773fc SHA512 0673c8833f302c829bfde97453c52744f6aa99b4a72520f4cc384d4aa9d6ffd28a1407ceafb0a1ec4462b3aa74b656bf39c67872c4e6a131429ea58c47ad0ecc -DIST python-gentoo-patches-2.7.18_p11.tar.xz 31340 BLAKE2B bdc097b971ab8ec0b60f944002af34f3fff6b681c43515a4fec2fcac1a2c731bf4fcfae2178463103911e2f8cd6bc84d3b56cd0ad61da5c8276278ec9b85a242 SHA512 2a2388c4543267bfb0167f963a22f5141442c9347d9a8806ad6917843e6958d47c8f1933244651c870101b21408c920408fe056efb7a148117c24ab391151d88 -DIST python-gentoo-patches-3.10.0b3.tar.xz 8112 BLAKE2B c6a0517323c5c0d8af998915ccb675a51df19893b9252f9ad195b62f8988fa65ca73894fc8089c37a44f22976f57c49c24c0bf9469b1edb6c3422c4a7be832d8 SHA512 fbc770430259ff482c0a4b89859e2a747fde0f34037829f9cc5a2972345d0b073612db7ef84f382248902e0f9e203f8d8dc07165942356b01f48b23dd4412f64 -DIST python-gentoo-patches-3.6.14.tar.xz 14744 BLAKE2B b9482f9d2b7ada60eff9a5672ed21556c00b473a7cfdb543dce8253fb0ff1539e635a35569478c496012ecde4eef78a257da28f7a80bff99da10249708262229 SHA512 246f83911c8e52ea83a9bf453faa0bc0ea0c29bbf3b666a938e3790c6147f71e617ff9cb27501c5f0b89172eb9e7819e3f2ef0a5bae271cc938d2c0c2b93f7ae -DIST python-gentoo-patches-3.7.11.tar.xz 16708 BLAKE2B 4f74b38f400c20b4112f080447021e7140704b282d6369a1479886740d12a17e7818b52a382a4b115238847bb08df0260b092b6ead491623b869c3d3a56f4cc2 SHA512 b96d7af8c9f7fb4b246a8b66e6440336a7d123678d990dd259d7ffb87d79ce74295ff350e220fee38d1b12f1ca94533899c2d2ce700391b3eac907722a79bba6 -DIST python-gentoo-patches-3.8.11.tar.xz 16932 BLAKE2B aaa1df33997f4077916fb7cca2ec3a2b2ac1c0ead3db7c638a5152a82cfaaf5fc2768a10ac7235c417e25b2b735c53628ec096878f08eef0d211b03f4747103c SHA512 d2639b95c5a32f7145f92e52a94aec7c63f3ed4a66036ff73f052ff6836742d1e1dd7180f8634b65b4a44a10bf336092695bcc2230a7fd8be35bae870ed64b08 -DIST python-gentoo-patches-3.9.6.tar.xz 12432 BLAKE2B f63f39b4667eeb214312aa22142c728a1123e88f49c6de09d15e88434e9d630c5e0e588112d77c5cf1f5f25d0224e4fbf0c370488a908e9015f168d9f85e9eb5 SHA512 3e842fcd8574a7f026e401d725febb2815b2b7ac0a89b952a340c7974b911e81286b542d3de56fe5750296f2ab680415b54b8c35f219975af10354cddb1f257a diff --git a/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-0001-test_socket.py-remove-testPeek-test.test_socket.RDST.patch b/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-0001-test_socket.py-remove-testPeek-test.test_socket.RDST.patch deleted file mode 100644 index 6a038ae5..00000000 --- a/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-0001-test_socket.py-remove-testPeek-test.test_socket.RDST.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 4ccbba674472dcca104fe660c0cd3dd23b6dd66d Mon Sep 17 00:00:00 2001 -From: Juro Bystricky -Date: Thu, 3 Oct 2019 10:46:00 -0700 -Subject: [PATCH] test_socket.py: remove testPeek (test.test_socket.RDSTest) - -This test suffers from a race condition and hangs frequently. -https://bugs.python.org/issue35247 - -Signed-off-by: Juro Bystricky ---- - Lib/test/test_socket.py | 10 ---------- - 1 file changed, 10 deletions(-) - -diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py -index 43929b355e..bcf8be854b 100644 ---- a/Lib/test/test_socket.py -+++ b/Lib/test/test_socket.py -@@ -2011,16 +2011,6 @@ class RDSTest(ThreadedRDSSocketTest): - self.data = b'spam' - self.cli.sendto(self.data, 0, (HOST, self.port)) - -- def testPeek(self): -- data, addr = self.serv.recvfrom(self.bufsize, socket.MSG_PEEK) -- self.assertEqual(self.data, data) -- data, addr = self.serv.recvfrom(self.bufsize) -- self.assertEqual(self.data, data) -- -- def _testPeek(self): -- self.data = b'spam' -- self.cli.sendto(self.data, 0, (HOST, self.port)) -- - @requireAttrs(socket.socket, 'recvmsg') - def testSendAndRecvMsg(self): - data, ancdata, msg_flags, addr = self.serv.recvmsg(self.bufsize) --- -2.23.0 - diff --git a/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-fix-regrtest-hang.patch b/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-fix-regrtest-hang.patch deleted file mode 100644 index 0344a245..00000000 --- a/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-fix-regrtest-hang.patch +++ /dev/null @@ -1,174 +0,0 @@ -Patch pulled from the `3.7` branch, which will be incorporated into a -future 3.7.6 release: -https://github.com/python/cpython/commit/598bfa4d45 - -An equivalent change already landed for 3.8.0, so drop it when moving to -the 3.8 series. -https://github.com/python/cpython/commit/359a1975cb - - -From 598bfa4d457d61431142ad99ecbb9bd10cf314e6 Mon Sep 17 00:00:00 2001 -From: "Miss Islington (bot)" - <31488909+miss-islington@users.noreply.github.com> -Date: Wed, 9 Oct 2019 06:52:34 -0700 -Subject: [PATCH] bpo-37531: regrtest ignores output on timeout (GH-16659) - -bpo-37531, bpo-38207: On timeout, regrtest no longer attempts to call -`popen.communicate() again: it can hang until all child processes -using stdout and stderr pipes completes. Kill the worker process and -ignores its output. - -Reenable test_regrtest.test_multiprocessing_timeout(). - -bpo-37531: Change also the faulthandler timeout of the main process -from 1 minute to 5 minutes, for Python slowest buildbots. -(cherry picked from commit 0ec618af98ac250a91ee9c91f8569e6df6772758) - -Co-authored-by: Victor Stinner ---- - Lib/test/libregrtest/runtest_mp.py | 64 +++++++++++-------- - .../2019-10-08-16-42-05.bpo-37531.7v-_Ca.rst | 5 ++ - 2 files changed, 42 insertions(+), 27 deletions(-) - create mode 100644 Misc/NEWS.d/next/Tests/2019-10-08-16-42-05.bpo-37531.7v-_Ca.rst - -diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py -index 9d5a699852b9c..2770cf93bd7d8 100644 ---- a/Lib/test/libregrtest/runtest_mp.py -+++ b/Lib/test/libregrtest/runtest_mp.py -@@ -22,6 +22,12 @@ - PROGRESS_UPDATE = 30.0 # seconds - assert PROGRESS_UPDATE >= PROGRESS_MIN_TIME - -+# Kill the main process after 5 minutes. It is supposed to write an update -+# every PROGRESS_UPDATE seconds. Tolerate 5 minutes for Python slowest -+# buildbot workers. -+MAIN_PROCESS_TIMEOUT = 5 * 60.0 -+assert MAIN_PROCESS_TIMEOUT >= PROGRESS_UPDATE -+ - # Time to wait until a worker completes: should be immediate - JOIN_TIMEOUT = 30.0 # seconds - -@@ -159,20 +165,6 @@ def mp_result_error(self, test_name, error_type, stdout='', stderr='', - result = TestResult(test_name, error_type, test_time, None) - return MultiprocessResult(result, stdout, stderr, err_msg) - -- def _timedout(self, test_name): -- self._kill() -- -- stdout = stderr = '' -- popen = self._popen -- try: -- stdout, stderr = popen.communicate(timeout=JOIN_TIMEOUT) -- except (subprocess.TimeoutExpired, OSError) as exc: -- print_warning(f"Failed to read {self} output " -- f"(timeout={format_duration(JOIN_TIMEOUT)}): " -- f"{exc!r}") -- -- return self.mp_result_error(test_name, TIMEOUT, stdout, stderr) -- - def _run_process(self, test_name): - self.start_time = time.monotonic() - -@@ -195,23 +187,32 @@ def _run_process(self, test_name): - - try: - stdout, stderr = popen.communicate(timeout=self.timeout) -+ retcode = popen.returncode -+ assert retcode is not None - except subprocess.TimeoutExpired: - if self._stopped: - # kill() has been called: communicate() fails - # on reading closed stdout/stderr - raise ExitThread - -- return self._timedout(test_name) -+ # On timeout, kill the process -+ self._kill() -+ -+ # None means TIMEOUT for the caller -+ retcode = None -+ # bpo-38207: Don't attempt to call communicate() again: on it -+ # can hang until all child processes using stdout and stderr -+ # pipes completes. -+ stdout = stderr = '' - except OSError: - if self._stopped: - # kill() has been called: communicate() fails - # on reading closed stdout/stderr - raise ExitThread - raise -- -- retcode = popen.returncode -- stdout = stdout.strip() -- stderr = stderr.rstrip() -+ else: -+ stdout = stdout.strip() -+ stderr = stderr.rstrip() - - return (retcode, stdout, stderr) - except: -@@ -223,13 +224,10 @@ def _run_process(self, test_name): - self.current_test_name = None - - def _runtest(self, test_name): -- result = self._run_process(test_name) -- -- if isinstance(result, MultiprocessResult): -- # _timedout() case -- return result -+ retcode, stdout, stderr = self._run_process(test_name) - -- retcode, stdout, stderr = result -+ if retcode is None: -+ return self.mp_result_error(test_name, TIMEOUT, stdout, stderr) - - err_msg = None - if retcode != 0: -@@ -248,7 +246,8 @@ def _runtest(self, test_name): - err_msg = "Failed to parse worker JSON: %s" % exc - - if err_msg is not None: -- return self.mp_result_error(test_name, CHILD_ERROR, stdout, stderr, err_msg) -+ return self.mp_result_error(test_name, CHILD_ERROR, -+ stdout, stderr, err_msg) - - return MultiprocessResult(result, stdout, stderr, err_msg) - -@@ -287,6 +286,16 @@ def _wait_completed(self): - f"{exc!r}") - - def wait_stopped(self, start_time): -+ # bpo-38207: MultiprocessTestRunner.stop_workers() called self.stop() -+ # which killed the process. Sometimes, killing the process from the -+ # main thread does not interrupt popen.communicate() in -+ # TestWorkerProcess thread. This loop with a timeout is a workaround -+ # for that. -+ # -+ # Moreover, if this method fails to join the thread, it is likely -+ # that Python will hang at exit while calling threading._shutdown() -+ # which tries again to join the blocked thread. Regrtest.main() -+ # uses EXIT_TIMEOUT to workaround this second bug. - while True: - # Write a message every second - self.join(1.0) -@@ -353,7 +362,8 @@ def _get_result(self): - timeout = PROGRESS_UPDATE - while True: - if use_faulthandler: -- faulthandler.dump_traceback_later(timeout * 2.0, exit=True) -+ faulthandler.dump_traceback_later(MAIN_PROCESS_TIMEOUT, -+ exit=True) - - # wait for a thread - try: -diff --git a/Misc/NEWS.d/next/Tests/2019-10-08-16-42-05.bpo-37531.7v-_Ca.rst b/Misc/NEWS.d/next/Tests/2019-10-08-16-42-05.bpo-37531.7v-_Ca.rst -new file mode 100644 -index 0000000000000..78ab636516514 ---- /dev/null -+++ b/Misc/NEWS.d/next/Tests/2019-10-08-16-42-05.bpo-37531.7v-_Ca.rst -@@ -0,0 +1,5 @@ -+On timeout, regrtest no longer attempts to call ``popen.communicate()`` -+again: it can hang until all child processes using stdout and stderr pipes -+completes. Kill the worker process and ignores its output. Change also the -+faulthandler timeout of the main process from 1 minute to 5 minutes, for Python -+slowest buildbots. diff --git a/dev-lang/python/files/pydoc.conf b/dev-lang/python/files/pydoc.conf deleted file mode 100644 index 3c6920cc..00000000 --- a/dev-lang/python/files/pydoc.conf +++ /dev/null @@ -1,6 +0,0 @@ -# /etc/init.d/pydoc.conf - -# This file contains the configuration for pydoc's internal webserver. - -# Default port for Python's pydoc server. -@PYDOC_PORT_VARIABLE@="7464" diff --git a/dev-lang/python/files/pydoc.init b/dev-lang/python/files/pydoc.init deleted file mode 100644 index f8e05636..00000000 --- a/dev-lang/python/files/pydoc.init +++ /dev/null @@ -1,24 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public Licence v2 - -start() { - local pydoc_port="${@PYDOC_PORT_VARIABLE@-${PYDOC_PORT}}" - - if [ -z "${pydoc_port}" ]; then - eerror "Port not set" - return 1 - fi - - ebegin "Starting pydoc server on port ${pydoc_port}" - start-stop-daemon --start --background --make-pidfile \ - --pidfile /var/run/@PYDOC@.pid \ - --exec /usr/bin/@PYDOC@ -- -p "${pydoc_port}" - eend $? -} - -stop() { - ebegin "Stopping pydoc server" - start-stop-daemon --stop --quiet --pidfile /var/run/@PYDOC@.pid - eend $? -} diff --git a/dev-lang/python/files/python-2.7.15-PGO-r1.patch b/dev-lang/python/files/python-2.7.15-PGO-r1.patch deleted file mode 100644 index f2e476e1..00000000 --- a/dev-lang/python/files/python-2.7.15-PGO-r1.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -ur Python-2.7.16.orig/Lib/distutils/ccompiler.py Python-2.7.16/Lib/distutils/ccompiler.py ---- Python-2.7.16.orig/Lib/distutils/ccompiler.py 2019-03-02 19:17:42.000000000 +0100 -+++ Python-2.7.16/Lib/distutils/ccompiler.py 2019-03-09 16:30:09.036803900 +0100 -@@ -14,7 +14,7 @@ - from distutils.spawn import spawn - from distutils.file_util import move_file - from distutils.dir_util import mkpath --from distutils.dep_util import newer_group -+from distutils.dep_util import newer_group, newer - from distutils.util import split_quoted, execute - from distutils import log - # following import is for backward compatibility -@@ -571,7 +571,9 @@ - src, ext = build[obj] - except KeyError: - continue -- self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) -+ if newer(src, obj): -+ # some extensions share source files so we need to avoid compiling the same source multiple times -+ self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) - - # Return *all* object filenames, not just the ones we just built. - return objects -diff -ur Python-2.7.16.orig/Lib/distutils/dep_util.py Python-2.7.16/Lib/distutils/dep_util.py ---- Python-2.7.16.orig/Lib/distutils/dep_util.py 2019-03-02 19:17:42.000000000 +0100 -+++ Python-2.7.16/Lib/distutils/dep_util.py 2019-03-09 16:30:09.036803900 +0100 -@@ -11,7 +11,7 @@ - from distutils.errors import DistutilsFileError - - def newer(source, target): -- """Tells if the target is newer than the source. -+ """Tells if the source is newer than the target. - - Return true if 'source' exists and is more recently modified than - 'target', or if 'source' exists and 'target' doesn't. -diff -ur Python-2.7.16.orig/Makefile.pre.in Python-2.7.16/Makefile.pre.in ---- Python-2.7.16.orig/Makefile.pre.in 2019-03-09 16:29:29.004188933 +0100 -+++ Python-2.7.16/Makefile.pre.in 2019-03-09 16:33:30.788823762 +0100 -@@ -209,9 +209,9 @@ - TCLTK_LIBS= @TCLTK_LIBS@ - - # The task to run while instrument when building the profile-opt target --# We exclude unittests with -x that take a rediculious amount of time to --# run in the instrumented training build or do not provide much value. --PROFILE_TASK=-m test.regrtest --pgo -x test_asyncore test_gdb test_multiprocessing test_subprocess -+# We exclude unittests with -x that take a ridiculous amount of time to -+# run in the instrumented training build or do not provide much value -+PROFILE_TASK=-m test.regrtest --pgo $(EXTRATESTOPTS) -x test_asyncore test_gdb test_multiprocessing test_subprocess test_xpickle - - # report files for gcov / lcov coverage report - COVERAGE_INFO= $(abs_builddir)/coverage.info -@@ -437,7 +437,7 @@ - - run_profile_task: - : # FIXME: can't run for a cross build -- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true -+ $(LLVM_PROF_FILE) _PYTHONNOSITEPACKAGES=1 $(RUNSHARED) ./$(BUILDPYTHON) -E $(PROFILE_TASK) || true # allow failures here - - build_all_merge_profile: - $(LLVM_PROF_MERGER) -diff -ur Python-2.7.16.orig/setup.py Python-2.7.16/setup.py ---- Python-2.7.16.orig/setup.py 2019-03-09 16:29:29.028188103 +0100 -+++ Python-2.7.16/setup.py 2019-03-09 16:30:09.037803866 +0100 -@@ -269,11 +269,13 @@ - # those environment variables passed into the setup.py phase. Here's - # a small set of useful ones. - compiler = os.environ.get('CC') -+ # it's important to get CFLAGS from the environment for proper extension PGO support -+ cflags = os.environ.get('CFLAGS', sysconfig.get_config_vars('CFLAGS')[0]) - args = {} - # unfortunately, distutils doesn't let us provide separate C and C++ - # compilers - if compiler is not None: -- (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') -+ (ccshared,) = sysconfig.get_config_vars('CCSHARED') - args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags - self.compiler.set_executables(**args) - diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml deleted file mode 100644 index 5625dcaf..00000000 --- a/dev-lang/python/metadata.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - python@gentoo.org - Python - - - Build with link-time optimizations (LTO) - Build with profile guided optimizations (PGO) - Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING) - Enable wide Unicode implementation which uses 4-byte Unicode characters. Switching of this USE flag changes ABI of Python and requires reinstallation of many Python modules. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING) - Install Windows executables required to create an executable installer for MS Windows. - - diff --git a/dev-lang/python/profile.patch b/dev-lang/python/profile.patch deleted file mode 100644 index e379e165..00000000 --- a/dev-lang/python/profile.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/dev-lang/python/python-2.7.14.ebuild b/dev-lang/python/python-2.7.14.ebuild -index f44a2137ff3..a1270aeb55b 100644 ---- a/dev-lang/python/python-2.7.14.ebuild -+++ b/dev-lang/python/python-2.7.14.ebuild -@@ -213,7 +213,7 @@ src_compile() { - touch Include/graminit.h Python/graminit.c - - cd "${BUILD_DIR}" || die -- emake -+ emake profile-opt PROFILE_TASK="-m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then -diff --git a/dev-lang/python/python-3.5.4.ebuild b/dev-lang/python/python-3.5.4.ebuild -index f4ff5b8cc75..a3dca3b6e86 100644 ---- a/dev-lang/python/python-3.5.4.ebuild -+++ b/dev-lang/python/python-3.5.4.ebuild -@@ -175,7 +175,7 @@ src_compile() { - - cd "${BUILD_DIR}" || die - -- emake CPPFLAGS= CFLAGS= LDFLAGS= -+ emake profile-opt PROFILE_TASK="-m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then -diff --git a/dev-lang/python/python-3.6.3.ebuild b/dev-lang/python/python-3.6.3.ebuild -index 4cf258819ee..4ae90dcf92c 100644 ---- a/dev-lang/python/python-3.6.3.ebuild -+++ b/dev-lang/python/python-3.6.3.ebuild -@@ -159,7 +159,7 @@ src_compile() { - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - -- emake CPPFLAGS= CFLAGS= LDFLAGS= -+ emake profile-opt PROFILE_TASK="-m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then diff --git a/dev-lang/python/python-2.7.18_p11-r100.ebuild b/dev-lang/python/python-2.7.18_p11-r100.ebuild deleted file mode 100644 index b1101d6b..00000000 --- a/dev-lang/python/python-2.7.18_p11-r100.ebuild +++ /dev/null @@ -1,374 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_P="Python-${PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="berkdb bluetooth build elibc_uclibc examples gdbm hardened ipv6 +lto +ncurses +pgo +readline +sqlite +ssl +threads tk +wide-unicode wininst +xml" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - dev-libs/libffi:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - berkdb? ( || ( - sys-libs/db:5.3 - sys-libs/db:5.1 - sys-libs/db:4.8 - sys-libs/db:4.7 - sys-libs/db:4.6 - sys-libs/db:4.5 - sys-libs/db:4.4 - sys-libs/db:4.3 - sys-libs/db:4.2 - ) ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez )" -BDEPEND=" - virtual/pkgconfig - verify-sig? ( app-crypt/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -PDEPEND="app-eselect/eselect-python" -RDEPEND+=" - !build? ( app-misc/mime-types ) - !<=dev-lang/python-exec-2.4.6-r1" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -pkg_setup() { - if use berkdb; then - ewarn "'bsddb' module is out-of-date and no longer maintained inside" - ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" - ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" - ewarn "is provided by dev-python/bsddb3." - else - if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then - ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" - ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." - ewarn "You might need to migrate your databases." - fi - fi -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - sed -i 's/test_subprocess$/test_subprocess test_distutils/' Makefile.pre.in || die - - eautoreconf -} - -src_configure() { - # dbm module can be linked against berkdb or gdbm. - # Defaults to gdbm when both are enabled, #204343. - local disable - use berkdb || use gdbm || disable+=" dbm" - use berkdb || disable+=" _bsddb" - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - if tc-is-cross-compiler; then - # Force some tests that try to poke fs paths. - export ac_cv_file__dev_ptc=no - export ac_cv_file__dev_ptmx=yes - fi - - # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. - tc-export CXX - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - if use berkdb; then - dbmliborder+="${dbmliborder:+:}bdb" - fi - - local myeconfargs=( - # The check is broken on clang, and gives false positive: - # https://bugs.gentoo.org/596798 - # (upstream dropped this flag in 3.2a4 anyway) - ac_cv_opt_olimit_ok=no - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --with-fpectl - --enable-shared - $(use_enable ipv6) - $(use_with threads) - $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") - $(use_enable pgo optimizations) - $(use_with lto) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --with-system-expat - --with-system-ffi - --without-ensurepip - ) - - OPT="" econf "${myeconfargs[@]}" - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - if use pgo; then - # disable distcc and ccache - export DISTCC_HOSTS="" - export CCACHE_DISABLE=1 - fi - - # Avoid invoking pgen for cross-compiles. - touch Include/graminit.h Python/graminit.c - - # extract the number of parallel jobs in MAKEOPTS - echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - emake EXTRATESTOPTS="${par_arg} -uall,-audio -x test_distutils" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="distutils gdb curses xpickle bdb runpy test_support" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - - # Daylight saving time problem - # https://bugs.python.org/issue22067 - # https://bugs.gentoo.org/610628 - local -x TZ=UTC - - # Rerun failed tests in verbose mode (regrtest -w). - emake test EXTRATESTOPTS="-w -uall,-audio ${par_arg}" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${PYVER} - - emake DESTDIR="${D}" altinstall - - sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die - - # Fix collisions between different slots of Python. - mv "${ED}/usr/bin/2to3" "${ED}/usr/bin/2to3-${PYVER}" || die - mv "${ED}/usr/bin/pydoc" "${ED}/usr/bin/pydoc${PYVER}" || die - mv "${ED}/usr/bin/idle" "${ED}/usr/bin/idle${PYVER}" || die - rm "${ED}/usr/bin/smtpd.py" || die - - use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,lib-tk} || die - use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} - - use threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python - ln -s "../../../bin/python${PYVER}" \ - "${scriptdir}/python" || die - # python-config - ln -s "../../../bin/python${PYVER}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi - - # python2* is no longer wrapped, so just symlink it - local pymajor=${PYVER%.*} - dosym "python${PYVER}" "/usr/bin/python${pymajor}" - dosym "python${PYVER}-config" "/usr/bin/python${pymajor}-config" -} diff --git a/dev-lang/python/python-3.10.0_beta3-r1.ebuild b/dev-lang/python/python-3.10.0_beta3-r1.ebuild deleted file mode 100644 index 5fa40a4d..00000000 --- a/dev-lang/python/python-3.10.0_beta3-r1.ebuild +++ /dev/null @@ -1,362 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_beta/b} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml pgo" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= ) - !! /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - if use pgo; then - emake profile-opt PROFILE_TASK="-m test -x test_gdb test_compileall test_ctypes test_distutils -j $(nproc) --pgo-extended" - else - emake CPPFLAGS= CFLAGS= LDFLAGS= - fi - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite /usr/lib/python3.10/site-packages - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.6.14-r1.ebuild b/dev-lang/python/python-3.6.14-r1.ebuild deleted file mode 100644 index a2c66ad3..00000000 --- a/dev-lang/python/python-3.6.14-r1.ebuild +++ /dev/null @@ -1,353 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_P="Python-${PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}/${PYVER}m" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test +threads tk wininst +xml pgo" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] )" -BDEPEND=" - virtual/pkgconfig - verify-sig? ( app-crypt/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -PDEPEND="app-eselect/eselect-python" -RDEPEND+=" !build? ( app-misc/mime-types )" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - configure.ac \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # force correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -src_configure() { - local disable - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --with-fpectl - --enable-shared - $(use_enable ipv6) - $(use_with threads) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - #The following code borrowed from https://github.com/stefantalpalaru/gentoo-overlay - - # extract the number of parallel jobs in MAKEOPTS - echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - if use pgo; then - emake profile-opt PROFILE_TASK="-m test.regrtest ${par_arg} -w -uall,-audio -x test_distutils test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_asyncio test_ctypes test_compileall test_pyexpat test_runpy test_support test_threaded_import test_xmlrpc_net" - else - emake CPPFLAGS= CFLAGS= LDFLAGS= - fi - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb faulthandler" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - use threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" \ - "${scriptdir}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.7.11-r1.ebuild b/dev-lang/python/python-3.7.11-r1.ebuild deleted file mode 100644 index 55c7f807..00000000 --- a/dev-lang/python/python-3.7.11-r1.ebuild +++ /dev/null @@ -1,346 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_P="Python-${PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}/${PYVER}m" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml pgo" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] )" -BDEPEND=" - virtual/pkgconfig - verify-sig? ( app-crypt/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -PDEPEND="app-eselect/eselect-python" -RDEPEND+=" !build? ( app-misc/mime-types )" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # force correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -src_configure() { - local disable - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - $(use_enable ipv6) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - #The following code borrowed from https://github.com/stefantalpalaru/gentoo-overlay - - # extract the number of parallel jobs in MAKEOPTS - echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - if use pgo; then - emake profile-opt PROFILE_TASK="-m test -x test_gdb test_compileall test_distutils test_multiprocessing_spawn - test_regrtest -j $(nproc) --pgo-extended" - else - emake CPPFLAGS= CFLAGS= LDFLAGS= - fi - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" \ - "${scriptdir}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.8.11-r1.ebuild b/dev-lang/python/python-3.8.11-r1.ebuild deleted file mode 100644 index ab04ae58..00000000 --- a/dev-lang/python/python-3.8.11-r1.ebuild +++ /dev/null @@ -1,351 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_rc/rc} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml pgo" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] )" -BDEPEND=" - virtual/pkgconfig - sys-devel/autoconf-archive - verify-sig? ( app-crypt/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -PDEPEND="app-eselect/eselect-python" -RDEPEND+=" !build? ( app-misc/mime-types )" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # force correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -src_configure() { - local disable - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # https://bugs.gentoo.org/700012 - if is-flagq -flto || is-flagq '-flto=*'; then - append-cflags $(test-flags-CC -ffat-lto-objects) - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - $(use_enable ipv6) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - #The following code borrowed from https://github.com/stefantalpalaru/gentoo-overlay - - # extract the number of parallel jobs in MAKEOPTS - echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - if use pgo; then - emake profile-opt PROFILE_TASK="-m test -x test_gdb test_compileall test_distutils -j $(nproc) --pgo-extended" - else - emake CPPFLAGS= CFLAGS= LDFLAGS= - fi - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.9.6-r1.ebuild b/dev-lang/python/python-3.9.6-r1.ebuild deleted file mode 100644 index da5eb094..00000000 --- a/dev-lang/python/python-3.9.6-r1.ebuild +++ /dev/null @@ -1,360 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_rc/rc} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml pgo" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] )" -BDEPEND=" - virtual/pkgconfig - sys-devel/autoconf-archive - verify-sig? ( app-crypt/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND="app-eselect/eselect-python" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -pkg_pretend() { - use test && check-reqs_pkg_pretend -} - -pkg_setup() { - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # force correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -src_configure() { - local disable - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # https://bugs.gentoo.org/700012 - if is-flagq -flto || is-flagq '-flto=*'; then - append-cflags $(test-flags-CC -ffat-lto-objects) - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - $(use_enable ipv6) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - #The following code borrowed from https://github.com/stefantalpalaru/gentoo-overlay - - # extract the number of parallel jobs in MAKEOPTS - echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - if use pgo; then - emake profile-opt PROFILE_TASK="-m test -x test_gdb test_compileall test_distutils -j $(nproc) --pgo-extended" - else - emake CPPFLAGS= CFLAGS= LDFLAGS= - fi - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index 0425a275..ac49f38b 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -1,4 +1,3 @@ -dev-lang/python 2.7.15-r1 3.4.8-r2 3.5.5-r2 3.6.6-r1 3.7.0-r1: An interpreted, interactive, object-oriented programming language media-libs/x264 0.0.20170701-r1: A free library for encoding X264/AVC streams media-video/x264-encoder 0.0.20170701-r1: A free commandline encoder for X264/AVC streams sys-config/ltoize 0.8.1 0.8.2 0.9.0: A configuration for portage to make building with LTO easy. From ceceef32584c8a9b0425058d553252d5b961ab47 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 18:56:42 -0500 Subject: [PATCH 20/63] fix: remove more packages no in gentoo tree The packages removed in this commit are no longer present in the gentoo tree, so the workarounds are no longer needed. Signed-off-by: Jaremy Hatler --- .../files/package.cflags/untested-flag-o-matic.conf | 9 --------- .../ltoize/files/package.cflags/untested-ipa-pta.conf | 1 - sys-config/ltoize/files/package.cflags/untested-lto.conf | 1 - .../files/package.cflags/untested-optimizations.conf | 1 - 4 files changed, 12 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf b/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf index a1ab2a0c..1b35d198 100644 --- a/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf +++ b/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf @@ -2,23 +2,16 @@ # app-crypt/johntheripper-jumbo LTO_ENABLE_FLAGOMATIC=yes # app-crypt/johntheripper LTO_ENABLE_FLAGOMATIC=yes # app-emulation/hercules LTO_ENABLE_FLAGOMATIC=yes -# app-emulation/wine-any LTO_ENABLE_FLAGOMATIC=yes -# app-emulation/wine-d3d9 LTO_ENABLE_FLAGOMATIC=yes # app-emulation/wine-staging LTO_ENABLE_FLAGOMATIC=yes # app-emulation/wine-vanilla LTO_ENABLE_FLAGOMATIC=yes # app-emulation/xen LTO_ENABLE_FLAGOMATIC=yes -# app-emulation/xen-pvgrub LTO_ENABLE_FLAGOMATIC=yes # app-emulation/xen-tools LTO_ENABLE_FLAGOMATIC=yes # dev-lang/ghc LTO_ENABLE_FLAGOMATIC=yes # dev-lang/gnat-gpl LTO_ENABLE_FLAGOMATIC=yes -# dev-libs/klibc LTO_ENABLE_FLAGOMATIC=yes # dev-libs/openssl LTO_ENABLE_FLAGOMATIC=yes -# dev-util/electron LTO_ENABLE_FLAGOMATIC=yes # games-emulation/zsnes LTO_ENABLE_FLAGOMATIC=yes # media-libs/libsdl LTO_ENABLE_FLAGOMATIC=yes -# media-video/libav LTO_ENABLE_FLAGOMATIC=yes # media-video/x264-encoder LTO_ENABLE_FLAGOMATIC=yes -# sci-biology/shrimp LTO_ENABLE_FLAGOMATIC=yes # sci-biology/unafold LTO_ENABLE_FLAGOMATIC=yes # sci-chemistry/tm-align LTO_ENABLE_FLAGOMATIC=yes # sys-boot/refind LTO_ENABLE_FLAGOMATIC=yes # USE='custom-cflags' currently masked by profile @@ -27,8 +20,6 @@ # sys-devel/gcc LTO_ENABLE_FLAGOMATIC=yes # Build system requires special attention, use BOOT_CFLAGS to inject flags. Do not inject -flto, use the USE flag to do this. # sys-fs/zfs-kmod LTO_ENABLE_FLAGOMATIC=yes # sys-fs/zfs LTO_ENABLE_FLAGOMATIC=yes -# sys-kernel/spl LTO_ENABLE_FLAGOMATIC=yes # www-client/chromium LTO_ENABLE_FLAGOMATIC=yes # www-client/firefox LTO_ENABLE_FLAGOMATIC=yes # The ebuild does respect your CFLAGS, it just does some messing around for enabling -flto and -O3. -# www-client/torbrowser LTO_ENABLE_FLAGOMATIC=yes # END: Untested override-flagomatic workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf index 2e0d22be..69291d22 100644 --- a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf @@ -13,7 +13,6 @@ # dev-python/libvirt-python *FLAGS-="${IPAPTA}" # Test failure # dev-db/postgresql *FLAGS-="${IPAPTA}" # Test failure # media-video/ffmpeg *FLAGS-="${IPAPTA}" # Test failure -# net-p2p/monero *FLAGS-="${IPAPTA}" # ICE with -fipa-pta # mail-client/thunderbird *FLAGS-="${IPAPTA}" # ICE with GCC 10.2.0 (seen with thunderbird 68.12.0) # >=dev-lang/spidermonkey-78.3.1 *FLAGS-="${IPAPTA}" # Segfault during build with GCC 10.2.0 # >=media-libs/mesa-21.1.0 *FLAGS-="${IPAPTA}" # Segfault with vulkan diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf index 5079d331..63594702 100644 --- a/sys-config/ltoize/files/package.cflags/untested-lto.conf +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -81,7 +81,6 @@ # 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 diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index ac559c73..75cb586f 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -1,5 +1,4 @@ # BEGIN: Untested Deliberate -O3 workarounds -# kde-frameworks/kactivities-stats /-O3/-O2 # causes systemsettings5 to crash # mail-filter/procmail /-O3/-O2 # Causes compile to hang indefinitely # media-libs/faad2 *FLAGS+=-fno-tree-loop-vectorize # causes subtly wrong decoding # media-libs/lcms /-O3/-O2 # Test failure From 261d353dd16f8518a5d9be66d1592a3dd1d4af58 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 27 Dec 2023 19:02:13 -0500 Subject: [PATCH 21/63] feat: add headers to untested files with counts This adds a header to each untested file that lists the number of workarounds in it which have yet to be tested. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/untested-clang.conf | 2 ++ .../ltoize/files/package.cflags/untested-cmake-makefile.conf | 2 ++ .../files/package.cflags/untested-devirtualize-at-ltrans.conf | 2 ++ .../ltoize/files/package.cflags/untested-flag-o-matic.conf | 2 ++ sys-config/ltoize/files/package.cflags/untested-graphite.conf | 2 ++ sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf | 2 ++ sys-config/ltoize/files/package.cflags/untested-lto.conf | 2 ++ .../package.cflags/untested-no-semantic-interposition.conf | 2 ++ .../ltoize/files/package.cflags/untested-optimizations.conf | 2 ++ .../ltoize/files/package.cflags/untested-portage-bashrc-mv.conf | 2 ++ 10 files changed, 20 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/untested-clang.conf b/sys-config/ltoize/files/package.cflags/untested-clang.conf index c8c7b9e2..d08c8ff8 100644 --- a/sys-config/ltoize/files/package.cflags/untested-clang.conf +++ b/sys-config/ltoize/files/package.cflags/untested-clang.conf @@ -1,3 +1,5 @@ +# Remaining workarounds to be tested: 8 + # BEGIN: Untested Workarounds for LTO with Clang # dev-lang/python *FLAGS-=-flto* # https://bugs.gentoo.org/700012 : No -ffat-lto-objects on clang # dev-libs/libffi *FLAGS-=-flto* # error: changed section flags for .eh_frame https://github.com/libffi/libffi/issues/626 (abi_x86_32) diff --git a/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf b/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf index f90c5fea..73cde7c2 100644 --- a/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf +++ b/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf @@ -1,3 +1,5 @@ +# Remaining workarounds to be tested: 5 + # BEGIN: Untested Will not build with ninja # app-doc/doxygen CMAKE_MAKEFILE_GENERATOR=emake # dev-lang/swi-prolog CMAKE_MAKEFILE_GENERATOR=emake diff --git a/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf b/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf index 4f00649b..99f276c6 100644 --- a/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf +++ b/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf @@ -1,3 +1,5 @@ +# Remaining workarounds to be tested: 1 + # BEGIN: Untested -fdevirtualize-at-ltrans workarounds # app-text/lcdf-typetools *FLAGS-="-fdevirtualize-at-ltrans" # ICE on static-var pass # END: Untested -fdevirtualize-at-ltrans workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf b/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf index 1b35d198..5966d9fd 100644 --- a/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf +++ b/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf @@ -1,3 +1,5 @@ +# Remaining workarounds to be tested: 23 + # BEGIN: Untested verride-flagomatic workarounds # app-crypt/johntheripper-jumbo LTO_ENABLE_FLAGOMATIC=yes # app-crypt/johntheripper LTO_ENABLE_FLAGOMATIC=yes diff --git a/sys-config/ltoize/files/package.cflags/untested-graphite.conf b/sys-config/ltoize/files/package.cflags/untested-graphite.conf index 390150f1..3093cfb3 100644 --- a/sys-config/ltoize/files/package.cflags/untested-graphite.conf +++ b/sys-config/ltoize/files/package.cflags/untested-graphite.conf @@ -1,3 +1,5 @@ +# Remaining workarounds to be tested: 1 + # BEGIN: Untested Graphite ICE (Internal Compiler Error) # Report them to the GCC team # sci-visualization/paraview *FLAGS-="${GRAPHITE}" # Removing Graphite optimizations allows build to complete with sane memory usage for --jobs > 1 diff --git a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf index 69291d22..b6cadcd0 100644 --- a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf @@ -1,3 +1,5 @@ +# Remaining workarounds to be tested: 18 + # BEGIN: Untested -fipa-pta workarounds # dev-lang/R *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault # sys-devel/gcc *FLAGS-="${IPAPTA}" diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf index 63594702..584574a2 100644 --- a/sys-config/ltoize/files/package.cflags/untested-lto.conf +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -1,3 +1,5 @@ +# Remaining workarounds to be tested: 107 + # BEGIN: Untested lto # Packages which cannot be built with LTO at all # app-admin/keepassxc *FLAGS-=-flto* # segfaults on start since Qt 5.15.1 diff --git a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf index ecedf3b5..cde4adde 100644 --- a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf +++ b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf @@ -1,3 +1,5 @@ +# Remaining workarounds to be tested: 11 + # BEGIN: Untested Semantic Interposition workarounds # app-crypt/tpm2-tss *FLAGS-="${SEMINTERPOS}" # Problem with inlining, see issue #592 # app-emulation/libvirt *FLAGS-="${SEMINTERPOS}" # Test failure diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index 75cb586f..d00e5cf2 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -1,3 +1,5 @@ +# Remaining workarounds to be tested: 22 + # BEGIN: Untested Deliberate -O3 workarounds # mail-filter/procmail /-O3/-O2 # Causes compile to hang indefinitely # media-libs/faad2 *FLAGS+=-fno-tree-loop-vectorize # causes subtly wrong decoding diff --git a/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf b/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf index 2cb9232e..d01d9d31 100644 --- a/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf +++ b/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf @@ -1,3 +1,5 @@ +# Remaining workarounds to be tested: 1 + # BEGIN: Untested portage-bashrc-mv remove-la workarounds # dev-util/colm NOLAFILEREMOVE=true # See issue 690 and https://bugs.gentoo.org/766210 # END: Untested portage-bashrc-mv remove-la workarounds From 64d544c56fac397bcd1c62c2b790fb265fa032ea Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Thu, 28 Dec 2023 15:34:29 -0500 Subject: [PATCH 22/63] fix: remove portage-bashrc-mv workarounds This removes the portage-bashrc-mv workarounds because they were only needed to resolve a failure in dev-util/colm which has been addressed upstream as of 0.14.7. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/portage-bashrc-mv.conf | 2 -- .../files/package.cflags/untested-portage-bashrc-mv.conf | 5 ----- sys-config/ltoize/ltoize-0.10.0.ebuild | 2 -- 3 files changed, 9 deletions(-) delete mode 100644 sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf delete mode 100644 sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf diff --git a/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf b/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf deleted file mode 100644 index d4354c74..00000000 --- a/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf +++ /dev/null @@ -1,2 +0,0 @@ -# BEGIN: portage-bashrc-mv remove-la workarounds -# END: portage-bashrc-mv remove-la workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf b/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf deleted file mode 100644 index d01d9d31..00000000 --- a/sys-config/ltoize/files/package.cflags/untested-portage-bashrc-mv.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Remaining workarounds to be tested: 1 - -# BEGIN: Untested portage-bashrc-mv remove-la workarounds -# dev-util/colm NOLAFILEREMOVE=true # See issue 690 and https://bugs.gentoo.org/766210 -# END: Untested portage-bashrc-mv remove-la workarounds diff --git a/sys-config/ltoize/ltoize-0.10.0.ebuild b/sys-config/ltoize/ltoize-0.10.0.ebuild index fa7ad8c0..cafbfe27 100644 --- a/sys-config/ltoize/ltoize-0.10.0.ebuild +++ b/sys-config/ltoize/ltoize-0.10.0.ebuild @@ -70,7 +70,6 @@ pkg_preinst() { no-common-libtool.conf no-semantic-interposition.conf optimizations.conf - portage-bashrc-mv.conf untested-cmake-makefile.conf untested-devirtualize-at-ltrans.conf untested-graphite.conf @@ -79,7 +78,6 @@ pkg_preinst() { untested-no-common-libtool.conf untested-no-semantic-interposition.conf untested-optimizations.conf - untested-portage-bashrc-mv.conf ) #Install make.conf settings From 079411bb88644389300dbc1bd7834e43434bf784 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:25:24 -0500 Subject: [PATCH 23/63] fix: enable dev-util/umockdev workaround This enables the no-semantic-interposition workaround for umockdev now that it has been tested as still being necessary. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/no-semantic-interposition.conf | 1 + .../files/package.cflags/untested-no-semantic-interposition.conf | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf index 83f20fc0..6f1b2309 100644 --- a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf +++ b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf @@ -1,3 +1,4 @@ # BEGIN: Semantic Interposition workarounds +dev-util/umockdev *FLAGS-="${SEMINTERPOS}" # /usr/include/bits/unistd.h:145:1: error: inlining failed in call to 'always_inline' 'readlink.localalias': function not inlinable sys-devel/binutils *FLAGS-="${SEMINTERPOS}" # tests fail when present # END: Semantic Interposition Workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf index cde4adde..8ef41e85 100644 --- a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf +++ b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf @@ -6,7 +6,6 @@ # app-misc/tracker *FLAGS-="${SEMINTERPOS}" # builds but makes gnome-base/nautilus deadlock # dev-lang/jimtcl *FLAGS-="${SEMINTERPOS}" # buffer overflow error when running an autosetup script. # dev-lang/swi-prolog *FLAGS-="${SEMINTERPOS}" # segfaults during build -# dev-util/umockdev *FLAGS-="${SEMINTERPOS}" # /usr/include/bits/unistd.h:145:1: error: inlining failed in call to 'always_inline' 'readlink.localalias': function not inlinable # media-sound/ardour *FLAGS-="${SEMINTERPOS}" # ICE in record_target_from_binfo during GIMPLE pass # net-fs/autofs *FLAGS-="${SEMINTERPOS}" # builds but segfault in lookup_file.so # net-libs/libiscsi *FLAGS-="${SEMINTERPOS}" From 8b21a2974fccfdc03e9a8ca70974e9b490811c08 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:29:16 -0500 Subject: [PATCH 24/63] fix: update app-crypt/gcr workaround app-crypt/gcr has been tested to work with LTO but semantic interposition must be disable. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/no-semantic-interposition.conf | 1 + sys-config/ltoize/files/package.cflags/untested-lto.conf | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf index 6f1b2309..c0ad0ef1 100644 --- a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf +++ b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf @@ -1,4 +1,5 @@ # BEGIN: Semantic Interposition workarounds +app-crypt/gcr-3.41 *FLAGS-="${SEMINTERPOS}" # gcr:gck/attributes test fails if this is enabled dev-util/umockdev *FLAGS-="${SEMINTERPOS}" # /usr/include/bits/unistd.h:145:1: error: inlining failed in call to 'always_inline' 'readlink.localalias': function not inlinable sys-devel/binutils *FLAGS-="${SEMINTERPOS}" # tests fail when present # END: Semantic Interposition Workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf index 584574a2..9f962443 100644 --- a/sys-config/ltoize/files/package.cflags/untested-lto.conf +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -92,7 +92,6 @@ # BEGIN: Untested 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 From 0b7604c8b776b131a146eb65606909fdd8c3d3d3 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:31:38 -0500 Subject: [PATCH 25/63] fix: remove dev-lang/ocaml ipa-pta workaround This has been tested to no longer be necessary. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf index b6cadcd0..c77ea585 100644 --- a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf @@ -10,7 +10,6 @@ # 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 -# dev-lang/ocaml *FLAGS-="${IPAPTA}" # ICE during IPA pass: pta in lto1: Segmentation fault # app-emulation/libvirt *FLAGS-="${IPAPTA}" # Segmentation fault when starting libvirtd # dev-python/libvirt-python *FLAGS-="${IPAPTA}" # Test failure # dev-db/postgresql *FLAGS-="${IPAPTA}" # Test failure From 7824e976be1ea3ebc3d1ed3a5761bcb27b04e573 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:33:24 -0500 Subject: [PATCH 26/63] fix: remove dev-lang/ruby workarounds Ruby was built with LTO and -Werror=strict-aliasing which validates that no workarounds are needed for it. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/untested-lto.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf index 9f962443..23170e43 100644 --- a/sys-config/ltoize/files/package.cflags/untested-lto.conf +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -92,7 +92,6 @@ # BEGIN: Untested 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" -# 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/rocr-runtime *FLAGS-=-flto* # Causes crashes in multiple OpenCL tools @@ -121,6 +120,5 @@ # END: Untested Build Workarounds # BEGIN: Untested 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: Untested Misc Workarounds From d01ce107c091972f9ecce44ebafb74075abadbf7 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:36:19 -0500 Subject: [PATCH 27/63] fix: remove dev-lang/spidermonkey workarounds spidermonkey has been tested to build find with ipa-pta and LTO enabled. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf | 1 - sys-config/ltoize/files/package.cflags/untested-lto.conf | 1 - 2 files changed, 2 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf index c77ea585..a135fefc 100644 --- a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf @@ -15,7 +15,6 @@ # dev-db/postgresql *FLAGS-="${IPAPTA}" # Test failure # media-video/ffmpeg *FLAGS-="${IPAPTA}" # Test failure # mail-client/thunderbird *FLAGS-="${IPAPTA}" # ICE with GCC 10.2.0 (seen with thunderbird 68.12.0) -# >=dev-lang/spidermonkey-78.3.1 *FLAGS-="${IPAPTA}" # Segfault during build with GCC 10.2.0 # >=media-libs/mesa-21.1.0 *FLAGS-="${IPAPTA}" # Segfault with vulkan # x11-base/xwayland *FLAGS-="${IPAPTA}" # SIGABRT when querying for GLX information # END: Untested -fipa-pta workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf index 23170e43..e069dc22 100644 --- a/sys-config/ltoize/files/package.cflags/untested-lto.conf +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -25,7 +25,6 @@ # dev-lang/lua *FLAGS-=-flto* # Causes issues building packages like neovim and awesomewm, fixes #772 # dev-lang/mono *FLAGS-=-flto* # >=dev-lang/php-7.2.0 *FLAGS-=-flto* # lto-wrapper link failure / https://github.com/InBetweenNames/gentooLTO/issues/135 -# dev-lang/spidermonkey *FLAGS-=-flto* # dev-libs/libbpf *FLAGS-=-flto* # lto-wrapper link failure # dev-libs/libsigsegv *FLAGS-=-flto* # Issue #189 # dev-libs/weston *FLAGS-=-flto* From 65975708dd99c50221d0eb2a116ff307497edc4d Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:41:55 -0500 Subject: [PATCH 28/63] fix: dev-python/numpy workarounds This removes the -Ofast workaround and adds one for LTO. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + .../ltoize/files/package.cflags/untested-optimizations.conf | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 8e4470e6..97c8b855 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -1,5 +1,6 @@ # BEGIN: lto # Packages which cannot be built with LTO at all +dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error # END: lto # BEGIN: ffat-lto-objects diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index d00e5cf2..6fc7c6a0 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -13,7 +13,6 @@ # BEGIN: Untested -Ofast workarounds # app-editors/emacs *FLAGS+='-fno-finite-math-only' # explicitly required by the ebuild # dev-lang/R *FLAGS+='-fno-finite-math-only' # R itself compiles fine, but runtime errors cause installation of R library tools to fail during emerge -# dev-python/numpy /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' /-funsafe-math-optimizations/'${SAFER_UNSAFE_MATH_OPTS}' *FLAGS-='-ffinite-math-only' # no compilation error, but -funsafe-math-optimizations (implied by -Ofast or -ffast-math) causes an undefined symbol error when trying to import numpy in python; '-ffinite-math-only' causes incorrect runtime handling of infinite values # dev-python/pillow *FLAGS+='-fno-finite-math-only' # compiles fine but causes `import matplotlib.pyplot` to fail with `undefined symbol: __log_finite` # dev-qt/qtcore *FLAGS+='-fno-finite-math-only' # compiles fine but causes most forms of scrolling to stop working in okular # dev-scheme/guile *FLAGS+='-fno-finite-math-only' # build fails with `floating point exception` From 9812742661018edde2325bbd4cc3db4defc14ecc Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:43:27 -0500 Subject: [PATCH 29/63] fix: remove dev-python/pillow workaround The workaround has been tested to be unnecessary. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/untested-optimizations.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index 6fc7c6a0..3d6bcd18 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -13,7 +13,6 @@ # BEGIN: Untested -Ofast workarounds # app-editors/emacs *FLAGS+='-fno-finite-math-only' # explicitly required by the ebuild # dev-lang/R *FLAGS+='-fno-finite-math-only' # R itself compiles fine, but runtime errors cause installation of R library tools to fail during emerge -# dev-python/pillow *FLAGS+='-fno-finite-math-only' # compiles fine but causes `import matplotlib.pyplot` to fail with `undefined symbol: __log_finite` # dev-qt/qtcore *FLAGS+='-fno-finite-math-only' # compiles fine but causes most forms of scrolling to stop working in okular # dev-scheme/guile *FLAGS+='-fno-finite-math-only' # build fails with `floating point exception` # kde-frameworks/kjs /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled From 17dad3160c4e457750e8b97296e53d67bbffbe8d Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:44:39 -0500 Subject: [PATCH 30/63] fix: dev-scheme/guile workarounds This removes the -fno-finite-math-only workaround and adds one for LTO. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + .../ltoize/files/package.cflags/untested-optimizations.conf | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 97c8b855..c1e3bc8e 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -1,6 +1,7 @@ # BEGIN: lto # Packages which cannot be built with LTO at all dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO # END: lto # BEGIN: ffat-lto-objects diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index 3d6bcd18..8349be07 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -14,7 +14,6 @@ # app-editors/emacs *FLAGS+='-fno-finite-math-only' # explicitly required by the ebuild # dev-lang/R *FLAGS+='-fno-finite-math-only' # R itself compiles fine, but runtime errors cause installation of R library tools to fail during emerge # dev-qt/qtcore *FLAGS+='-fno-finite-math-only' # compiles fine but causes most forms of scrolling to stop working in okular -# dev-scheme/guile *FLAGS+='-fno-finite-math-only' # build fails with `floating point exception` # kde-frameworks/kjs /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled # net-voip/mumble /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the libopus source throws an error if ffast-math is enabled # media-video/mpv /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # causes incorrect behavior (black screen) when enabling interpolation or downscaling From e11dd84a5714f1435f0266ded709f3c5d400198c Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:46:34 -0500 Subject: [PATCH 31/63] fix: remove gnome-base/gnome-keyring workaround This has been tested to work with LTO. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/untested-lto.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf index e069dc22..e3c4a3f1 100644 --- a/sys-config/ltoize/files/package.cflags/untested-lto.conf +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -34,7 +34,6 @@ # dev-util/radare2 *FLAGS-=-flto* # ICE in IPA pass # dev-vcs/cvs *FLAGS-=-flto* # Undefined references # games-action/extreme-tuxracer *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 From 5676bf774e429fe81922ed18daaf6fe9c3f17538 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:50:42 -0500 Subject: [PATCH 32/63] fix: remove media-libs/lcms workaround This was tested to be unnecessary. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/untested-optimizations.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index 8349be07..c7572721 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -3,7 +3,6 @@ # BEGIN: Untested Deliberate -O3 workarounds # mail-filter/procmail /-O3/-O2 # Causes compile to hang indefinitely # media-libs/faad2 *FLAGS+=-fno-tree-loop-vectorize # causes subtly wrong decoding -# media-libs/lcms /-O3/-O2 # Test failure # net-misc/dhcp /-O3/-O2 # Runtime failure, DHCPDISCOVER doesn't work correctly - introduced with gcc 10? # sci-libs/scotch /-O3/-O2 # Test failure # sys-apps/systemd /-O3/-O2 # causes homectl to fail with protocol error From bcb44361e3abf071fd9424c85c940625955256f6 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:51:51 -0500 Subject: [PATCH 33/63] fix: remove media-libs/mesa workaround This has been tested to be unnecessary. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/untested-lto.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf index e3c4a3f1..4dab68ba 100644 --- a/sys-config/ltoize/files/package.cflags/untested-lto.conf +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -95,7 +95,6 @@ # 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-news/rssguard *FLAGS-=-flto* # https://bugreports.qt.io/browse/QTBUG-41301 and https://github.com/martinrotter/rssguard/issues/156 From 43c3bc989a64629d805d42bbdbdf19dcbeccf2e5 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:52:57 -0500 Subject: [PATCH 34/63] fix: media-video/ffmpeg workaround This removes the ipa-pta workaround for ffmpeg and adds one to disable LTO. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index c1e3bc8e..ee5c1bdf 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -2,6 +2,7 @@ # Packages which cannot be built with LTO at all dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO +media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error # END: lto # BEGIN: ffat-lto-objects diff --git a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf index a135fefc..9aa6b340 100644 --- a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf @@ -13,7 +13,6 @@ # app-emulation/libvirt *FLAGS-="${IPAPTA}" # Segmentation fault when starting libvirtd # dev-python/libvirt-python *FLAGS-="${IPAPTA}" # Test failure # dev-db/postgresql *FLAGS-="${IPAPTA}" # Test failure -# media-video/ffmpeg *FLAGS-="${IPAPTA}" # Test failure # mail-client/thunderbird *FLAGS-="${IPAPTA}" # ICE with GCC 10.2.0 (seen with thunderbird 68.12.0) # >=media-libs/mesa-21.1.0 *FLAGS-="${IPAPTA}" # Segfault with vulkan # x11-base/xwayland *FLAGS-="${IPAPTA}" # SIGABRT when querying for GLX information From 6081aa6743fac2abf5908d0b5d774017414409e3 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:55:10 -0500 Subject: [PATCH 35/63] fix: sys-devel/llvm workarounds This removes the no-semantic-interposition and and -fno-finite-math workarounds. It adds a workaround to disable ipa-pta, which breaks the llvm tests. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/ipa-pta.conf | 1 + .../files/package.cflags/untested-no-semantic-interposition.conf | 1 - .../ltoize/files/package.cflags/untested-optimizations.conf | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/ipa-pta.conf b/sys-config/ltoize/files/package.cflags/ipa-pta.conf index 0af9acf3..55f52cdc 100644 --- a/sys-config/ltoize/files/package.cflags/ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/ipa-pta.conf @@ -1,2 +1,3 @@ # BEGIN: -fipa-pta workarounds +sys-devel/llvm *FLAGS-="${IPAPTA}" # llvm tests fail when this is enabled # END: -fipa-pta workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf index 8ef41e85..b0028b73 100644 --- a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf +++ b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf @@ -9,6 +9,5 @@ # media-sound/ardour *FLAGS-="${SEMINTERPOS}" # ICE in record_target_from_binfo during GIMPLE pass # net-fs/autofs *FLAGS-="${SEMINTERPOS}" # builds but segfault in lookup_file.so # net-libs/libiscsi *FLAGS-="${SEMINTERPOS}" -# sys-devel/llvm *FLAGS-="${SEMINTERPOS}" # sys-libs/glibc *FLAGS-="${SEMINTERPOS}" # END: Untested Semantic Interposition Workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index c7572721..67f3bcb4 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -18,7 +18,6 @@ # media-video/mpv /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # causes incorrect behavior (black screen) when enabling interpolation or downscaling # net-analyzer/rrdtool *FLAGS+='-fno-finite-math-only' # configure fails due to non-compliant IEEE arithmetic # net-libs/nodejs *FLAGS+='-fno-finite-math-only' # compiles fine but `npm` returns error whenever it starts running -# >=sys-devel/llvm-10.0.0 *FLAGS+='-fno-finite-math-only' # compiles fine but causes clang to fail to emerge with ``undefined reference to `__log10_finite'`` # >=sys-libs/glibc-2.30 /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled # www-client/firefox /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # won't build with flags activated by -ffast-math on Clang, requires investigation # x11-misc/gammastep *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly From 6f6963ab2b3f5d3096d4d7a6dc78129df3dcc7ce Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:56:56 -0500 Subject: [PATCH 36/63] fix: remove sys-libs/glibc workarounds These have been tested to be unnecessary. Signed-off-by: Jaremy Hatler --- .../files/package.cflags/untested-no-semantic-interposition.conf | 1 - .../ltoize/files/package.cflags/untested-optimizations.conf | 1 - 2 files changed, 2 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf index b0028b73..1515f1d4 100644 --- a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf +++ b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf @@ -9,5 +9,4 @@ # media-sound/ardour *FLAGS-="${SEMINTERPOS}" # ICE in record_target_from_binfo during GIMPLE pass # net-fs/autofs *FLAGS-="${SEMINTERPOS}" # builds but segfault in lookup_file.so # net-libs/libiscsi *FLAGS-="${SEMINTERPOS}" -# sys-libs/glibc *FLAGS-="${SEMINTERPOS}" # END: Untested Semantic Interposition Workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index 67f3bcb4..476b84ea 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -18,7 +18,6 @@ # media-video/mpv /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # causes incorrect behavior (black screen) when enabling interpolation or downscaling # net-analyzer/rrdtool *FLAGS+='-fno-finite-math-only' # configure fails due to non-compliant IEEE arithmetic # net-libs/nodejs *FLAGS+='-fno-finite-math-only' # compiles fine but `npm` returns error whenever it starts running -# >=sys-libs/glibc-2.30 /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled # www-client/firefox /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # won't build with flags activated by -ffast-math on Clang, requires investigation # x11-misc/gammastep *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly # x11-misc/redshift *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly From ba936912ca966444a50040ddb2c5c4ad2cf05b9f Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 16:57:42 -0500 Subject: [PATCH 37/63] fix: remove sys-devel/gcc ipa-pta workaround This has been tested to be unnecessary. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf index 9aa6b340..e6b49737 100644 --- a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf @@ -2,7 +2,6 @@ # BEGIN: Untested -fipa-pta workarounds # dev-lang/R *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault -# sys-devel/gcc *FLAGS-="${IPAPTA}" # dev-lang/duktape *FLAGS-="${IPAPTA}" # fixes polkit from musl overlay not starting # dev-lang/gnat-gpl *FLAGS-="${IPAPTA}" # dev-lang/php *FLAGS-="${IPAPTA}" # Segfaults when compiled with -fipa-pta From 281ca457b0462a343b6991c32dfa1f3cc044e1bc Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:00:06 -0500 Subject: [PATCH 38/63] chore: update counts This updates the counts of untested workarounds in the file headers. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf | 2 +- sys-config/ltoize/files/package.cflags/untested-lto.conf | 2 +- .../package.cflags/untested-no-semantic-interposition.conf | 2 +- .../ltoize/files/package.cflags/untested-optimizations.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf index e6b49737..c3e9dc7d 100644 --- a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf @@ -1,4 +1,4 @@ -# Remaining workarounds to be tested: 18 +# Remaining workarounds to be tested: 14 # BEGIN: Untested -fipa-pta workarounds # dev-lang/R *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf index 4dab68ba..61d612a4 100644 --- a/sys-config/ltoize/files/package.cflags/untested-lto.conf +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -1,4 +1,4 @@ -# Remaining workarounds to be tested: 107 +# Remaining workarounds to be tested: 101 # BEGIN: Untested lto # Packages which cannot be built with LTO at all diff --git a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf index 1515f1d4..e8957d84 100644 --- a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf +++ b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf @@ -1,4 +1,4 @@ -# Remaining workarounds to be tested: 11 +# Remaining workarounds to be tested: 8 # BEGIN: Untested Semantic Interposition workarounds # app-crypt/tpm2-tss *FLAGS-="${SEMINTERPOS}" # Problem with inlining, see issue #592 diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf index 476b84ea..ff5c83e5 100644 --- a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -1,4 +1,4 @@ -# Remaining workarounds to be tested: 22 +# Remaining workarounds to be tested: 17 # BEGIN: Untested Deliberate -O3 workarounds # mail-filter/procmail /-O3/-O2 # Causes compile to hang indefinitely From 2bfa37dc10f93ce166ced5c932593d16abc1c5fb Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:02:59 -0500 Subject: [PATCH 39/63] feat: add LTO_WARNING_FLAGS from Gentoo wiki This adds the below flags to the LTO_WARNING_FLAGS variable and adds it to CFLAGS by default. These flags are from the Gentoo wiki. If a package fails to compile with these flags, LTO should not be used. - -Werror=odr - -Werror=lto-type-mismatch - -Werror=strict-aliasing Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/make.conf.lto | 2 +- sys-config/ltoize/files/make.conf.lto.defines | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sys-config/ltoize/files/make.conf.lto b/sys-config/ltoize/files/make.conf.lto index 9d11bd49..dd1d0b45 100644 --- a/sys-config/ltoize/files/make.conf.lto +++ b/sys-config/ltoize/files/make.conf.lto @@ -77,4 +77,4 @@ source /etc/portage/make.conf.lto.defines USE="lto pgo" LTO_ENABLE_FLAGOMATIC=yes -CFLAGS="-O3 ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${SEMINTERPOS} ${FLTO} -fuse-linker-plugin" +CFLAGS="-O3 ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${SEMINTERPOS} ${FLTO} ${LTO_WARNING_FLAGS} -fuse-linker-plugin" diff --git a/sys-config/ltoize/files/make.conf.lto.defines b/sys-config/ltoize/files/make.conf.lto.defines index 8a58e18d..a33fe45c 100644 --- a/sys-config/ltoize/files/make.conf.lto.defines +++ b/sys-config/ltoize/files/make.conf.lto.defines @@ -54,3 +54,9 @@ SAFER_FAST_MATH="${SAFER_UNSAFE_MATH_OPTS} -fno-math-errno -ffinite-math-only -f DEVIRTLTO="-fdevirtualize-at-ltrans" #This allows GCC to perform devirtualization across object file boundaries using LTO. + +LTO_WARNING_FLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" + +# These warnings indicate likely runtime problems with LTO, so promote them +# to errors. If a package fails to build with these, LTO should not be used there. +# See here for more: https://wiki.gentoo.org/wiki/LTO From e26090b323618040c344c7c23ab173c1ca597332 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:07:41 -0500 Subject: [PATCH 40/63] fix: add app-text/texlive-core workaround This has been tested to be incompatible with LTO. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index ee5c1bdf..27d6c81b 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -1,5 +1,6 @@ # BEGIN: lto # Packages which cannot be built with LTO at all +app-text/texlive-core *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error @@ -18,5 +19,9 @@ media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch sys-devel/binutils *FLAGS-="-flto*" # package handles its own LTO and setting it here breaks that # END: Build Workarounds +# BEGIN: LTO_WARNING_FLAGS workarounds +app-text/texlive-core *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error +# END: LTO_WARNING_FLAGS workarounds + # BEGIN: Misc Workarounds # END: Misc Workarounds From 31760480d15de33009dac88da78a472a78da8e7e Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:08:36 -0500 Subject: [PATCH 41/63] fix: add dev-db/sqlite workaround The package has been tested to compile fine with LTO, but the tests fail when -Werror=lto-type-mismatch is enabled. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 27d6c81b..1b76fb00 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -21,6 +21,7 @@ sys-devel/binutils *FLAGS-="-flto*" # package handles its own LTO and setting i # BEGIN: LTO_WARNING_FLAGS workarounds app-text/texlive-core *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error +dev-db/sqlite *FLAGS-="-Werror=lto-type-mismatch" # Tests fail with this flag but the package compiles fine # END: LTO_WARNING_FLAGS workarounds # BEGIN: Misc Workarounds From 6537f2d4e94c5660a0e57a90fdfac4893c46757d Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:11:35 -0500 Subject: [PATCH 42/63] fix: add dev-libs/icu workaround This package fails its tests when the -Werror=odr flag is used. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 1b76fb00..34b3ba8c 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -22,6 +22,7 @@ sys-devel/binutils *FLAGS-="-flto*" # package handles its own LTO and setting i # BEGIN: LTO_WARNING_FLAGS workarounds app-text/texlive-core *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error dev-db/sqlite *FLAGS-="-Werror=lto-type-mismatch" # Tests fail with this flag but the package compiles fine +dev-libs/icu *FLAGS-="-Werror=odr" # Tests fail with this flag but the package compiles fine # END: LTO_WARNING_FLAGS workarounds # BEGIN: Misc Workarounds From 5e810fd432caf6a75cc561d88b64802a2d7c7943 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:13:29 -0500 Subject: [PATCH 43/63] fix: add dev-libs/libev workarounds This package fails to compile with LTO. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 34b3ba8c..eead278b 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -4,6 +4,7 @@ app-text/texlive-core *FLAGS-="-flto*" # fails to compile due to lto-type-mismat dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error # END: lto # BEGIN: ffat-lto-objects @@ -23,6 +24,7 @@ sys-devel/binutils *FLAGS-="-flto*" # package handles its own LTO and setting i app-text/texlive-core *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error dev-db/sqlite *FLAGS-="-Werror=lto-type-mismatch" # Tests fail with this flag but the package compiles fine dev-libs/icu *FLAGS-="-Werror=odr" # Tests fail with this flag but the package compiles fine +dev-libs/libev *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error # END: LTO_WARNING_FLAGS workarounds # BEGIN: Misc Workarounds From 96185e4c610bb446a97ce57f3b9ffca01c444988 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:14:51 -0500 Subject: [PATCH 44/63] fix: add dev-libs/nspr workaround The package compiles fine with LTO but the tests fail with strict-aliasing enabled. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index eead278b..77714691 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -25,6 +25,7 @@ app-text/texlive-core *FLAGS-="-Werror=strict-aliasing" # fails to compile due t dev-db/sqlite *FLAGS-="-Werror=lto-type-mismatch" # Tests fail with this flag but the package compiles fine dev-libs/icu *FLAGS-="-Werror=odr" # Tests fail with this flag but the package compiles fine dev-libs/libev *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error +dev-libs/nspr *FLAGS-="-Werror=strict-aliasing" # Tests fail with this flag but the package compiles fine # END: LTO_WARNING_FLAGS workarounds # BEGIN: Misc Workarounds From dfce50bde9c88834fc8c9c1c4ebfd6ce3efb4515 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:16:26 -0500 Subject: [PATCH 45/63] fix: add dev-util/colm workaround This package fails to compile with LTO enabled. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 77714691..9acba6b4 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -5,6 +5,7 @@ dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch er dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error +dev-util/colm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error # END: lto # BEGIN: ffat-lto-objects From e1adfd25da12eb296d773ee777f2f4ae2ddaf4e0 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:18:11 -0500 Subject: [PATCH 46/63] fix: add dev-util/gperf workaround This package fails to compile with LTO enabled. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 9acba6b4..8a5473a4 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -6,6 +6,7 @@ dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error dev-util/colm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +dev-util/gperf *FLAGS-="-flto*" # fails to compile due to strict-aliasing error # END: lto # BEGIN: ffat-lto-objects @@ -27,6 +28,7 @@ dev-db/sqlite *FLAGS-="-Werror=lto-type-mismatch" # Tests fail with this flag bu dev-libs/icu *FLAGS-="-Werror=odr" # Tests fail with this flag but the package compiles fine dev-libs/libev *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error dev-libs/nspr *FLAGS-="-Werror=strict-aliasing" # Tests fail with this flag but the package compiles fine +dev-util/gperf *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error # END: LTO_WARNING_FLAGS workarounds # BEGIN: Misc Workarounds From 68cf1f0c6dea03a4f4bac2b27e02e1d5aba277c0 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:18:50 -0500 Subject: [PATCH 47/63] fix: add sci-libs/lapack workaround This package fails to compile with LTO enabled. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 8a5473a4..fcda8e67 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -7,6 +7,7 @@ media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error dev-util/colm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-util/gperf *FLAGS-="-flto*" # fails to compile due to strict-aliasing error +sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error # END: lto # BEGIN: ffat-lto-objects From ec775d14c66d9068c2f18ec43b0b42b3bed439b1 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:20:15 -0500 Subject: [PATCH 48/63] fix: add sys-devel/autoconf workaround This package fails to pass its tests when LTO is enabled. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index fcda8e67..96b2ff38 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -8,6 +8,7 @@ dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error dev-util/colm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-util/gperf *FLAGS-="-flto*" # fails to compile due to strict-aliasing error sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +sys-devel/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enabled # END: lto # BEGIN: ffat-lto-objects From 0f38fe2316dc435f522c892aac19fb34ff15a783 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:21:43 -0500 Subject: [PATCH 49/63] fix: add media-gfx/graphite2 workarounds This package fails to compile and pass its test with LTO or -O3. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + sys-config/ltoize/files/package.cflags/optimizations.conf | 1 + 2 files changed, 2 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 96b2ff38..d786fe49 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -3,6 +3,7 @@ app-text/texlive-core *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO +media-gfx/graphite2 *FLAGS-="-flto*" # fails to compile due to odr error media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error dev-util/colm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error diff --git a/sys-config/ltoize/files/package.cflags/optimizations.conf b/sys-config/ltoize/files/package.cflags/optimizations.conf index 400cd6ce..76d03c02 100644 --- a/sys-config/ltoize/files/package.cflags/optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/optimizations.conf @@ -1,4 +1,5 @@ # BEGIN: Deliberate -O3 workarounds +media-gfx/graphite2 /-O3/-O2 # nametabletest test fails # END: Deliberate -O3 workarounds # BEGIN: -Ofast workarounds From 7248f8b29641d2cf1d435cdc8207d3b43429a759 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:23:16 -0500 Subject: [PATCH 50/63] chore: alphabetize lto.conf The latest workarounds were not added in alphabetized order. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index d786fe49..b19268f1 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -1,13 +1,13 @@ # BEGIN: lto # Packages which cannot be built with LTO at all app-text/texlive-core *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO -media-gfx/graphite2 *FLAGS-="-flto*" # fails to compile due to odr error -media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error -dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error dev-util/colm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-util/gperf *FLAGS-="-flto*" # fails to compile due to strict-aliasing error +media-gfx/graphite2 *FLAGS-="-flto*" # fails to compile due to odr error +media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error sys-devel/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enabled # END: lto From 700cdca4a6aa4d8319a32b39a6db1682732df5f0 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:30:55 -0500 Subject: [PATCH 51/63] fix: add sys-devel/libtool workarounds and patch This adds a patch from Fedora and the necessary workarounds to compile libtool with LTO. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/lto.conf | 2 + .../patches/sys-devel/libtool-2.4.7/lto.patch | 53 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 sys-config/ltoize/files/patches/sys-devel/libtool-2.4.7/lto.patch diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index b19268f1..c6865918 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -14,6 +14,7 @@ sys-devel/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enab # 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 +sys-devel/libtool *FLAGS+=-ffat-lto-objects # Used by fedora # END: ffat-lto-objects # BEGIN: LTO not recommended @@ -32,6 +33,7 @@ dev-libs/icu *FLAGS-="-Werror=odr" # Tests fail with this flag but the package c dev-libs/libev *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error dev-libs/nspr *FLAGS-="-Werror=strict-aliasing" # Tests fail with this flag but the package compiles fine dev-util/gperf *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error +sys-devel/libtool *FLAGS-=-Werror=lto-type-mismatch # test fail if this flag is left enabled # END: LTO_WARNING_FLAGS workarounds # BEGIN: Misc Workarounds diff --git a/sys-config/ltoize/files/patches/sys-devel/libtool-2.4.7/lto.patch b/sys-config/ltoize/files/patches/sys-devel/libtool-2.4.7/lto.patch new file mode 100644 index 00000000..5e403e91 --- /dev/null +++ b/sys-config/ltoize/files/patches/sys-devel/libtool-2.4.7/lto.patch @@ -0,0 +1,53 @@ +Enabling lto will result in failure during test phase, to be precise test 67 will cause it. +Compiler flags for this test (and most likely for rest of them) are inherited from actual build phase. +I'm not sure if this is expected. + +Most distribution disables this test. We try to keep it by stripping lto flags for it. + +Origin for this tests: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391427 + +--- a/tests/link-order2.at 2015-01-16 19:52:04.000000000 +0100 ++++ b/tests/link-order2_new.at 2021-11-30 02:01:09.574451906 +0100 +@@ -47,6 +47,8 @@ + AT_KEYWORDS([libtool]) + AT_KEYWORDS([interactive])dnl running 'wrong' may cause a popup window. + ++NO_LTO_CFLAGS=${CFLAGS/-flto*-ffat-lto-objects } ++ + eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='` + + undefined_setting=-no-undefined +@@ -89,12 +91,12 @@ + EOF + + for file in a0 a1 b; do +- $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c ++ $LIBTOOL --mode=compile $CC $CPPFLAGS $NO_LTO_CFLAGS -c $file.c + done +-$CC $CPPFLAGS $CFLAGS -c main.c ++$CC $CPPFLAGS $NO_LTO_CFLAGS -c main.c + + # Build an old, installed library. +-$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir ++$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir + $LIBTOOL --mode=install cp liba0.la $deflibdir/liba0.la + $LIBTOOL --mode=clean rm -f liba0.la + +@@ -118,13 +120,13 @@ + esac + test non-libtool,-static-libtool-libs = "$type_of_depdepl,$static" && + static=-all-static +- $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir +- $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir +- AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0], ++ $LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir ++ $LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir ++ AT_CHECK([$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0], + [], [ignore], [ignore]) + LT_AT_EXEC_CHECK([./main]) + # Now test that if we reverse the link order, the program fails. +- AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la], ++ AT_CHECK([$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la], + [], [ignore], [ignore]) + if test yes, != "$shared_fails,$static"; then + LT_AT_EXEC_CHECK([./wrong], [1], [], [ignore], [|| (exit 1)]) From d35f67bce2eb9e19d21d9caed778b9d9c0faed45 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:33:50 -0500 Subject: [PATCH 52/63] fix: add sys-libs/slang workaround This package fails to compile with LTO. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index c6865918..9c58bc2b 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -10,6 +10,7 @@ media-gfx/graphite2 *FLAGS-="-flto*" # fails to compile due to odr error media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error sys-devel/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enabled +sys-libs/slang *FLAGS-="-flto*" # fails to compile due to strict-aliasing error # END: lto # BEGIN: ffat-lto-objects @@ -34,6 +35,7 @@ dev-libs/libev *FLAGS-="-Werror=strict-aliasing" # fails to compile due to stric dev-libs/nspr *FLAGS-="-Werror=strict-aliasing" # Tests fail with this flag but the package compiles fine dev-util/gperf *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error sys-devel/libtool *FLAGS-=-Werror=lto-type-mismatch # test fail if this flag is left enabled +sys-libs/slang *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error # END: LTO_WARNING_FLAGS workarounds # BEGIN: Misc Workarounds From d472782914cf6acd340f08242cc3fc1d5503895b Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:35:17 -0500 Subject: [PATCH 53/63] fix: add media-libs/openh264 workaround This package fails to pass its tests when graphite optimizations are enabled. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/graphite.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/graphite.conf b/sys-config/ltoize/files/package.cflags/graphite.conf index c198ce0d..0e9f4b66 100644 --- a/sys-config/ltoize/files/package.cflags/graphite.conf +++ b/sys-config/ltoize/files/package.cflags/graphite.conf @@ -1,3 +1,7 @@ # BEGIN: Graphite ICE (Internal Compiler Error) # Report them to the GCC team # END: Graphite ICE (Internal Compiler Error) + +# BEGIN: Graphite Test failures +media-libs/openh264 *FLAGS-="${GRAPHITE}" +# END: Graphite Test failures From 22a08a5c8eca716b80dc3ab65a80b74f83a8e1d8 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Tue, 2 Jan 2024 17:36:36 -0500 Subject: [PATCH 54/63] fix: add x11-base/xorg-server workarounds This package causes downstream tests to fail with ipa-pta is enabled. Its own tests fail with -O3 is used. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/ipa-pta.conf | 1 + sys-config/ltoize/files/package.cflags/optimizations.conf | 1 + 2 files changed, 2 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/ipa-pta.conf b/sys-config/ltoize/files/package.cflags/ipa-pta.conf index 55f52cdc..ee445072 100644 --- a/sys-config/ltoize/files/package.cflags/ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/ipa-pta.conf @@ -1,3 +1,4 @@ # BEGIN: -fipa-pta workarounds sys-devel/llvm *FLAGS-="${IPAPTA}" # llvm tests fail when this is enabled +x11-base/xorg-server *FLAGS-="${IPAPTA}" # causes downstream tests to fail # END: -fipa-pta workarounds diff --git a/sys-config/ltoize/files/package.cflags/optimizations.conf b/sys-config/ltoize/files/package.cflags/optimizations.conf index 76d03c02..9bfa9410 100644 --- a/sys-config/ltoize/files/package.cflags/optimizations.conf +++ b/sys-config/ltoize/files/package.cflags/optimizations.conf @@ -1,5 +1,6 @@ # BEGIN: Deliberate -O3 workarounds media-gfx/graphite2 /-O3/-O2 # nametabletest test fails +x11-base/xorg-server /-O3/-O2 # tests fail at -O3 # END: Deliberate -O3 workarounds # BEGIN: -Ofast workarounds From a6e7b28512f3721e88cf9abd8438f466f8adc558 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Wed, 3 Jan 2024 16:07:33 -0500 Subject: [PATCH 55/63] fix: typo in app-crypt/gcr workaround The workaround for gcr had the version appended accidentally. This was removed. Signed-off-by: Jaremy Hatler --- .../ltoize/files/package.cflags/no-semantic-interposition.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf index c0ad0ef1..d6f9d9d5 100644 --- a/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf +++ b/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf @@ -1,5 +1,5 @@ # BEGIN: Semantic Interposition workarounds -app-crypt/gcr-3.41 *FLAGS-="${SEMINTERPOS}" # gcr:gck/attributes test fails if this is enabled +app-crypt/gcr *FLAGS-="${SEMINTERPOS}" # gcr:gck/attributes test fails if this is enabled dev-util/umockdev *FLAGS-="${SEMINTERPOS}" # /usr/include/bits/unistd.h:145:1: error: inlining failed in call to 'always_inline' 'readlink.localalias': function not inlinable sys-devel/binutils *FLAGS-="${SEMINTERPOS}" # tests fail when present # END: Semantic Interposition Workarounds From a8fb7b2b8a7b61aaf2686001645f24d981c97cab Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Sun, 7 Jan 2024 14:22:53 -0500 Subject: [PATCH 56/63] fix: finish removeding no-common workarounds There were some leftover configurations in the ltoize ebuild that were not removed when the no-common workarounds were removed. This commit removes those leftover configurations. Refs: b0cd07c73be97444cf671472d52d878533427c76 Signed-off-by: Jaremy Hatler --- sys-config/ltoize/ltoize-0.10.0.ebuild | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys-config/ltoize/ltoize-0.10.0.ebuild b/sys-config/ltoize/ltoize-0.10.0.ebuild index cafbfe27..b276a960 100644 --- a/sys-config/ltoize/ltoize-0.10.0.ebuild +++ b/sys-config/ltoize/ltoize-0.10.0.ebuild @@ -67,7 +67,6 @@ pkg_preinst() { graphite.conf ipa-pta.conf lto.conf - no-common-libtool.conf no-semantic-interposition.conf optimizations.conf untested-cmake-makefile.conf @@ -75,7 +74,6 @@ pkg_preinst() { untested-graphite.conf untested-ipa-pta.conf untested-lto.conf - untested-no-common-libtool.conf untested-no-semantic-interposition.conf untested-optimizations.conf ) @@ -110,9 +108,6 @@ pkg_preinst() { dosym "${LTO_PORTAGE_DIR}/package.cflags/untested-flag-o-matic.conf" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/untested-flag-o-matic.conf" dosym "${LTO_PORTAGE_DIR}/package.cflags/flag-o-matic.conf" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/flag-o-matic.conf" fi - - elog "Installing bashrc.d hook symlink to override package libtool lt_cv_sys_global_symbol_pipe and lt_cv_sys_global_symbol_to_cdecl" - dosym "${LTO_PORTAGE_DIR}/bashrc.d/43-lto-no-common.sh" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/bashrc.d/43-lto-no-common.sh" } pkg_postinst() From e57d1822a6c49ea34333678d0f04b140b926e19f Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Sun, 7 Jan 2024 15:06:05 -0500 Subject: [PATCH 57/63] fix: add net-wireless/bluez workaround The bluez package fails its tests when built with LTO. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 9c58bc2b..dc1f2462 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -8,6 +8,7 @@ dev-util/colm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-util/gperf *FLAGS-="-flto*" # fails to compile due to strict-aliasing error media-gfx/graphite2 *FLAGS-="-flto*" # fails to compile due to odr error media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +net-wireless/bluez *FLAGS-="-flto*" # test fail when LTO is enabled sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error sys-devel/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enabled sys-libs/slang *FLAGS-="-flto*" # fails to compile due to strict-aliasing error From 832852a8d6ccd87350ec178faa14c9b6b581ac78 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Sun, 7 Jan 2024 15:07:57 -0500 Subject: [PATCH 58/63] fix: add sys-devel/llvm workarounds LLVM 17 fails to pass its tests when built with LTO by gcc. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index dc1f2462..786de8d5 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -11,6 +11,7 @@ media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch net-wireless/bluez *FLAGS-="-flto*" # test fail when LTO is enabled sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error sys-devel/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enabled +>=sys-devel/llvm-17 *FLAGS-="-flto*" # test tools/llvm-shlib/typeids.test fails when LTO is enabled sys-libs/slang *FLAGS-="-flto*" # fails to compile due to strict-aliasing error # END: lto @@ -36,6 +37,7 @@ dev-libs/libev *FLAGS-="-Werror=strict-aliasing" # fails to compile due to stric dev-libs/nspr *FLAGS-="-Werror=strict-aliasing" # Tests fail with this flag but the package compiles fine dev-util/gperf *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error sys-devel/libtool *FLAGS-=-Werror=lto-type-mismatch # test fail if this flag is left enabled +>=sys-devel/llvm-17 *FLAGS-="-Werror=odr" # fails to compile with this flag, but test pass without sys-libs/slang *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error # END: LTO_WARNING_FLAGS workarounds From 9053e6f0cb8681f19c6b0aa504e50e9d0903d856 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Mon, 22 Jan 2024 15:59:27 -0500 Subject: [PATCH 59/63] chore: remove llvm workarounds This removes the workarounds for llvm because they were encountered with gcc and this repo isn't supporting building llvm with gcc. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 786de8d5..dc1f2462 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -11,7 +11,6 @@ media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch net-wireless/bluez *FLAGS-="-flto*" # test fail when LTO is enabled sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error sys-devel/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enabled ->=sys-devel/llvm-17 *FLAGS-="-flto*" # test tools/llvm-shlib/typeids.test fails when LTO is enabled sys-libs/slang *FLAGS-="-flto*" # fails to compile due to strict-aliasing error # END: lto @@ -37,7 +36,6 @@ dev-libs/libev *FLAGS-="-Werror=strict-aliasing" # fails to compile due to stric dev-libs/nspr *FLAGS-="-Werror=strict-aliasing" # Tests fail with this flag but the package compiles fine dev-util/gperf *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error sys-devel/libtool *FLAGS-=-Werror=lto-type-mismatch # test fail if this flag is left enabled ->=sys-devel/llvm-17 *FLAGS-="-Werror=odr" # fails to compile with this flag, but test pass without sys-libs/slang *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error # END: LTO_WARNING_FLAGS workarounds From d9cd11cd7f0af7319c09d750ca792fb1c4b8799a Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Mon, 22 Jan 2024 16:02:26 -0500 Subject: [PATCH 60/63] chore: packages moved from sys-devel to dev-build The gentoo tree moved some packages from sys-devel to dev-build. This updates the configurations in this repo to reflect that change. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 6 +++--- .../{sys-devel => dev-build}/libtool-2.4.7/lto.patch | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename sys-config/ltoize/files/patches/{sys-devel => dev-build}/libtool-2.4.7/lto.patch (100%) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index dc1f2462..35a4bea4 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -1,6 +1,7 @@ # BEGIN: lto # Packages which cannot be built with LTO at all app-text/texlive-core *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +dev-build/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enabled dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO @@ -10,13 +11,12 @@ media-gfx/graphite2 *FLAGS-="-flto*" # fails to compile due to odr error media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error net-wireless/bluez *FLAGS-="-flto*" # test fail when LTO is enabled sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error -sys-devel/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enabled sys-libs/slang *FLAGS-="-flto*" # fails to compile due to strict-aliasing error # 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 -sys-devel/libtool *FLAGS+=-ffat-lto-objects # Used by fedora +dev-build/libtool *FLAGS+=-ffat-lto-objects # Used by fedora # END: ffat-lto-objects # BEGIN: LTO not recommended @@ -30,12 +30,12 @@ sys-devel/binutils *FLAGS-="-flto*" # package handles its own LTO and setting i # BEGIN: LTO_WARNING_FLAGS workarounds app-text/texlive-core *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error +dev-build/libtool *FLAGS-=-Werror=lto-type-mismatch # test fail if this flag is left enabled dev-db/sqlite *FLAGS-="-Werror=lto-type-mismatch" # Tests fail with this flag but the package compiles fine dev-libs/icu *FLAGS-="-Werror=odr" # Tests fail with this flag but the package compiles fine dev-libs/libev *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error dev-libs/nspr *FLAGS-="-Werror=strict-aliasing" # Tests fail with this flag but the package compiles fine dev-util/gperf *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error -sys-devel/libtool *FLAGS-=-Werror=lto-type-mismatch # test fail if this flag is left enabled sys-libs/slang *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error # END: LTO_WARNING_FLAGS workarounds diff --git a/sys-config/ltoize/files/patches/sys-devel/libtool-2.4.7/lto.patch b/sys-config/ltoize/files/patches/dev-build/libtool-2.4.7/lto.patch similarity index 100% rename from sys-config/ltoize/files/patches/sys-devel/libtool-2.4.7/lto.patch rename to sys-config/ltoize/files/patches/dev-build/libtool-2.4.7/lto.patch From 269f2dd8bbefcfcf8687d096ea5a27bb28b3174b Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Mon, 22 Jan 2024 16:08:02 -0500 Subject: [PATCH 61/63] fix: add sys-libs/gpm workaround gpm fails to build with lto. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 35a4bea4..7b8ef369 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -11,6 +11,7 @@ media-gfx/graphite2 *FLAGS-="-flto*" # fails to compile due to odr error media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error net-wireless/bluez *FLAGS-="-flto*" # test fail when LTO is enabled sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +sys-libs/gpm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error sys-libs/slang *FLAGS-="-flto*" # fails to compile due to strict-aliasing error # END: lto From 982d9a83ab02b58343a71114b8733663d28c0cce Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Mon, 22 Jan 2024 16:10:08 -0500 Subject: [PATCH 62/63] fix: add dev-cpp/abseil-cpp workarounds abseil-cpp needed lto and ipa-pta flags to be disabled for builds to succeed. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/ipa-pta.conf | 1 + sys-config/ltoize/files/package.cflags/lto.conf | 1 + 2 files changed, 2 insertions(+) diff --git a/sys-config/ltoize/files/package.cflags/ipa-pta.conf b/sys-config/ltoize/files/package.cflags/ipa-pta.conf index ee445072..f82d7bab 100644 --- a/sys-config/ltoize/files/package.cflags/ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/ipa-pta.conf @@ -1,4 +1,5 @@ # BEGIN: -fipa-pta workarounds +dev-cpp/abseil-cpp *FLAGS-="${IPAPTA}" # builds hang (or are very slow) when this is enabled sys-devel/llvm *FLAGS-="${IPAPTA}" # llvm tests fail when this is enabled x11-base/xorg-server *FLAGS-="${IPAPTA}" # causes downstream tests to fail # END: -fipa-pta workarounds diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 7b8ef369..c61c6641 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -2,6 +2,7 @@ # Packages which cannot be built with LTO at all app-text/texlive-core *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-build/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enabled +dev-cpp/abseil-cpp *FLAGS-="-flto*" # fails to compile with lto dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO From fee089b9876a54ba62f5e9a644e58fe2c29cad22 Mon Sep 17 00:00:00 2001 From: Jaremy Hatler Date: Mon, 22 Jan 2024 16:11:47 -0500 Subject: [PATCH 63/63] fix: add net-misc/networkmanager workaround Tests fail when lto is enabled. Signed-off-by: Jaremy Hatler --- sys-config/ltoize/files/package.cflags/lto.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index c61c6641..add40190 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -10,6 +10,7 @@ dev-util/colm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error dev-util/gperf *FLAGS-="-flto*" # fails to compile due to strict-aliasing error media-gfx/graphite2 *FLAGS-="-flto*" # fails to compile due to odr error media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +net-misc/networkmanager *FLAGS-="-flto*" # test failure in a linker script net-wireless/bluez *FLAGS-="-flto*" # test fail when LTO is enabled sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error sys-libs/gpm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error