diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-10 03:03:09 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-10 03:03:09 +0000 |
commit | be94ae04eee564451203d45977c2ef7c7ace1580 (patch) | |
tree | 616ffc0ad9aee18dc7d5e9e62bf62394e8e520ba /www-client/firefox | |
parent | 2be329ae14bbf99f0fc4de7567e2386bbb529fdc (diff) |
gentoo auto-resync : 10:11:2024 - 03:03:09
Diffstat (limited to 'www-client/firefox')
-rw-r--r-- | www-client/firefox/Manifest | 12 | ||||
-rw-r--r-- | www-client/firefox/firefox-115.16.1-r1.ebuild (renamed from www-client/firefox/firefox-115.16.1.ebuild) | 68 | ||||
-rw-r--r-- | www-client/firefox/firefox-128.3.1-r1.ebuild (renamed from www-client/firefox/firefox-128.3.1.ebuild) | 17 | ||||
-rw-r--r-- | www-client/firefox/firefox-128.4.0-r1.ebuild (renamed from www-client/firefox/firefox-128.4.0.ebuild) | 64 | ||||
-rw-r--r-- | www-client/firefox/firefox-131.0.3-r1.ebuild (renamed from www-client/firefox/firefox-131.0.3.ebuild) | 72 | ||||
-rw-r--r-- | www-client/firefox/firefox-132.0-r1.ebuild (renamed from www-client/firefox/firefox-132.0.ebuild) | 84 | ||||
-rw-r--r-- | www-client/firefox/firefox-132.0.1-r1.ebuild (renamed from www-client/firefox/firefox-132.0.1.ebuild) | 84 |
7 files changed, 185 insertions, 216 deletions
diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest index 1b3731429f96..00e5633b07a5 100644 --- a/www-client/firefox/Manifest +++ b/www-client/firefox/Manifest @@ -619,10 +619,10 @@ DIST firefox-132.0.1-zh-CN.xpi 672173 BLAKE2B 103aae4cfa0847f6c6d598ebc13e69b30d DIST firefox-132.0.1-zh-TW.xpi 674245 BLAKE2B 6f74de755ae7f3f87dd9fc2d905b77595c27c3698cc8ee214414ff704903f5ceadcf634b6407506143b541bb30918c92fe1cd8e855d149da0539404bcb67d10d SHA512 a0e24d82e9e33c4b2a28ff08576f3c1652609ab59f354a7fc14c63667715f9ab64ea2d2798b1c7af5c21ab4c0cd19d0eef9a730f24ba567c4cedc29b8e9cbd67 DIST firefox-132.0.1.source.tar.xz 577539004 BLAKE2B 2773f6f74088954ab067df978e7069cbd92d96933190b32a24c7762ae7f300a8b4b9c95d6fee36ccceceebda86b51fd3842074d49869f8fa0cda5cb98402ed54 SHA512 10d5b05f61628deb9a69cb34b2cf3c75bb6b8768f5a718cef2157d5feb1671ede0d583439562e1c1221914eb6ed37fdf415dd651b1465c056be174136cd80b9d DIST firefox-132.0.source.tar.xz 564734500 BLAKE2B e1fb70d2d699153921bcb500801b77beeba8e1ff79ef9af678a0c573c252f61d7ad20e9f0676fe2fa2731bf14af7d2eff30c0b3b562102820fddb06f63a66a91 SHA512 254ffba16d6e6c61cffaa8131f81a9a78880e5723b7ee78ac36251a27d82e6ff088238ae289d07469ba3a51b5b5969a08ecd1fc02dcb4d93325a08fac1cfc916 -EBUILD firefox-115.16.1.ebuild 39935 BLAKE2B d2634c9a774135b121da45942a0b7a2614695503b13b1f277703dc54f2d8a0dbfaba7e19b1665b0fe503723d61439498c3dd7b352bd1696619de1bf46cd92a7e SHA512 db5f90432d1c6f8c88ba54faed8fe6adbc6ac345bb45976fe1a02056b642dda9495e11695dd5fd04d1c8b8edcab83a0f0f06cdfd9806e3aec605c5ef01fcdbac -EBUILD firefox-128.3.1.ebuild 41715 BLAKE2B 35226120d233ff6fd60e9ff74b0417f4d370d11c0ea9cb1b48bf17ff8bf7eb6ff3296d857dfaefecedf91227726766536b37828ed2a8c478f0f69815cfcca3ef SHA512 663a87d2122261f683515c64fbe9d9e3c372aa098c7b8a0af57862d27489981f55c122e9165945a08e1f15ad8f75c70295059460252211bbd29911d0ca1f2992 -EBUILD firefox-128.4.0.ebuild 40641 BLAKE2B ca57953facd55af93cb7f2b858db6c3a2d6237e9efaa23f4a302709839a4373ac4814de2f48387afb06ac6b604f17578fd1d34bfffbfb3052aa382d486701102 SHA512 a9835cb36e4293d2ec9b96053cd598be1a0c56018da0e657075418feb3a9699ba8111a1a682292cb15ec7eac58026d30ce14e7db6e3b0761add8c72f6d0c191f -EBUILD firefox-131.0.3.ebuild 41525 BLAKE2B ce0d47247dd85f5616ad4fece1ad415a3825d1aa47c8b983f2d2e9cc05f0646762f00911efc700a52d212077fa2fb61c0ead79a4947f18bb6ff9334969f46c1f SHA512 49ff2e9ce2e611113596dc51e047dc00b112203fdf2b1074c298072e4babbd35149aa421870c0b422e4c7749f71ccbe8d875eb91c9e11136765035f418efd81c -EBUILD firefox-132.0.1.ebuild 40318 BLAKE2B c1419a3fdc8b1ba567cb09dca7532c4005e38b1c7646484a3e920585c10a94e43d7a73e17032bf72a5c2632a0afea15e428eb2d6c852a8a34a06ae875f6d538e SHA512 13cdef62ab5fa86840ba9417241a0c6262364de1bdd5fc735ffacf92fe26a1bff5a518b87dc507489ff50a679327cea447179de2dea43e572e3b9d619e9bf529 -EBUILD firefox-132.0.ebuild 40448 BLAKE2B bf1dfc6ae70f39fe3ad6bb86fb41eb39c34758ec97b7884a131e292e1d0261e1718329cd19cfab24e51df3571d7a3cc06c5154ed176d3628c9f50398e8cfbf05 SHA512 f541036ce97d118efe9b209c3ab22eb1ca15efeb552af235336ad4ae3342f9ad47fc295233217dd7d00fc0e712b04daaa1f01a0ec2315eea5304ee1fa0efd401 +EBUILD firefox-115.16.1-r1.ebuild 39187 BLAKE2B 2e708bb20394605304630e3b9e12b4dbfcaf9f300d6b60a182e943f4c7f19fb5a1996cd6c4a6216965b5c04309613b0e9cfc82053642cbdb0c9c25a034aed4c2 SHA512 184aa94944271de9c19a5ed6fa6a9af60ba25c14aabff66bcac9c1025ebd161d1ca060b2c05feabefba1c79e403f26c3817f9372031673f5c266234b922557cb +EBUILD firefox-128.3.1-r1.ebuild 41479 BLAKE2B 6cef8a8aa4e038bd8514520f5d420025757ad136151cf642d2ca82081b5bb995c49cf59e352492ad259f04eab4ffc1e3fd1b801957cd2a67cc6054a7f4c565a4 SHA512 47cf75b11a2334a10e2d6a564505a3b8f5c75b74ce2d99fcadbc2c633dd5f74fb2cc05bc4f2eb0df3a26e61d5e1ddd4906376d004bef1b15157d053bfcc84074 +EBUILD firefox-128.4.0-r1.ebuild 41054 BLAKE2B 996c9188f5bee45b13a5d87a16492eb6001d58c7545be1bd66e852257d0cd590277645c04103ec79b65f81069cf4f5bd34871bebf75d50a1d04df6acfa4705c6 SHA512 689ff62ac32c3dfaacc4d25210e80ea28e9d05ca6fe61ecd0e17ea8d5c3fad6daf22f6e11263c73bdac12dea00fbf83de068836eb6e73566823efcf048e00366 +EBUILD firefox-131.0.3-r1.ebuild 41029 BLAKE2B 407c7a730dcbd88341ad8f2ca59c71aa7ada044bb8675baa4a52f4e9acfb9dd8a9dc2ff8a472e1f1c071021562feb5749e8e8adf11bb33b3b57aa0ac841cb7a3 SHA512 606df7613bbee59f3e336196d7fdaaa1e7f874cf8f33c9cca8679917bdd51414908e8607f0cb26ee683120ef05bdd762aa9304bb3d521d93757d0c1a7a8d1f2c +EBUILD firefox-132.0-r1.ebuild 39735 BLAKE2B 8dee8322db7ec172ef1c4506be7cddd92d466d6fcb13ae1e976a5a1ee9be5fec3a43a16050601fde71c241573e5ef9e4892bee500dc235af2e9de6cc06a939d4 SHA512 f44c7fa1cfa5c425dac389ddd942f38f02b1e43cb7d386a5e9ac3cc293cb094967d7a8bc5b150766216479123bd4d06866001354185c499e92e30a2af2e5e81e +EBUILD firefox-132.0.1-r1.ebuild 39605 BLAKE2B 4ed4bfbdec0ed2bfa9a63762e6c99ab2b84ea4e52f4dc864044173e510fd1d6affb7d0603c1e02350f36230909fefd39385b6773e2a56d056062c6f50e1be818 SHA512 ddd0f6f13df09e4b20fd1a0c848d6c4f4b9e071e095e2199685a2699d1788d3d5d005b1eb41ceafbc42c5186ca4d848f10c56f235eb4c66430253e210ddda793 MISC metadata.xml 2675 BLAKE2B 57721fdb9b8e0f1ea4a7d96dc284d5bc2f02e486086778bcb56f1a6166e327c4a06766cc4f2a7dd3716eef352c78ae28659971d9c71880d3ab22524ff060f57c SHA512 e0331f26da3dfa53b5f5c3b68e1f19b02dff662bc70bf4275d55edc077a508ac26be031f8693000fc903ea84c637cfc656358aa8f20f42747dd9a6994df6d724 diff --git a/www-client/firefox/firefox-115.16.1.ebuild b/www-client/firefox/firefox-115.16.1-r1.ebuild index 02142c4cbddb..e01a588149b5 100644 --- a/www-client/firefox/firefox-115.16.1.ebuild +++ b/www-client/firefox/firefox-115.16.1-r1.ebuild @@ -5,10 +5,11 @@ EAPI=8 FIREFOX_PATCHSET="firefox-115esr-patches-13.tar.xz" -LLVM_MAX_SLOT=18 +LLVM_COMPAT=(17 18) PYTHON_COMPAT=( python3_{10..11} ) PYTHON_REQ_USE="ncurses,sqlite,ssl" +RUST_NEEDS_LLVM=1 WANT_AUTOCONF="2.1" @@ -37,8 +38,8 @@ MOZ_P="${MOZ_PN}-${MOZ_PV}" MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" -inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg +inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ + optfeature pax-utils python-any-r1 readme.gentoo-r1 rust toolchain-funcs virtualx xdg MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" @@ -51,7 +52,7 @@ PATCH_URIS=( ) DESCRIPTION="Firefox Web Browser" -HOMEPAGE="https://www.mozilla.com/firefox" +HOMEPAGE="https://www.mozilla.org/firefox" SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz ${PATCH_URIS[@]}" S="${WORKDIR}/${PN}-${PV%_*}" @@ -77,57 +78,20 @@ FF_ONLY_DEPEND="!www-client/firefox:0 screencast? ( media-video/pipewire:= ) selinux? ( sec-policy/selinux-mozilla )" BDEPEND="${PYTHON_DEPS} - || ( - ( - sys-devel/clang:18 - sys-devel/llvm:18 - clang? ( - sys-devel/lld:18 - virtual/rust:0/llvm-18 - pgo? ( =sys-libs/compiler-rt-sanitizers-18*[profile] ) - ) - ) - ( - sys-devel/clang:17 - sys-devel/llvm:17 - clang? ( - sys-devel/lld:17 - virtual/rust:0/llvm-17 - pgo? ( =sys-libs/compiler-rt-sanitizers-17*[profile] ) - ) - ) - ( - sys-devel/clang:16 - sys-devel/llvm:16 - clang? ( - sys-devel/lld:16 - virtual/rust:0/llvm-16 - pgo? ( =sys-libs/compiler-rt-sanitizers-16*[profile] ) - ) - ) - ( - sys-devel/clang:15 - sys-devel/llvm:15 - clang? ( - sys-devel/lld:15 - virtual/rust:0/llvm-15 - pgo? ( =sys-libs/compiler-rt-sanitizers-15*[profile] ) - ) + $(llvm_gen_dep ' + sys-devel/clang:${LLVM_SLOT} + sys-devel/llvm:${LLVM_SLOT} + clang? ( + sys-devel/lld:${LLVM_SLOT} ) - ) + pgo? ( sys-libs/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) + ') app-alternatives/awk app-arch/unzip app-arch/zip >=dev-util/cbindgen-0.24.3 net-libs/nodejs virtual/pkgconfig - !clang? ( virtual/rust ) - !elibc_glibc? ( - || ( - dev-lang/rust - <dev-lang/rust-bin-1.73 - ) - ) amd64? ( >=dev-lang/nasm-2.14 ) x86? ( >=dev-lang/nasm-2.14 ) pgo? ( @@ -249,11 +213,6 @@ llvm_check_deps() { return 1 fi - if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then - einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - if use pgo ; then if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then einfo "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" @@ -537,7 +496,8 @@ pkg_setup() { check-reqs_pkg_setup - llvm_pkg_setup + llvm-r1_pkg_setup + rust_pkg_setup if use clang && use lto && tc-ld-is-lld ; then local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') diff --git a/www-client/firefox/firefox-128.3.1.ebuild b/www-client/firefox/firefox-128.3.1-r1.ebuild index 22d0a2570ee5..6ab88f43f63d 100644 --- a/www-client/firefox/firefox-128.3.1.ebuild +++ b/www-client/firefox/firefox-128.3.1-r1.ebuild @@ -10,6 +10,10 @@ LLVM_COMPAT=( 17 18 ) PYTHON_COMPAT=( python3_{10..12} ) PYTHON_REQ_USE="ncurses,sqlite,ssl" +RUST_NEEDS_LLVM=1 +RUST_MIN_VER=1.77.1 + + WANT_AUTOCONF="2.1" VIRTUALX_REQUIRED="manual" @@ -30,10 +34,10 @@ fi if [[ -n ${MOZ_ESR} ]] ; then # ESR releases have slightly different version numbers MOZ_PV="${MOZ_PV}esr" - HOMEPAGE="https://www.mozilla.com/firefox https://www.mozilla.org/firefox/enterprise/" + HOMEPAGE="https://www.mozilla.org/firefox https://www.mozilla.org/firefox/enterprise/" SLOT="esr" else - HOMEPAGE="https://www.mozilla.com/firefox" + HOMEPAGE="https://www.mozilla.org/firefox" SLOT="rapid" fi @@ -43,7 +47,7 @@ MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg + optfeature pax-utils python-any-r1 readme.gentoo-r1 rust toolchain-funcs virtualx xdg MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" @@ -83,7 +87,6 @@ BDEPEND="${PYTHON_DEPS} sys-devel/llvm:${LLVM_SLOT} clang? ( sys-devel/lld:${LLVM_SLOT} - virtual/rust:0/llvm-${LLVM_SLOT} ) pgo? ( sys-libs/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) ') @@ -93,8 +96,6 @@ BDEPEND="${PYTHON_DEPS} >=dev-util/cbindgen-0.26.0 net-libs/nodejs virtual/pkgconfig - !clang? ( >=virtual/rust-1.76 ) - !elibc_glibc? ( dev-lang/rust ) amd64? ( >=dev-lang/nasm-2.14 ) x86? ( >=dev-lang/nasm-2.14 ) pgo? ( @@ -220,10 +221,6 @@ llvm_check_deps() { return 1 fi - if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then - einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi if use pgo ; then if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then diff --git a/www-client/firefox/firefox-128.4.0.ebuild b/www-client/firefox/firefox-128.4.0-r1.ebuild index 2bba7a648bda..f0293ac98385 100644 --- a/www-client/firefox/firefox-128.4.0.ebuild +++ b/www-client/firefox/firefox-128.4.0-r1.ebuild @@ -10,6 +10,11 @@ LLVM_COMPAT=( 17 18 19 ) PYTHON_COMPAT=( python3_{10..12} ) PYTHON_REQ_USE="ncurses,sqlite,ssl" +# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. +RUST_NEEDS_LLVM=1 +# If not building with clang we need at least rust 1.76 +RUST_MIN_VER=1.77.1 + WANT_AUTOCONF="2.1" VIRTUALX_REQUIRED="manual" @@ -30,10 +35,10 @@ fi if [[ -n ${MOZ_ESR} ]] ; then # ESR releases have slightly different version numbers MOZ_PV="${MOZ_PV}esr" - HOMEPAGE="https://www.mozilla.com/firefox https://www.mozilla.org/firefox/enterprise/" + HOMEPAGE="https://www.mozilla.org/firefox https://www.mozilla.org/firefox/enterprise/" SLOT="esr" else - HOMEPAGE="https://www.mozilla.com/firefox" + HOMEPAGE="https://www.mozilla.org/firefox" SLOT="rapid" fi @@ -43,7 +48,7 @@ MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg + optfeature pax-utils python-any-r1 readme.gentoo-r1 rust toolchain-funcs virtualx xdg MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" @@ -62,7 +67,7 @@ S="${WORKDIR}/${PN}-${PV%_*}" LICENSE="MPL-2.0 GPL-2 LGPL-2.1" KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv ~x86" -IUSE="clang dbus debug eme-free hardened hwaccel jack +jumbo-build libproxy lto openh264 pgo" +IUSE="clang dbus debug eme-free hardened hwaccel jack +jumbo-build libproxy openh264 pgo" IUSE+=" pulseaudio selinux sndio +system-av1 +system-harfbuzz +system-icu +system-jpeg" IUSE+=" +system-libevent +system-libvpx system-png +system-webp +telemetry wayland wifi +X" @@ -71,7 +76,6 @@ IUSE+=" +gmp-autoupdate gnome-shell" REQUIRED_USE="|| ( X wayland ) debug? ( !system-av1 ) - pgo? ( lto ) wayland? ( dbus ) wifi? ( dbus )" @@ -83,7 +87,6 @@ BDEPEND="${PYTHON_DEPS} sys-devel/llvm:${LLVM_SLOT} clang? ( sys-devel/lld:${LLVM_SLOT} - virtual/rust:0/llvm-${LLVM_SLOT} ) pgo? ( sys-libs/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) ') @@ -93,8 +96,6 @@ BDEPEND="${PYTHON_DEPS} >=dev-util/cbindgen-0.26.0 net-libs/nodejs virtual/pkgconfig - !clang? ( >=virtual/rust-1.76 ) - !elibc_glibc? ( dev-lang/rust ) amd64? ( >=dev-lang/nasm-2.14 ) x86? ( >=dev-lang/nasm-2.14 ) pgo? ( @@ -220,11 +221,6 @@ llvm_check_deps() { return 1 fi - if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then - einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - if use pgo ; then if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then einfo "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2 @@ -447,7 +443,7 @@ pkg_pretend() { fi # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then + if use pgo || tc-is-lto || use debug ; then CHECKREQS_DISK_BUILD="13500M" else CHECKREQS_DISK_BUILD="6600M" @@ -458,15 +454,34 @@ pkg_pretend() { } pkg_setup() { + + # Get LTO from environment; export after this phase for use in src_configure (etc) + use_lto=no + if [[ ${MERGE_TYPE} != binary ]] ; then + + if tc-is-lto; then + use_lto=yes + # LTO is handled via configure + # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, + # bmo#1516758, bgo#942288 + filter-lto + filter-flags -Werror=lto-type-mismatch -Werror=odr + fi + if use pgo ; then + if [[ ${use_lto} == "no" ]]; then + elog "Building ${PN} with USE=pgo requires LTO, however this was not detected in your environment." + elog "Forcing LTO, however it is recommended to enable LTO explicitly." + use_lto=yes + fi if ! has userpriv ${FEATURES} ; then eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" fi fi # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then + if use pgo || [[ ${use_lto} == "yes" ]] || use debug ; then CHECKREQS_DISK_BUILD="13500M" else CHECKREQS_DISK_BUILD="6400M" @@ -475,8 +490,9 @@ pkg_setup() { check-reqs_pkg_setup llvm-r1_pkg_setup + rust_pkg_setup - if use clang && use lto && tc-ld-is-lld ; then + if use clang && [[ ${use_lto} == "yes" ]] && tc-ld-is-lld ; then local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" @@ -490,7 +506,7 @@ pkg_setup() { eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" - eerror " - Build ${CATEGORY}/${PN} without USE=lto" + eerror " - Build ${CATEGORY}/${PN} without lto" eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole " eerror " llvm/clang/lld/rust chain depending on your @world updates)" die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" @@ -551,6 +567,8 @@ pkg_setup() { export LC_ALL=C fi + export use_lto + CONFIG_CHECK="~SECCOMP" WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." linux-info_pkg_setup @@ -574,7 +592,7 @@ src_unpack() { } src_prepare() { - if use lto; then + if [[ ${use_lto} == "yes" ]]; then rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die fi @@ -904,13 +922,7 @@ src_configure() { mozconfig_add_options_ac '+x11' --enable-default-toolkit=cairo-gtk3-x11-only fi - # LTO is handled via configure. - # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, - # bmo#1516758, bgo#942288 - filter-lto - filter-flags -Werror=lto-type-mismatch -Werror=odr - - if use lto ; then + if [[ ${use_lto} == "yes" ]]; then if use clang ; then # Upstream only supports lld or mold when using clang. if tc-ld-is-mold ; then @@ -1085,7 +1097,7 @@ src_configure() { src_compile() { local virtx_cmd= - if tc-ld-is-mold && use lto; then + if tc-ld-is-mold && [[ ${use_lto} == "yes" ]]; then # increase ulimit with mold+lto, bugs #892641, #907485 if ! ulimit -n 16384 1>/dev/null 2>&1 ; then ewarn "Unable to modify ulimits - building with mold+lto might fail due to low ulimit -n resources." diff --git a/www-client/firefox/firefox-131.0.3.ebuild b/www-client/firefox/firefox-131.0.3-r1.ebuild index e746e07abc33..0ce5be76b3ca 100644 --- a/www-client/firefox/firefox-131.0.3.ebuild +++ b/www-client/firefox/firefox-131.0.3-r1.ebuild @@ -10,6 +10,11 @@ LLVM_COMPAT=( 17 18 19 ) PYTHON_COMPAT=( python3_{10..12} ) PYTHON_REQ_USE="ncurses,sqlite,ssl" +# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. +RUST_NEEDS_LLVM=1 +# If not building with clang we need at least rust 1.76 +RUST_MIN_VER=1.77.1 + WANT_AUTOCONF="2.1" VIRTUALX_REQUIRED="manual" @@ -30,10 +35,10 @@ fi if [[ -n ${MOZ_ESR} ]] ; then # ESR releases have slightly different version numbers MOZ_PV="${MOZ_PV}esr" - HOMEPAGE="https://www.mozilla.com/firefox https://www.mozilla.org/firefox/enterprise/" + HOMEPAGE="https://www.mozilla.org/firefox https://www.mozilla.org/firefox/enterprise/" SLOT="esr" else - HOMEPAGE="https://www.mozilla.com/firefox" + HOMEPAGE="https://www.mozilla.org/firefox" SLOT="rapid" fi @@ -43,7 +48,7 @@ MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg + optfeature pax-utils python-any-r1 readme.gentoo-r1 rust toolchain-funcs virtualx xdg MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" @@ -86,7 +91,6 @@ BDEPEND="${PYTHON_DEPS} sys-devel/llvm:${LLVM_SLOT} clang? ( sys-devel/lld:${LLVM_SLOT} - virtual/rust:0/llvm-${LLVM_SLOT} ) pgo? ( sys-libs/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) ') @@ -96,8 +100,6 @@ BDEPEND="${PYTHON_DEPS} >=dev-util/cbindgen-0.26.0 net-libs/nodejs virtual/pkgconfig - !clang? ( >=virtual/rust-1.76 ) - !elibc_glibc? ( dev-lang/rust ) amd64? ( >=dev-lang/nasm-2.14 ) x86? ( >=dev-lang/nasm-2.14 ) pgo? ( @@ -224,11 +226,6 @@ llvm_check_deps() { return 1 fi - if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then - einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - if use pgo ; then if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then einfo "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2 @@ -451,7 +448,7 @@ pkg_pretend() { fi # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then + if use pgo || tc-is-lto || use debug ; then CHECKREQS_DISK_BUILD="13500M" else CHECKREQS_DISK_BUILD="6600M" @@ -462,15 +459,33 @@ pkg_pretend() { } pkg_setup() { + # Get LTO from environment; export after this phase for use in src_configure (etc) + use_lto=no + if [[ ${MERGE_TYPE} != binary ]] ; then + + if tc-is-lto; then + use_lto=yes + # LTO is handled via configure + # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, + # bmo#1516758, bgo#942288 + filter-lto + filter-flags -Werror=lto-type-mismatch -Werror=odr + fi + if use pgo ; then + if [[ ${use_lto} == "no" ]] ; then + elog "Building ${PN} with USE=pgo requires LTO, however this was not detected in your environment." + elog "Forcing LTO, however it is recommended to enable LTO explicitly." + use_lto=yes + fi if ! has userpriv ${FEATURES} ; then eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" fi fi # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then + if [[ "${use_lto}" == "yes" ]] || use pgo || use debug ; then CHECKREQS_DISK_BUILD="13500M" else CHECKREQS_DISK_BUILD="6400M" @@ -479,25 +494,12 @@ pkg_setup() { check-reqs_pkg_setup llvm-r1_pkg_setup + rust_pkg_setup - if use clang && use lto && tc-ld-is-lld ; then - local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') - [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") - [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" - - if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then - eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." - eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" - eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" - eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" - eerror " - Build ${CATEGORY}/${PN} without USE=lto" - eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole " - eerror " llvm/clang/lld/rust chain depending on your @world updates)" - die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" + if [[ ${use_lto} == "yes" ]] && use clang; then + if ! (tc-ld-is-lld || tc-ld-is-mold) ; then + eerror "Building ${PN} with LTO and Clang requires the sys-devel/lld or sys-devel/mold linker!" + die "Please fix your toolchain configuration." fi fi @@ -555,6 +557,8 @@ pkg_setup() { export LC_ALL=C fi + export use_lto + CONFIG_CHECK="~SECCOMP" WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." linux-info_pkg_setup @@ -578,7 +582,7 @@ src_unpack() { } src_prepare() { - if use lto; then + if [[ "${use_lto}" == "yes" ]]; then rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die fi @@ -900,7 +904,7 @@ src_configure() { # LTO is handled via configure filter-lto - if use lto ; then + if [[ "${use_lto}" == "yes" ]] ; then if use clang ; then # Upstream only supports lld or mold when using clang. if tc-ld-is-mold ; then @@ -1087,7 +1091,7 @@ src_configure() { src_compile() { local virtx_cmd= - if tc-ld-is-mold && use lto; then + if tc-ld-is-mold && [[ ${use_lto} == "yes" ]]; then # increase ulimit with mold+lto, bugs #892641, #907485 if ! ulimit -n 16384 1>/dev/null 2>&1 ; then ewarn "Unable to modify ulimits - building with mold+lto might fail due to low ulimit -n resources." diff --git a/www-client/firefox/firefox-132.0.ebuild b/www-client/firefox/firefox-132.0-r1.ebuild index 8cfa5b1c3a92..2987f1489cb0 100644 --- a/www-client/firefox/firefox-132.0.ebuild +++ b/www-client/firefox/firefox-132.0-r1.ebuild @@ -6,6 +6,10 @@ EAPI=8 FIREFOX_PATCHSET="firefox-132-patches-01.tar.xz" LLVM_COMPAT=( 17 18 19 ) +# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. +RUST_NEEDS_LLVM=1 +# If not building with clang we need at least rust 1.76 +RUST_MIN_VER=1.77.1 PYTHON_COMPAT=( python3_{10..12} ) PYTHON_REQ_USE="ncurses,sqlite,ssl" @@ -30,10 +34,10 @@ fi if [[ -n ${MOZ_ESR} ]] ; then # ESR releases have slightly different version numbers MOZ_PV="${MOZ_PV}esr" - HOMEPAGE="https://www.mozilla.com/firefox https://www.mozilla.org/firefox/enterprise/" + HOMEPAGE="https://www.mozilla.org/firefox https://www.mozilla.org/firefox/enterprise/" SLOT="esr" else - HOMEPAGE="https://www.mozilla.com/firefox" + HOMEPAGE="https://www.mozilla.org/firefox" SLOT="rapid" fi @@ -43,7 +47,7 @@ MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg + optfeature pax-utils python-any-r1 rust readme.gentoo-r1 toolchain-funcs virtualx xdg MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" @@ -62,7 +66,7 @@ S="${WORKDIR}/${PN}-${PV%_*}" LICENSE="MPL-2.0 GPL-2 LGPL-2.1" KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" -IUSE="clang dbus debug eme-free hardened hwaccel jack +jumbo-build libproxy lto openh264 pgo" +IUSE="clang dbus debug eme-free hardened hwaccel jack +jumbo-build libproxy openh264 pgo" IUSE+=" pulseaudio sndio selinux +system-av1 +system-harfbuzz +system-icu +system-jpeg" IUSE+=" +system-jpeg +system-libevent +system-libvpx system-png +system-webp +telemetry valgrind" IUSE+=" wayland wifi +X" @@ -74,9 +78,9 @@ IUSE+=" +gmp-autoupdate gnome-shell" REQUIRED_USE="|| ( X wayland ) debug? ( !system-av1 ) !jumbo-build? ( clang ) - pgo? ( lto ) wayland? ( dbus ) - wifi? ( dbus )" + wifi? ( dbus ) +" FF_ONLY_DEPEND="!www-client/firefox:0 selinux? ( sec-policy/selinux-mozilla )" @@ -86,7 +90,6 @@ BDEPEND="${PYTHON_DEPS} sys-devel/llvm:${LLVM_SLOT} clang? ( sys-devel/lld:${LLVM_SLOT} - virtual/rust:0/llvm-${LLVM_SLOT} ) pgo? ( sys-libs/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) ') @@ -96,8 +99,6 @@ BDEPEND="${PYTHON_DEPS} >=dev-util/cbindgen-0.26.0 net-libs/nodejs virtual/pkgconfig - !clang? ( >=virtual/rust-1.76 ) - !elibc_glibc? ( dev-lang/rust ) amd64? ( >=dev-lang/nasm-2.14 ) x86? ( >=dev-lang/nasm-2.14 ) pgo? ( @@ -224,11 +225,6 @@ llvm_check_deps() { return 1 fi - if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then - einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - if use pgo ; then if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then einfo "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2 @@ -451,7 +447,7 @@ pkg_pretend() { fi # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then + if use pgo || tc-is-lto || use debug ; then CHECKREQS_DISK_BUILD="13500M" else CHECKREQS_DISK_BUILD="6600M" @@ -462,15 +458,34 @@ pkg_pretend() { } pkg_setup() { + + # Get LTO from environment; export after this phase for use in src_configure (etc) + use_lto=no + if [[ ${MERGE_TYPE} != binary ]] ; then + + if tc-is-lto; then + use_lto=yes + # LTO is handled via configure + # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, + # bmo#1516758, bgo#942288 + filter-lto + filter-flags -Werror=lto-type-mismatch -Werror=odr + fi + if use pgo ; then + if [[ ${use_lto} == "no" ]] ; then + elog "Building ${PN} with USE=pgo requires LTO, however this was not detected in your environment." + elog "Forcing LTO, however it is recommended to enable LTO explicitly." + use_lto=yes + fi if ! has userpriv ${FEATURES} ; then eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" fi fi # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then + if [[ ${use_lto} == "yes" ]] || use pgo || use debug ; then CHECKREQS_DISK_BUILD="13500M" else CHECKREQS_DISK_BUILD="6400M" @@ -479,25 +494,12 @@ pkg_setup() { check-reqs_pkg_setup llvm-r1_pkg_setup + rust_pkg_setup - if use clang && use lto && tc-ld-is-lld ; then - local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') - [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") - [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" - - if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then - eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." - eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" - eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" - eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" - eerror " - Build ${CATEGORY}/${PN} without USE=lto" - eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole " - eerror " llvm/clang/lld/rust chain depending on your @world updates)" - die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" + if [[ ${use_lto} == "yes" ]] && use clang; then + if ! (tc-ld-is-lld || tc-ld-is-mold) ; then + eerror "Building ${PN} with LTO and Clang requires the sys-devel/lld or sys-devel/mold linker!" + die "Please fix your toolchain configuration." fi fi @@ -555,6 +557,8 @@ pkg_setup() { export LC_ALL=C fi + export use_lto + CONFIG_CHECK="~SECCOMP" WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." linux-info_pkg_setup @@ -578,7 +582,7 @@ src_unpack() { } src_prepare() { - if use lto; then + if [[ ${use_lto} == "yes" ]]; then rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die fi @@ -897,13 +901,7 @@ src_configure() { mozconfig_add_options_ac '+x11' --enable-default-toolkit=cairo-gtk3-x11-only fi - # LTO is handled via configure - # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, - # bmo#1516758, bgo#942288 - filter-lto - filter-flags -Werror=lto-type-mismatch -Werror=odr - - if use lto ; then + if [[ ${use_lto} == "yes" ]] ; then if use clang ; then # Upstream only supports lld or mold when using clang. if tc-ld-is-mold ; then @@ -1086,7 +1084,7 @@ src_configure() { src_compile() { local virtx_cmd= - if tc-ld-is-mold && use lto; then + if [[ ${use_lto} == "yes" ]] && tc-ld-is-mold; then # increase ulimit with mold+lto, bugs #892641, #907485 if ! ulimit -n 16384 1>/dev/null 2>&1 ; then ewarn "Unable to modify ulimits - building with mold+lto might fail due to low ulimit -n resources." diff --git a/www-client/firefox/firefox-132.0.1.ebuild b/www-client/firefox/firefox-132.0.1-r1.ebuild index f9ec87f960b8..6f0ec147305c 100644 --- a/www-client/firefox/firefox-132.0.1.ebuild +++ b/www-client/firefox/firefox-132.0.1-r1.ebuild @@ -6,6 +6,10 @@ EAPI=8 FIREFOX_PATCHSET="firefox-132-patches-02.tar.xz" LLVM_COMPAT=( 17 18 19 ) +# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. +RUST_NEEDS_LLVM=1 +# If not building with clang we need at least rust 1.76 +RUST_MIN_VER=1.77.1 PYTHON_COMPAT=( python3_{10..12} ) PYTHON_REQ_USE="ncurses,sqlite,ssl" @@ -30,10 +34,10 @@ fi if [[ -n ${MOZ_ESR} ]] ; then # ESR releases have slightly different version numbers MOZ_PV="${MOZ_PV}esr" - HOMEPAGE="https://www.mozilla.com/firefox https://www.mozilla.org/firefox/enterprise/" + HOMEPAGE="https://www.mozilla.org/firefox https://www.mozilla.org/firefox/enterprise/" SLOT="esr" else - HOMEPAGE="https://www.mozilla.com/firefox" + HOMEPAGE="https://www.mozilla.org/firefox" SLOT="rapid" fi @@ -43,7 +47,7 @@ MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg + optfeature pax-utils python-any-r1 rust readme.gentoo-r1 toolchain-funcs virtualx xdg MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" @@ -62,7 +66,7 @@ S="${WORKDIR}/${PN}-${PV%_*}" LICENSE="MPL-2.0 GPL-2 LGPL-2.1" KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" -IUSE="clang dbus debug eme-free hardened hwaccel jack +jumbo-build libproxy lto openh264 pgo" +IUSE="clang dbus debug eme-free hardened hwaccel jack +jumbo-build libproxy openh264 pgo" IUSE+=" pulseaudio sndio selinux +system-av1 +system-harfbuzz +system-icu +system-jpeg" IUSE+=" +system-jpeg +system-libevent +system-libvpx system-png +system-webp +telemetry valgrind" IUSE+=" wayland wifi +X" @@ -72,9 +76,9 @@ IUSE+=" +gmp-autoupdate gnome-shell" REQUIRED_USE="|| ( X wayland ) debug? ( !system-av1 ) - pgo? ( lto ) wayland? ( dbus ) - wifi? ( dbus )" + wifi? ( dbus ) +" FF_ONLY_DEPEND="!www-client/firefox:0 selinux? ( sec-policy/selinux-mozilla )" @@ -84,7 +88,6 @@ BDEPEND="${PYTHON_DEPS} sys-devel/llvm:${LLVM_SLOT} clang? ( sys-devel/lld:${LLVM_SLOT} - virtual/rust:0/llvm-${LLVM_SLOT} ) pgo? ( sys-libs/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) ') @@ -94,8 +97,6 @@ BDEPEND="${PYTHON_DEPS} >=dev-util/cbindgen-0.26.0 net-libs/nodejs virtual/pkgconfig - !clang? ( >=virtual/rust-1.76 ) - !elibc_glibc? ( dev-lang/rust ) amd64? ( >=dev-lang/nasm-2.14 ) x86? ( >=dev-lang/nasm-2.14 ) pgo? ( @@ -222,11 +223,6 @@ llvm_check_deps() { return 1 fi - if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then - einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - if use pgo ; then if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then einfo "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2 @@ -449,7 +445,7 @@ pkg_pretend() { fi # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then + if use pgo || tc-is-lto || use debug ; then CHECKREQS_DISK_BUILD="13500M" else CHECKREQS_DISK_BUILD="6600M" @@ -460,15 +456,34 @@ pkg_pretend() { } pkg_setup() { + + # Get LTO from environment; export after this phase for use in src_configure (etc) + use_lto=no + if [[ ${MERGE_TYPE} != binary ]] ; then + + if tc-is-lto; then + use_lto=yes + # LTO is handled via configure + # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, + # bmo#1516758, bgo#942288 + filter-lto + filter-flags -Werror=lto-type-mismatch -Werror=odr + fi + if use pgo ; then + if [[ ${use_lto} == "no" ]] ; then + elog "Building ${PN} with USE=pgo requires LTO, however this was not detected in your environment." + elog "Forcing LTO, however it is recommended to enable LTO explicitly." + use_lto=yes + fi if ! has userpriv ${FEATURES} ; then eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" fi fi # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then + if [[ ${use_lto} == "yes" ]] || use pgo || use debug ; then CHECKREQS_DISK_BUILD="13500M" else CHECKREQS_DISK_BUILD="6400M" @@ -477,25 +492,12 @@ pkg_setup() { check-reqs_pkg_setup llvm-r1_pkg_setup + rust_pkg_setup - if use clang && use lto && tc-ld-is-lld ; then - local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') - [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") - [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" - - if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then - eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." - eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" - eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" - eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" - eerror " - Build ${CATEGORY}/${PN} without USE=lto" - eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole " - eerror " llvm/clang/lld/rust chain depending on your @world updates)" - die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" + if [[ ${use_lto} == "yes" ]] && use clang; then + if ! (tc-ld-is-lld || tc-ld-is-mold) ; then + eerror "Building ${PN} with LTO and Clang requires the sys-devel/lld or sys-devel/mold linker!" + die "Please fix your toolchain configuration." fi fi @@ -553,6 +555,8 @@ pkg_setup() { export LC_ALL=C fi + export use_lto + CONFIG_CHECK="~SECCOMP" WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." linux-info_pkg_setup @@ -576,7 +580,7 @@ src_unpack() { } src_prepare() { - if use lto; then + if [[ ${use_lto} == "yes" ]]; then rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die fi @@ -895,13 +899,7 @@ src_configure() { mozconfig_add_options_ac '+x11' --enable-default-toolkit=cairo-gtk3-x11-only fi - # LTO is handled via configure - # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, - # bmo#1516758, bgo#942288 - filter-lto - filter-flags -Werror=lto-type-mismatch -Werror=odr - - if use lto ; then + if [[ ${use_lto} == "yes" ]] ; then if use clang ; then # Upstream only supports lld or mold when using clang. if tc-ld-is-mold ; then @@ -1084,7 +1082,7 @@ src_configure() { src_compile() { local virtx_cmd= - if tc-ld-is-mold && use lto; then + if [[ ${use_lto} == "yes" ]] && tc-ld-is-mold; then # increase ulimit with mold+lto, bugs #892641, #907485 if ! ulimit -n 16384 1>/dev/null 2>&1 ; then ewarn "Unable to modify ulimits - building with mold+lto might fail due to low ulimit -n resources." |