summaryrefslogtreecommitdiff
path: root/sys-devel
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/Manifest.gzbin10624 -> 10645 bytes
-rw-r--r--sys-devel/clang-common/Manifest2
-rw-r--r--sys-devel/clang-common/clang-common-17.0.0_pre20230520.ebuild190
-rw-r--r--sys-devel/clang-runtime/Manifest1
-rw-r--r--sys-devel/clang-runtime/clang-runtime-17.0.0_pre20230520.ebuild41
-rw-r--r--sys-devel/clang/Manifest2
-rw-r--r--sys-devel/clang/clang-17.0.0_pre20230520.ebuild480
-rw-r--r--sys-devel/gcc/Manifest6
-rw-r--r--sys-devel/gcc/gcc-10.4.1_p20230517.ebuild6
-rw-r--r--sys-devel/gcc/gcc-11.3.1_p20230518.ebuild6
-rw-r--r--sys-devel/gcc/gcc-13.1.1_p20230520.ebuild62
-rw-r--r--sys-devel/lld/Manifest2
-rw-r--r--sys-devel/lld/lld-17.0.0_pre20230520.ebuild89
-rw-r--r--sys-devel/llvm-common/Manifest2
-rw-r--r--sys-devel/llvm-common/llvm-common-17.0.0_pre20230520.ebuild28
-rw-r--r--sys-devel/llvm/Manifest2
-rw-r--r--sys-devel/llvm/llvm-17.0.0_pre20230520.ebuild533
17 files changed, 1444 insertions, 8 deletions
diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz
index f896c8ecee39..ca53e45938d0 100644
--- a/sys-devel/Manifest.gz
+++ b/sys-devel/Manifest.gz
Binary files differ
diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest
index ca510d216f33..dfc02f7f0012 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -8,6 +8,7 @@ DIST llvm-project-16.0.4.src.tar.xz 117996332 BLAKE2B 2ea3ef25290ce6180d271e42fb
DIST llvm-project-16.0.4.src.tar.xz.sig 566 BLAKE2B 43cb2147f12f98f864797158e8efcfed9c6780fae3b5c71c0f1aea19a4131ee91c36bdf5b10e44f478f2370c8d22a9038038ecd607f25a95f2d3e33628eb9ac0 SHA512 c902d1b652e6e144fcf74f550539f56665475b6bdf673ba5bf2f1731c3bb8f5717ed56433d488c54bbf2f429b432da84e0bfb4b5fb5f2b7fa208b4f24f682be7
DIST llvm-project-52882de0e641487329c9e093a90ea3dad01842c8.tar.gz 182953335 BLAKE2B 98682729992d73202e35b540d5d0d87e2acf44e4ab6896a0b6f9ac4a7423f55ad370ae1d7e919a6c86dc7f138a66890ac89b852b03305612d248ab567833f8be SHA512 3685aff0f648e9b477e1e01edebe4799498c21587e2ed5577e2fdef98bb21ea215e206606a11692fbb93a0989fd59fd324faff2c4d97b7afca0851b53f123f05
DIST llvm-project-7d436d56b60b36508b94e39d08761f1405a9c770.tar.gz 183363091 BLAKE2B e0d3520814b3455e33107715697f00d653ad46bb8d8200caf42c42743520f389217ea2e57449bbc2e98126b602b2aa344e4125e4b1f92152f7957a11a9b9a150 SHA512 65a8e30702217e5e1309efe3daeda5115eeb2e8d25238db1fa4e8dcfc729d75655a10b3394f2f70b7e7efb8ea33a31b6e2482065cc81805023101da00584a81e
+DIST llvm-project-abbb22cc0c9c33dedb8d53c2bd3e703f92baace7.tar.gz 183193919 BLAKE2B 75c63d39918f7ec0faca0b1d03ba17dbd7d39a6f1d3a031dcb005ae1729933d8481f0bd745ec029ab21779525b2ddaf2989eaca2aed2b0e9b60c50ef71c7fc11 SHA512 f0c1b6fe2e087db202d32de05613b7570bd9a82dfef2e464014c9d4c9ba02c20d423cb783aa40ce5e9c9e074288efb2e5b6d70d55913bd285108e747400f55e7
EBUILD clang-common-14.0.6.ebuild 541 BLAKE2B 87b158e874cf600e23591a8095e0edb4d30d4482600ef8fe38984e9ba9559e6e2226107cd482f355d950392a6a452e1a8ae79d297d5afc3951a7f1c8f6227b5f SHA512 1bd0481468c278f131ec9f87243927b60a59752f4229450559bf8016e9599155a52593810fcdc1cf0aecd4aa1529e8df300d95123a53de18eb326152caafbbef
EBUILD clang-common-15.0.7-r5.ebuild 5090 BLAKE2B 39974630209630607d10903585223df68cd809fb390fc9eb2a80c4235ce70ae21120083f8eaf749c769a93f738c4e971e31e978dd637a0b87d07260281db4b83 SHA512 6cb37a7eb373d300d165e851e3643fd35e11d78a6a88617b4a8c0063b83558d10d307c32861e9ba2d0ac902c1cd2069ece6bd1446e309a6753f13adf8cd8fa2c
EBUILD clang-common-16.0.3-r1.ebuild 5517 BLAKE2B b6ab86006359b058f3503e0686a9f9b2172c0cf8db02859213ccfa3785cd670229b174326a142817299f8ac841139eb03029430a68a46ef75388024da9303afe SHA512 e063f0a43f937ed4f173aff4fe090ba1e084bf1ecd80549a41459e0ed1ebff0d68a6617b66926e1abb4874eccb2fb4541cf6667299d33be3cb969cc1a5eb32b7
@@ -17,4 +18,5 @@ EBUILD clang-common-16.0.5.9999.ebuild 5426 BLAKE2B dbab7084dcf1ec1c79c8f1c9b527
EBUILD clang-common-17.0.0.9999.ebuild 5426 BLAKE2B dbab7084dcf1ec1c79c8f1c9b52733731917e8a98907891ac3498d9614b5762034f3c45ec40e137e34214c1788b5c0f24dc53d39a3ab764800edfbe61dbb7c70 SHA512 cc1a9faaa11de0b0cb484dccca330cc82ed020c21fb3872db58680411ac3f16171ed8569faf9e59eaf713238728c58f737197ebd337fd1fe797a6455a55d1328
EBUILD clang-common-17.0.0_pre20230502.ebuild 5426 BLAKE2B dbab7084dcf1ec1c79c8f1c9b52733731917e8a98907891ac3498d9614b5762034f3c45ec40e137e34214c1788b5c0f24dc53d39a3ab764800edfbe61dbb7c70 SHA512 cc1a9faaa11de0b0cb484dccca330cc82ed020c21fb3872db58680411ac3f16171ed8569faf9e59eaf713238728c58f737197ebd337fd1fe797a6455a55d1328
EBUILD clang-common-17.0.0_pre20230512.ebuild 5426 BLAKE2B dbab7084dcf1ec1c79c8f1c9b52733731917e8a98907891ac3498d9614b5762034f3c45ec40e137e34214c1788b5c0f24dc53d39a3ab764800edfbe61dbb7c70 SHA512 cc1a9faaa11de0b0cb484dccca330cc82ed020c21fb3872db58680411ac3f16171ed8569faf9e59eaf713238728c58f737197ebd337fd1fe797a6455a55d1328
+EBUILD clang-common-17.0.0_pre20230520.ebuild 5426 BLAKE2B dbab7084dcf1ec1c79c8f1c9b52733731917e8a98907891ac3498d9614b5762034f3c45ec40e137e34214c1788b5c0f24dc53d39a3ab764800edfbe61dbb7c70 SHA512 cc1a9faaa11de0b0cb484dccca330cc82ed020c21fb3872db58680411ac3f16171ed8569faf9e59eaf713238728c58f737197ebd337fd1fe797a6455a55d1328
MISC metadata.xml 735 BLAKE2B 12ea133df3d7eb9367a65e572ef91893e654d5b77caa27c66e4b5b41ba90ebc5e619eb78dfff2a67183d2c1cbfcf35fa903b2bb75604ce153d5cedfce5346e3c SHA512 8ed6b12d4f2aa1985897a8d81ce898dbc0d14ac222f3d0f259cbe80fbb8b2349dff7677627daeaf39a422f290200da4fac6348abc81c9e35da0ca73a11cfdd83
diff --git a/sys-devel/clang-common/clang-common-17.0.0_pre20230520.ebuild b/sys-devel/clang-common/clang-common-17.0.0_pre20230520.ebuild
new file mode 100644
index 000000000000..51e0f70c6470
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-17.0.0_pre20230520.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of clang"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS=""
+IUSE="
+ default-compiler-rt default-libcxx default-lld llvm-libunwind
+ hardened stricter
+"
+
+PDEPEND="
+ sys-devel/clang:*
+ default-compiler-rt? (
+ sys-devel/clang-runtime[compiler-rt]
+ llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
+ !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+ )
+ !default-compiler-rt? ( sys-devel/gcc )
+ default-libcxx? ( >=sys-libs/libcxx-${PV} )
+ !default-libcxx? ( sys-devel/gcc )
+ default-lld? ( sys-devel/lld )
+ !default-lld? ( sys-devel/binutils )
+"
+IDEPEND="
+ !default-compiler-rt? ( sys-devel/gcc-config )
+ !default-libcxx? ( sys-devel/gcc-config )
+"
+
+LLVM_COMPONENTS=( clang/utils )
+llvm.org_set_globals
+
+pkg_pretend() {
+ [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
+
+ local flag missing_flags=()
+ for flag in default-{compiler-rt,libcxx,lld}; do
+ if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
+ missing_flags+=( "${flag}" )
+ fi
+ done
+
+ if [[ ${missing_flags[@]} ]]; then
+ eerror "It seems that you have the following flags set on sys-devel/clang:"
+ eerror
+ eerror " ${missing_flags[*]}"
+ eerror
+ eerror "The default runtimes are now set via flags on sys-devel/clang-common."
+ eerror "The build is being aborted to prevent breakage. Please either set"
+ eerror "the respective flags on this ebuild, e.g.:"
+ eerror
+ eerror " sys-devel/clang-common ${missing_flags[*]}"
+ eerror
+ eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
+ die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
+ fi
+}
+
+src_install() {
+ newbashcomp bash-autocomplete.sh clang
+
+ insinto /etc/clang
+ newins - gentoo-runtimes.cfg <<-EOF
+ # This file is initially generated by sys-devel/clang-runtime.
+ # It is used to control the default runtimes using by clang.
+
+ --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
+ --unwindlib=$(usex default-compiler-rt libunwind libgcc)
+ --stdlib=$(usex default-libcxx libc++ libstdc++)
+ -fuse-ld=$(usex default-lld lld bfd)
+ EOF
+
+ newins - gentoo-gcc-install.cfg <<-EOF
+ # This file is maintained by gcc-config.
+ # It is used to specify the selected GCC installation.
+ EOF
+
+ newins - gentoo-common.cfg <<-EOF
+ # This file contains flags common to clang, clang++ and clang-cpp.
+ @gentoo-runtimes.cfg
+ @gentoo-gcc-install.cfg
+ @gentoo-hardened.cfg
+ # bug #870001
+ -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
+ EOF
+
+ # Baseline hardening (bug #851111)
+ newins - gentoo-hardened.cfg <<-EOF
+ # Some of these options are added unconditionally, regardless of
+ # USE=hardened, for parity with sys-devel/gcc.
+ -fstack-clash-protection
+ -fstack-protector-strong
+ -fPIE
+ -include "${EPREFIX}/usr/include/gentoo/fortify.h"
+ EOF
+
+ dodir /usr/include/gentoo
+
+ cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
+ /* __has_include is an extension, but it's fine, because this is only
+ for Clang anyway. */
+ #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__)
+ # include <stdc-predef.h>
+ #endif
+ EOF
+
+ local fortify_level=$(usex hardened 3 2)
+ # We have to do this because glibc's headers warn if F_S is set
+ # without optimization and that would at the very least be very noisy
+ # during builds and at worst trigger many -Werror builds.
+ cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
+ #ifdef __clang__
+ # pragma clang system_header
+ #endif
+ #ifndef _FORTIFY_SOURCE
+ # if defined(__has_feature)
+ # define __GENTOO_HAS_FEATURE(x) __has_feature(x)
+ # else
+ # define __GENTOO_HAS_FEATURE(x) 0
+ # endif
+ #
+ # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
+ # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer)
+ # define _FORTIFY_SOURCE ${fortify_level}
+ # endif
+ # endif
+ # undef __GENTOO_HAS_FEATURE
+ #endif
+ EOF
+
+ if use hardened ; then
+ cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die
+ # Options below are conditional on USE=hardened.
+ -D_GLIBCXX_ASSERTIONS
+
+ # Analogue to GLIBCXX_ASSERTIONS
+ # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode
+ -D_LIBCPP_ENABLE_ASSERTIONS=1
+ EOF
+ fi
+
+ if use stricter; then
+ newins - gentoo-stricter.cfg <<-EOF
+ # This file increases the strictness of older clang versions
+ # to match the newest upstream version.
+
+ # clang-16 defaults
+ -Werror=implicit-function-declaration
+ -Werror=implicit-int
+ -Werror=incompatible-function-pointer-types
+
+ # constructs banned by C2x
+ -Werror=deprecated-non-prototype
+
+ # deprecated but large blast radius
+ #-Werror=strict-prototypes
+ EOF
+
+ cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
+ @gentoo-stricter.cfg
+ EOF
+ fi
+
+ local tool
+ for tool in clang{,++,-cpp}; do
+ newins - "${tool}.cfg" <<-EOF
+ # This configuration file is used by ${tool} driver.
+ @gentoo-common.cfg
+ EOF
+ done
+}
+
+pkg_preinst() {
+ if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+ then
+ local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
+ if [[ -n ${gcc_path} ]]; then
+ cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
+ --gcc-install-dir="${gcc_path%%:*}"
+ EOF
+ fi
+ fi
+}
diff --git a/sys-devel/clang-runtime/Manifest b/sys-devel/clang-runtime/Manifest
index 83a39fa2decc..b76b39000327 100644
--- a/sys-devel/clang-runtime/Manifest
+++ b/sys-devel/clang-runtime/Manifest
@@ -6,4 +6,5 @@ EBUILD clang-runtime-16.0.5.9999.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6
EBUILD clang-runtime-17.0.0.9999.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6988338bc715c68238367d55b5f01859244954b7ff8719ba285b64e76a578f063ab3f6325d5e9519ef5ebdb31592af1a276225 SHA512 436ecac7bb5ba46ca72ab48ea2bd8e30e2ee180218c0c3f14f41abd4e3b0445655ad033058bb78661b2095c5786ef644b538574d4ae2a9a8ee12fefc179f79db
EBUILD clang-runtime-17.0.0_pre20230502.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6988338bc715c68238367d55b5f01859244954b7ff8719ba285b64e76a578f063ab3f6325d5e9519ef5ebdb31592af1a276225 SHA512 436ecac7bb5ba46ca72ab48ea2bd8e30e2ee180218c0c3f14f41abd4e3b0445655ad033058bb78661b2095c5786ef644b538574d4ae2a9a8ee12fefc179f79db
EBUILD clang-runtime-17.0.0_pre20230512.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6988338bc715c68238367d55b5f01859244954b7ff8719ba285b64e76a578f063ab3f6325d5e9519ef5ebdb31592af1a276225 SHA512 436ecac7bb5ba46ca72ab48ea2bd8e30e2ee180218c0c3f14f41abd4e3b0445655ad033058bb78661b2095c5786ef644b538574d4ae2a9a8ee12fefc179f79db
+EBUILD clang-runtime-17.0.0_pre20230520.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6988338bc715c68238367d55b5f01859244954b7ff8719ba285b64e76a578f063ab3f6325d5e9519ef5ebdb31592af1a276225 SHA512 436ecac7bb5ba46ca72ab48ea2bd8e30e2ee180218c0c3f14f41abd4e3b0445655ad033058bb78661b2095c5786ef644b538574d4ae2a9a8ee12fefc179f79db
MISC metadata.xml 661 BLAKE2B 24688c511713ea102b83c71d226d519981b3aee0e05ef7a56d6a80be829efd843194e45cb4fd801f0bb976b6f1976386d6a2b05d2bc907fe2aa42b22b85b7d1f SHA512 2b5ab8783c90795f2e7d1673d876048ed9745f4911fb7a860df56deac13a6dfeba4581a84562eae54eff757c45042ca3fab75c7800313ae61df9ce69780a9294
diff --git a/sys-devel/clang-runtime/clang-runtime-17.0.0_pre20230520.ebuild b/sys-devel/clang-runtime/clang-runtime-17.0.0_pre20230520.ebuild
new file mode 100644
index 000000000000..67b42357665e
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-17.0.0_pre20230520.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-build toolchain-funcs
+
+DESCRIPTION="Meta-ebuild for clang runtime libraries"
+HOMEPAGE="https://clang.llvm.org/"
+
+LICENSE="metapackage"
+SLOT="${PV%%.*}"
+KEYWORDS=""
+IUSE="+compiler-rt libcxx openmp +sanitize"
+REQUIRED_USE="sanitize? ( compiler-rt )"
+PROPERTIES="live"
+
+RDEPEND="
+ compiler-rt? (
+ ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ sanitize? (
+ ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?]
+ )
+ )
+ libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] )
+ openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )
+"
+
+pkg_pretend() {
+ if tc-is-clang; then
+ ewarn "You seem to be using clang as a system compiler. As of clang-16,"
+ ewarn "upstream has turned a few warnings that commonly occur during"
+ ewarn "configure script runs into errors by default. This causes some"
+ ewarn "configure tests to start failing, sometimes resulting in silent"
+ ewarn "breakage, missing functionality or runtime misbehavior. It is"
+ ewarn "not yet clear whether the change will remain or be reverted."
+ ewarn
+ ewarn "For more information, please see:"
+ ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213"
+ fi
+}
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest
index 54e680931464..b191af3a4c36 100644
--- a/sys-devel/clang/Manifest
+++ b/sys-devel/clang/Manifest
@@ -16,6 +16,7 @@ DIST llvm-project-16.0.4.src.tar.xz 117996332 BLAKE2B 2ea3ef25290ce6180d271e42fb
DIST llvm-project-16.0.4.src.tar.xz.sig 566 BLAKE2B 43cb2147f12f98f864797158e8efcfed9c6780fae3b5c71c0f1aea19a4131ee91c36bdf5b10e44f478f2370c8d22a9038038ecd607f25a95f2d3e33628eb9ac0 SHA512 c902d1b652e6e144fcf74f550539f56665475b6bdf673ba5bf2f1731c3bb8f5717ed56433d488c54bbf2f429b432da84e0bfb4b5fb5f2b7fa208b4f24f682be7
DIST llvm-project-52882de0e641487329c9e093a90ea3dad01842c8.tar.gz 182953335 BLAKE2B 98682729992d73202e35b540d5d0d87e2acf44e4ab6896a0b6f9ac4a7423f55ad370ae1d7e919a6c86dc7f138a66890ac89b852b03305612d248ab567833f8be SHA512 3685aff0f648e9b477e1e01edebe4799498c21587e2ed5577e2fdef98bb21ea215e206606a11692fbb93a0989fd59fd324faff2c4d97b7afca0851b53f123f05
DIST llvm-project-7d436d56b60b36508b94e39d08761f1405a9c770.tar.gz 183363091 BLAKE2B e0d3520814b3455e33107715697f00d653ad46bb8d8200caf42c42743520f389217ea2e57449bbc2e98126b602b2aa344e4125e4b1f92152f7957a11a9b9a150 SHA512 65a8e30702217e5e1309efe3daeda5115eeb2e8d25238db1fa4e8dcfc729d75655a10b3394f2f70b7e7efb8ea33a31b6e2482065cc81805023101da00584a81e
+DIST llvm-project-abbb22cc0c9c33dedb8d53c2bd3e703f92baace7.tar.gz 183193919 BLAKE2B 75c63d39918f7ec0faca0b1d03ba17dbd7d39a6f1d3a031dcb005ae1729933d8481f0bd745ec029ab21779525b2ddaf2989eaca2aed2b0e9b60c50ef71c7fc11 SHA512 f0c1b6fe2e087db202d32de05613b7570bd9a82dfef2e464014c9d4c9ba02c20d423cb783aa40ce5e9c9e074288efb2e5b6d70d55913bd285108e747400f55e7
EBUILD clang-14.0.6-r1.ebuild 12014 BLAKE2B 0f9eed7779a5b9aa8f92002f6f4d8e22e7baf3d3f6d1930e4716abf3aa00d866f68a682dc2a404655f53800e26c8b388da552184da6943287b2d91c5c1c2672b SHA512 c5e46f1044604f4e41cdb6c42d2079096c0bcdd396d99f8e95a6b5b66918e3519e4226741202f716fa5f53295188ec2bfcec66ae32480a8e10b4ab18bdb880ab
EBUILD clang-14.0.6-r4.ebuild 11945 BLAKE2B 1f14f89997a862e04b0d9042c6d9c698c2cd455ab3a7dc3473af08137566e3c26ac05cf818ba8b12113c38cbd0b3c0d48836ed6b13216821614d7eb7eb1260c6 SHA512 37ee0684d6ae0dfb4e8cb0da683dec4996f8bad1762e3d8ffd1e4bf5a01e2c6cc90dac76a26edfb558e458b50be7ac535f71ea2b3578d6e58e388dab9661b27b
EBUILD clang-15.0.7-r1.ebuild 12617 BLAKE2B 780db8dc3c92efab35280d32f6b7d4ffcea912d7839b995a18aa603d0cf59df1199eabd53eb5a475e67da7a45e10fdd08e9879b871a25672f135dbdb001a5f46 SHA512 f6302415c9a4fb8571613ff5ebea4096f1318333ba4bc0f3c0b63b04eb0d10755c4555f55186875db0d34bb5d2c0b245b758aff387b97033bc643a1a291d1195
@@ -26,4 +27,5 @@ EBUILD clang-16.0.5.9999.ebuild 12293 BLAKE2B b854af4222caecd41ed431d560b9311e3b
EBUILD clang-17.0.0.9999.ebuild 12284 BLAKE2B b3ed58b37e00f030d9ab4a8d599cfbcdcb78c17a1542e8942602f360b93077997243f68b4dd441133d9aa79d3e687a3692a8ec31c4937ed4b3f1651b1d1b0d3c SHA512 530d877ab7a240de67056c59c6baad288052133c01171ce9c67d12651300cb3dda3258cd92ab8bd319c89ab9856722c54183bb32ab410201ebe778e5e36e4329
EBUILD clang-17.0.0_pre20230502.ebuild 12353 BLAKE2B b4165aa6ea9c9e65092d93989b8681281d42ce7e27c24df4a1788c6865667f217a9d61769ee83fb4ae23b1fd9c5b6e806d70aad20bd5f97c162471447e89730c SHA512 a125b873840ef52ad77a07c62d3872936ecdb2cd80bfdc9de3c781b6f26b87f2bde70974c12ea19df181e1d996d1990b1c79dcabe2887d7b913113cd2addcbfa
EBUILD clang-17.0.0_pre20230512.ebuild 12353 BLAKE2B b4165aa6ea9c9e65092d93989b8681281d42ce7e27c24df4a1788c6865667f217a9d61769ee83fb4ae23b1fd9c5b6e806d70aad20bd5f97c162471447e89730c SHA512 a125b873840ef52ad77a07c62d3872936ecdb2cd80bfdc9de3c781b6f26b87f2bde70974c12ea19df181e1d996d1990b1c79dcabe2887d7b913113cd2addcbfa
+EBUILD clang-17.0.0_pre20230520.ebuild 12284 BLAKE2B b3ed58b37e00f030d9ab4a8d599cfbcdcb78c17a1542e8942602f360b93077997243f68b4dd441133d9aa79d3e687a3692a8ec31c4937ed4b3f1651b1d1b0d3c SHA512 530d877ab7a240de67056c59c6baad288052133c01171ce9c67d12651300cb3dda3258cd92ab8bd319c89ab9856722c54183bb32ab410201ebe778e5e36e4329
MISC metadata.xml 1600 BLAKE2B 8e49e099132445cf695e904acad8a699f3d8c4c1e4cd6ba9d0b97180dfa5b67e9c30b00d1e4cb6cd2f61b27f022accc8d6ee889c6569fc58fbc058186ad216fc SHA512 96b7cf4988ff1fd923ec87311caed458b64888b5acaaf20cc1ad893f2a963158f7f59398f9fd4f9e65cab3df265c0d002048ff874f7a76b94f36377bf9e8f5f6
diff --git a/sys-devel/clang/clang-17.0.0_pre20230520.ebuild b/sys-devel/clang/clang-17.0.0_pre20230520.ebuild
new file mode 100644
index 000000000000..e22838875809
--- /dev/null
+++ b/sys-devel/clang/clang-17.0.0_pre20230520.ebuild
@@ -0,0 +1,480 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit cmake llvm llvm.org multilib multilib-minimal
+inherit prefix python-single-r1 toolchain-funcs
+
+DESCRIPTION="C language family frontend for LLVM"
+HOMEPAGE="https://llvm.org/"
+
+# MSVCSetupApi.h: MIT
+# sorttable.js: MIT
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS=""
+IUSE="+debug doc +extra ieee-long-double +pie +static-analyzer test xml"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}]
+ static-analyzer? ( dev-lang/perl:* )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ ${DEPEND}
+ >=sys-devel/clang-common-${PV}
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-util/cmake-3.16
+ doc? ( $(python_gen_cond_dep '
+ dev-python/recommonmark[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ') )
+ xml? ( virtual/pkgconfig )
+"
+PDEPEND="
+ ~sys-devel/clang-runtime-${PV}
+ sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=(
+ clang clang-tools-extra cmake
+ llvm/lib/Transforms/Hello
+)
+LLVM_MANPAGES=1
+LLVM_TEST_COMPONENTS=(
+ llvm/utils
+)
+LLVM_USE_TARGETS=llvm
+llvm.org_set_globals
+
+# Multilib notes:
+# 1. ABI_* flags control ABIs libclang* is built for only.
+# 2. clang is always capable of compiling code for all ABIs for enabled
+# target. However, you will need appropriate crt* files (installed
+# e.g. by sys-devel/gcc and sys-libs/glibc).
+# 3. ${CHOST}-clang wrappers are always installed for all ABIs included
+# in the current profile (i.e. alike supported by sys-devel/gcc).
+#
+# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need
+# multilib clang* libraries (not runtime, not wrappers).
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # create extra parent dir for relative CLANG_RESOURCE_DIR access
+ mkdir -p x/y || die
+ BUILD_DIR=${WORKDIR}/x/y/clang
+
+ llvm.org_src_prepare
+
+ # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch)
+ eprefixify \
+ lib/Lex/InitHeaderSearch.cpp \
+ lib/Driver/ToolChains/Darwin.cpp || die
+
+ if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then
+ sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die
+ fi
+}
+
+check_distribution_components() {
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
+ local all_targets=() my_targets=() l
+ cd "${BUILD_DIR}" || die
+
+ while read -r l; do
+ if [[ ${l} == install-*-stripped:* ]]; then
+ l=${l#install-}
+ l=${l%%-stripped*}
+
+ case ${l} in
+ # meta-targets
+ clang-libraries|distribution)
+ continue
+ ;;
+ # tools
+ clang|clangd|clang-*)
+ ;;
+ # static libraries
+ clang*|findAllSymbols)
+ continue
+ ;;
+ # conditional to USE=doc
+ docs-clang-html|docs-clang-tools-html)
+ use doc || continue
+ ;;
+ esac
+
+ all_targets+=( "${l}" )
+ fi
+ done < <(${NINJA} -t targets all)
+
+ while read -r l; do
+ my_targets+=( "${l}" )
+ done < <(get_distribution_components $"\n")
+
+ local add=() remove=()
+ for l in "${all_targets[@]}"; do
+ if ! has "${l}" "${my_targets[@]}"; then
+ add+=( "${l}" )
+ fi
+ done
+ for l in "${my_targets[@]}"; do
+ if ! has "${l}" "${all_targets[@]}"; then
+ remove+=( "${l}" )
+ fi
+ done
+
+ if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
+ eqawarn "get_distribution_components() is outdated!"
+ eqawarn " Add: ${add[*]}"
+ eqawarn "Remove: ${remove[*]}"
+ fi
+ cd - >/dev/null || die
+ fi
+}
+
+get_distribution_components() {
+ local sep=${1-;}
+
+ local out=(
+ # common stuff
+ clang-cmake-exports
+ clang-headers
+ clang-resource-headers
+ libclang-headers
+
+ aarch64-resource-headers
+ arm-common-resource-headers
+ arm-resource-headers
+ core-resource-headers
+ cuda-resource-headers
+ hexagon-resource-headers
+ hip-resource-headers
+ hlsl-resource-headers
+ mips-resource-headers
+ opencl-resource-headers
+ openmp-resource-headers
+ ppc-htm-resource-headers
+ ppc-resource-headers
+ riscv-resource-headers
+ systemz-resource-headers
+ utility-resource-headers
+ ve-resource-headers
+ webassembly-resource-headers
+ windows-resource-headers
+ x86-resource-headers
+
+ # libs
+ clang-cpp
+ libclang
+ )
+
+ if multilib_is_native_abi; then
+ out+=(
+ # common stuff
+ bash-autocomplete
+ libclang-python-bindings
+
+ # tools
+ amdgpu-arch
+ c-index-test
+ clang
+ clang-format
+ clang-linker-wrapper
+ clang-offload-bundler
+ clang-offload-packager
+ clang-refactor
+ clang-repl
+ clang-rename
+ clang-scan-deps
+ diagtool
+ hmaptool
+ nvptx-arch
+
+ # needed for cross-compiling Clang
+ clang-tblgen
+ )
+
+ if use extra; then
+ out+=(
+ # extra tools
+ clang-apply-replacements
+ clang-change-namespace
+ clang-doc
+ clang-include-cleaner
+ clang-include-fixer
+ clang-move
+ clang-pseudo
+ clang-query
+ clang-reorder-fields
+ clang-tidy
+ clang-tidy-headers
+ clangd
+ find-all-symbols
+ modularize
+ pp-trace
+ )
+ fi
+
+ if llvm_are_manpages_built; then
+ out+=( docs-clang-man )
+ use extra && out+=( docs-clang-tools-man )
+ fi
+
+ if use doc; then
+ out+=( docs-clang-html )
+ use extra && out+=( docs-clang-tools-html )
+ fi
+
+ use static-analyzer && out+=(
+ clang-check
+ clang-extdef-mapping
+ scan-build
+ scan-build-py
+ scan-view
+ )
+ fi
+
+ printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}")
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang"
+ # relative to bindir
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}"
+
+ -DBUILD_SHARED_LIBS=OFF
+ -DCLANG_LINK_CLANG_DYLIB=ON
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+ -DCLANG_INCLUDE_TESTS=$(usex test)
+
+ -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+
+ # these are not propagated reliably, so redefine them
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+
+ # libgomp support fails to find headers without explicit -I
+ # furthermore, it provides only syntax checking
+ -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp
+
+ # disable using CUDA to autodetect GPU, just build for all
+ -DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON
+ # disable linking to HSA to avoid automagic dep,
+ # load it dynamically instead
+ -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON
+
+ -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie)
+
+ -DCLANG_ENABLE_LIBXML2=$(usex xml)
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+ # TODO: CLANG_ENABLE_HLSL?
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
+ use test && mycmakeargs+=(
+ -DLLVM_BUILD_TESTS=ON
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=ON
+ -DLLVM_ENABLE_SPHINX=ON
+ -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ if use extra; then
+ mycmakeargs+=(
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra"
+ )
+ fi
+ fi
+ mycmakeargs+=(
+ -DCLANG_INCLUDE_DOCS=${build_docs}
+ )
+ fi
+ if multilib_native_use extra; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra
+ -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs}
+ )
+ else
+ mycmakeargs+=(
+ -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
+ )
+ fi
+
+ if [[ -n ${EPREFIX} ]]; then
+ mycmakeargs+=(
+ -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
+ )
+ fi
+
+ if tc-is-cross-compiler; then
+ has_version -b sys-devel/clang:${LLVM_MAJOR} ||
+ die "sys-devel/clang:${LLVM_MAJOR} is required on the build host."
+ local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin
+ mycmakeargs+=(
+ -DLLVM_TOOLS_BINARY_DIR="${tools_bin}"
+ -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen
+ )
+ fi
+
+ # LLVM can have very high memory consumption while linking,
+ # exhausting the limit on 32-bit linker executable
+ use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ cmake_src_configure
+
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ cmake_build distribution
+
+ # provide a symlink for tests
+ if [[ ! -L ${WORKDIR}/lib/clang ]]; then
+ mkdir -p "${WORKDIR}"/lib || die
+ ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die
+ fi
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ local test_targets=( check-clang )
+ if multilib_native_use extra; then
+ test_targets+=(
+ check-clang-tools
+ check-clangd
+ )
+ fi
+ cmake_build "${test_targets[@]}"
+}
+
+src_install() {
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/clang/Config/config.h
+ )
+
+ multilib-minimal_src_install
+
+ # Move runtime headers to /usr/lib/clang, where they belong
+ mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
+ # move (remaining) wrapped headers back
+ if use extra; then
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
+ fi
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
+
+ # Apply CHOST and version suffix to clang tools
+ local clang_tools=( clang clang++ clang-cl clang-cpp )
+ local abi i
+
+ # cmake gives us:
+ # - clang-X
+ # - clang -> clang-X
+ # - clang++, clang-cl, clang-cpp -> clang
+ # we want to have:
+ # - clang-X
+ # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X
+ # - clang, clang++, clang-cl, clang-cpp -> clang*-X
+ # also in CHOST variant
+ for i in "${clang_tools[@]:1}"; do
+ rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die
+ dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}"
+ dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}"
+ done
+
+ # now create target symlinks for all supported ABIs
+ for abi in $(get_all_abis); do
+ local abi_chost=$(get_abi_CHOST "${abi}")
+ for i in "${clang_tools[@]}"; do
+ dosym "${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}"
+ dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \
+ "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}"
+ done
+ done
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-distribution
+
+ # move headers to /usr/include for wrapping & ABI mismatch checks
+ # (also drop the version suffix from runtime headers)
+ rm -rf "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
+ if multilib_native_use extra; then
+ # don't wrap clang-tidy headers, the list is too long
+ # (they're fine for non-native ABI but enabling the targets is problematic)
+ mv "${ED}"/usr/include/clang-tidy "${T}/" || die
+ fi
+}
+
+multilib_src_install_all() {
+ python_fix_shebang "${ED}"
+ if use static-analyzer; then
+ python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view
+ fi
+
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ llvm_install_manpages
+ # match 'html' non-compression
+ use doc && docompress -x "/usr/share/doc/${PF}/tools-extra"
+ # +x for some reason; TODO: investigate
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1"
+}
+
+pkg_postinst() {
+ if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ eselect compiler-shadow update all
+ fi
+
+ elog "You can find additional utility scripts in:"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang"
+ if use extra; then
+ elog "Some of them are vim integration scripts (with instructions inside)."
+ elog "The run-clang-tidy.py script requires the following additional package:"
+ elog " dev-python/pyyaml"
+ fi
+}
+
+pkg_postrm() {
+ if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ eselect compiler-shadow clean all
+ fi
+}
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 9e151a20ad36..c5560a520fde 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -23,6 +23,7 @@ DIST gcc-12.3.0-patches-2.tar.xz 14236 BLAKE2B 06c43662c9abb0fa3cf90d5e2273c69ae
DIST gcc-12.3.0.tar.xz 85491976 BLAKE2B a239749089e284887435b9fabc360a36764be1095f4c78eeac6f056f91dd23c49dab2ebec5da32a81bcc08fe8277dd3c714ad114ad725d24317faac03354d595 SHA512 8fb799dfa2e5de5284edf8f821e3d40c2781e4c570f5adfdb1ca0671fcae3fb7f794ea783e80f01ec7bfbf912ca508e478bd749b2755c2c14e4055648146c204
DIST gcc-13-20230506.tar.xz 83939392 BLAKE2B 439a139f6ef4b4c3afb5d3e4db69f2a4aa24a410c7b9c6689e58b2eec6383388ebbbd8a6f7be1d5cba2aac770ec7758a8b4b6bae80c63475a3b72372d1bef283 SHA512 5255500c92a72fe066b110efb20c73da217ddaf38d726b1a8f051dd27b6a613f3b4379762cdf4310823113e9bc75a31d6d72c060b20216a2a6bcd34800a2e1e1
DIST gcc-13-20230513.tar.xz 83957000 BLAKE2B c1d17c383b5735744952ef61fa34f0129b304cae78dbeb0e780a81ec4dbfbbc438f8546770da973155ec5f9250d36be587a8491c88d4424b1123f47ba24d52eb SHA512 a82e38d273a668e4a8ad33282cb74661d125babcc6165eb0ada5da471154b2ed2894bf1fa462f0345f9d817e733b155c09a971885f3b7c04398ebcdd3b5551f5
+DIST gcc-13-20230520.tar.xz 83959400 BLAKE2B 7be5d333a2447923c547ed76bab86fb9a1206dde1ffeb8be0a2cb95f8e99910aa40479f221374aaf5bdea5dd7514b3d69347512d9cebb91dd23f585541efa43a SHA512 d6c8626822855f71cc58b6b36ebb38092aaf12fa9aa40b8d70fb3edc9f4c614fbf47626ea5cc1ec631bc47b5d64911bfdb7cfc6924f27a54016b1f8c9c7588d7
DIST gcc-13.1.0.tar.xz 87451196 BLAKE2B b956a773cffe8b43bd6c9a99fe614f53f665438925a6b320975d301f547923e45d4d6fa577a143467fb03e0a9c1bab2b6719a1011d672367f3e644433a2d7606 SHA512 6cf06dfc48f57f5e67f7efe3248019329a14d690c728d9f2f7ef5fa0d58f1816f309586ba7ea2eac20d0b60a2d1b701f68392e9067dd46f827ba0efd7192db33
DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69
DIST gcc-13.2.0-patches-1.tar.xz 15792 BLAKE2B 2ffa9ac013c0f9a91eb93e87e3bc6c378d02cca32ad3f8a84d1249e257eb02b206ec10fa425738a4bae2ffb7db8506afcee2a8dd855357e4b48636608aa24e50 SHA512 917ea178f3696724f9ec08aebb6976f03c5edf8ee21bb4bad7e2d820507452f6dace6e847c4f342a52870642550f34da0346ee635a60ba0c1bff667e0e31d195
@@ -38,12 +39,12 @@ DIST gcc-9.5.0.tar.xz 72462752 BLAKE2B 69e39314ee6bb46e3be491ba9c3cbc4914cb716f7
EBUILD gcc-10.4.1_p20230426-r1.ebuild 1445 BLAKE2B a6a759d0f07a343e09ec0f276aada26220d8744454d84eb2a90d46ff4ef5276eb8a5f2fc4199322bda0244e5333d6ca78b4e8371d2a5dc766b74666c314fffb2 SHA512 28546255497f945a181ab16cc75496c7d2a72bad7e145317e30c3b839836d9947bbc3c6bcd8d668924b54affabef0656288a753c25f4f77be64ac24b1b90f62c
EBUILD gcc-10.4.1_p20230503.ebuild 1448 BLAKE2B 73751ab8b6db6be027072afa1584239b49d6ad8c94e5d05a870110252a5500228f804b357eee1f468aad53d1acc58b7263980a0054d996466f143caf7b1bc3b8 SHA512 19fc398deb55058957516be1a534ce4861baae60bbeed4aea4f73a4476721892df5bcbc1b69d8f23c6e6412fbaa39aa4f67044bb9cb332b58901e8a276c73f08
EBUILD gcc-10.4.1_p20230510.ebuild 1448 BLAKE2B 73751ab8b6db6be027072afa1584239b49d6ad8c94e5d05a870110252a5500228f804b357eee1f468aad53d1acc58b7263980a0054d996466f143caf7b1bc3b8 SHA512 19fc398deb55058957516be1a534ce4861baae60bbeed4aea4f73a4476721892df5bcbc1b69d8f23c6e6412fbaa39aa4f67044bb9cb332b58901e8a276c73f08
-EBUILD gcc-10.4.1_p20230517.ebuild 1448 BLAKE2B 73751ab8b6db6be027072afa1584239b49d6ad8c94e5d05a870110252a5500228f804b357eee1f468aad53d1acc58b7263980a0054d996466f143caf7b1bc3b8 SHA512 19fc398deb55058957516be1a534ce4861baae60bbeed4aea4f73a4476721892df5bcbc1b69d8f23c6e6412fbaa39aa4f67044bb9cb332b58901e8a276c73f08
+EBUILD gcc-10.4.1_p20230517.ebuild 1453 BLAKE2B be0cbe27af5fb742f25225df5129206859e388444f402947ce370dbb422e738b73edeb63861f2ead6732c201095f6885ea154d87e99c5f40468f9c8918eef7e2 SHA512 6253acd2ae9a4123288c1d44686d34544b5e2bc591fb491b78f61eb1852d3e21d661236debbbf0157380025fc20b3c044c3590abe22bb4dd1689430157ec2d45
EBUILD gcc-10.5.9999.ebuild 1108 BLAKE2B 2db612df53fbaec59c707acb56bac804a4ee797d156ea3dfca6396d27268385f1d5177c44bd58a926c981ab1c0c7b7adf5e4ea060a65a9e84e7f8ed1713701b0 SHA512 5193d1f4359ef8963645d25150731ab1929801eae16e94ddef3fb0169ed365d2ac43765a2d4848966508144e121b8b24feccbe66f59ee9363764d5a3db79f946
EBUILD gcc-11.3.1_p20230427.ebuild 1334 BLAKE2B cb480f1ae20bc31900948f61f48a050ed177d6303a76d555a596636767871bca8ff6446466970fbc43e2fe02f047c22a27416eb3b580812ee481b8ce4d630850 SHA512 fa62bf94450bae1fab07cc2e4030a13e2c58e06518ba44f86710049343ceeb8e535ce108225234e8b7fe50523d62414dcaf1d0148e80607bc1f6a8d0e13941b7
EBUILD gcc-11.3.1_p20230504.ebuild 1346 BLAKE2B 278dd8483ef6034566c4ae12f9dfde8aac418129742a5c54564ff44655272c463f1cd0c2effb80aeb478b9cb8e01ef3b9e5095a4aa8a58367b5471cb778c29df SHA512 bd6b229f3aceb94ab1b944b89af9db2f4ae76f3c5387cbb333d0b52b11cd39fb0d179efb932089512d9a845197d97d17dca8a77117943a1bbf70056dc0bdcc5b
EBUILD gcc-11.3.1_p20230511.ebuild 1346 BLAKE2B 278dd8483ef6034566c4ae12f9dfde8aac418129742a5c54564ff44655272c463f1cd0c2effb80aeb478b9cb8e01ef3b9e5095a4aa8a58367b5471cb778c29df SHA512 bd6b229f3aceb94ab1b944b89af9db2f4ae76f3c5387cbb333d0b52b11cd39fb0d179efb932089512d9a845197d97d17dca8a77117943a1bbf70056dc0bdcc5b
-EBUILD gcc-11.3.1_p20230518.ebuild 1346 BLAKE2B 278dd8483ef6034566c4ae12f9dfde8aac418129742a5c54564ff44655272c463f1cd0c2effb80aeb478b9cb8e01ef3b9e5095a4aa8a58367b5471cb778c29df SHA512 bd6b229f3aceb94ab1b944b89af9db2f4ae76f3c5387cbb333d0b52b11cd39fb0d179efb932089512d9a845197d97d17dca8a77117943a1bbf70056dc0bdcc5b
+EBUILD gcc-11.3.1_p20230518.ebuild 1343 BLAKE2B 8ecf0b1616754df373f3a76b1e663176eecefbd2ac79752053d8df7276046ad45187cb40900ab4f61e9ef9afb30fab0d09113476397fa8da8b06821d61ffe1ec SHA512 e7e28819115d9ec9626fbc83f5539dec278e45cb78781a48fd6f141b38a8cbf4cd459c1e134ae2636e7613a336322cafd42e7feef14fe793a8aacd29f6fafb53
EBUILD gcc-11.4.9999.ebuild 1315 BLAKE2B 45a8f481e0c08e5274d1797e421431e898753fce22426a1b2a1f4fd23c4dd44bed5f15da4c67f1c108b25d8393683fef631f998b8b524aa0d356be04625c0562 SHA512 fc4d8913f2aeed856b123a4545655813fe20544d841feca5121f85291a2aec99c770d845b14ce936c2fb14b5b9b1cd85166190ec657528bcb1710c7b48385c16
EBUILD gcc-12.2.1_p20230428-r1.ebuild 1475 BLAKE2B 69112653719b589bd72fe454b963d050194a8dc3a665fc7317989368cf0ff4281ac2f8519d7fc46311a3f91528d2e0457485357e67ff72765d6cfe743f0b4a2c SHA512 2e771e67e1668bf90695cc42517f46518e445a4af6e7cb9c8532efea047a4174d40f18b256cc99beec2b5fe5abde4f1ea7cb3ad84f4491032036d6b53f941e91
EBUILD gcc-12.3.0.ebuild 1581 BLAKE2B a5895792b8a60592ed888bd9219f85fcbe71a26ac1351e4c393753da80263b9ec2937573e9a23de51b40666d7dc1fc3f78f27eeedc31a9b3a6cce3baed91e2b9 SHA512 eacce837d30335396e5ca78b53f3cb23fd181a132cdc832ecc31353ce71e599b5e43ac6333769b70bd084cace3ae96b551216b3e53b892a0b0f93465f5465edf
@@ -54,6 +55,7 @@ EBUILD gcc-12.4.9999.ebuild 1593 BLAKE2B 8246fe30de8cf3d515b1c5c23eea470de257aec
EBUILD gcc-13.1.0-r1.ebuild 1664 BLAKE2B bdcba5d20f3748daf50f8f1d2ae85c22e7b8b472d2e99124758ede62ffad19d5a5551b3176006b23f3316f8027d43a93ef5ad3fb5a761c81419588cb614d26a0 SHA512 dc0f06cce63ab80e7990e2302a21a43e8423f4a23eb9cda8503529d1adf7207022106c3a8ac21af0fd5c9a0b31b4d73a64e5e4b12b2db5f516ba3f3dd1bf61a5
EBUILD gcc-13.1.1_p20230506.ebuild 1667 BLAKE2B f1b5e024192ec9018b8de8f9db0ee151264b356551f8c8af5af9f7772efdb4fe07206ea4a854f6476d4950cba25087ced439d724d6a515839a0ac7c5756da935 SHA512 3fbc45c4b23d3c2f93b3edcd329f8627359a7305f0640a089aeb995845b69db058da97ec995f1f0a86438a28d6922d513c50a3fb81198daa6834eed4a99c055b
EBUILD gcc-13.1.1_p20230513.ebuild 1664 BLAKE2B 23048387338cf6f3ad98d3fd0b806f4f24f0e33bc04870e22988b1eaf4dfbe973f387116f5f00c17ad8e3bcb80a02eab7b53f509cb22a1a2cb24a3143ac51167 SHA512 831547e8c20424d19f3347e6267a52a715e1a753d4592535fb9456fa345c1aecb350101462ebebec4be3c2b4fa428a5974628768b60d309f0fcfc2e3c7258033
+EBUILD gcc-13.1.1_p20230520.ebuild 1664 BLAKE2B 23048387338cf6f3ad98d3fd0b806f4f24f0e33bc04870e22988b1eaf4dfbe973f387116f5f00c17ad8e3bcb80a02eab7b53f509cb22a1a2cb24a3143ac51167 SHA512 831547e8c20424d19f3347e6267a52a715e1a753d4592535fb9456fa345c1aecb350101462ebebec4be3c2b4fa428a5974628768b60d309f0fcfc2e3c7258033
EBUILD gcc-13.2.9999.ebuild 1593 BLAKE2B 6ada03c3a63cbdb90a06954f02809b1f7aec31130c010981554ef8df4db41d79d856ee514694b9f900983e7649cc94929e3050764ff6fef5a8227701710d423a SHA512 89b624dc6f8a1187f3d36f9988409c27e1e2133889a1135be0ecaa3aaa7c381f780cc20aa8095be9bc31c4e16b96128ba50dc17431305bf3f334025956a95746
EBUILD gcc-14.0.0.9999.ebuild 1591 BLAKE2B 8a463d1b3d812a22a29a4aec27504bc138a69939b328f6fecf4eecaa90aa51acdb2e53fdf5ca5d69c5159019c354ad9ecaff218181f06fbbd9a0da43fc70c962 SHA512 67e09c08daf026d9c61f8feeafcd595c37103c04879641f6d79ef7ceeb0d44d84dd81bc340e77d031c8675a4ac858ea5a555fe0dc76fcce57991361b2d09c1b5
EBUILD gcc-14.0.0_pre20230507.ebuild 1622 BLAKE2B 459d438085fc5382680372ccbe7223f56906207667619a7788c5ff1c2b573c363481c9857f64aa17f5a67ddf35d5a4c79b559dad70b8bf2593710b610c19335a SHA512 fe6b9cf8dcee281c71ef30a28f5da38922f2be6671573545f3a7b3b1db9220aa6236f3441fe3ad2d31b389ef752dbe68f1b75f45532565fd20e0bd01ebcdf77e
diff --git a/sys-devel/gcc/gcc-10.4.1_p20230517.ebuild b/sys-devel/gcc/gcc-10.4.1_p20230517.ebuild
index 878de0807e9a..6d1bc02f4dde 100644
--- a/sys-devel/gcc/gcc-10.4.1_p20230517.ebuild
+++ b/sys-devel/gcc/gcc-10.4.1_p20230517.ebuild
@@ -35,9 +35,9 @@ inherit toolchain
EGIT_BRANCH=releases/gcc-$(ver_cut 1)
# Don't keyword live ebuilds
-#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
-# KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-#fi
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
RDEPEND=""
BDEPEND="${CATEGORY}/binutils"
diff --git a/sys-devel/gcc/gcc-11.3.1_p20230518.ebuild b/sys-devel/gcc/gcc-11.3.1_p20230518.ebuild
index 9b57b16f07be..a43b016c3fc3 100644
--- a/sys-devel/gcc/gcc-11.3.1_p20230518.ebuild
+++ b/sys-devel/gcc/gcc-11.3.1_p20230518.ebuild
@@ -27,9 +27,9 @@ inherit toolchain
EGIT_BRANCH=releases/gcc-$(ver_cut 1)
# Don't keyword live ebuilds
-#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
-# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-#fi
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
if [[ ${CATEGORY} != cross-* ]] ; then
# Technically only if USE=hardened *too* right now, but no point in complicating it further.
diff --git a/sys-devel/gcc/gcc-13.1.1_p20230520.ebuild b/sys-devel/gcc/gcc-13.1.1_p20230520.ebuild
new file mode 100644
index 000000000000..880709fcab38
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.1.1_p20230520.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="2"
+PATCH_GCC_VER="13.2.0"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # Technically only if USE=hardened *too* right now, but no point in complicating it further.
+ # If GCC is enabling CET by default, we need glibc to be built with support for it.
+ # bug #830454
+ RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+ DEPEND="${RDEPEND}"
+ BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+fi
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply_user
+}
diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest
index dc1542e16b05..660f1e7f173f 100644
--- a/sys-devel/lld/Manifest
+++ b/sys-devel/lld/Manifest
@@ -8,6 +8,7 @@ DIST llvm-project-16.0.4.src.tar.xz 117996332 BLAKE2B 2ea3ef25290ce6180d271e42fb
DIST llvm-project-16.0.4.src.tar.xz.sig 566 BLAKE2B 43cb2147f12f98f864797158e8efcfed9c6780fae3b5c71c0f1aea19a4131ee91c36bdf5b10e44f478f2370c8d22a9038038ecd607f25a95f2d3e33628eb9ac0 SHA512 c902d1b652e6e144fcf74f550539f56665475b6bdf673ba5bf2f1731c3bb8f5717ed56433d488c54bbf2f429b432da84e0bfb4b5fb5f2b7fa208b4f24f682be7
DIST llvm-project-52882de0e641487329c9e093a90ea3dad01842c8.tar.gz 182953335 BLAKE2B 98682729992d73202e35b540d5d0d87e2acf44e4ab6896a0b6f9ac4a7423f55ad370ae1d7e919a6c86dc7f138a66890ac89b852b03305612d248ab567833f8be SHA512 3685aff0f648e9b477e1e01edebe4799498c21587e2ed5577e2fdef98bb21ea215e206606a11692fbb93a0989fd59fd324faff2c4d97b7afca0851b53f123f05
DIST llvm-project-7d436d56b60b36508b94e39d08761f1405a9c770.tar.gz 183363091 BLAKE2B e0d3520814b3455e33107715697f00d653ad46bb8d8200caf42c42743520f389217ea2e57449bbc2e98126b602b2aa344e4125e4b1f92152f7957a11a9b9a150 SHA512 65a8e30702217e5e1309efe3daeda5115eeb2e8d25238db1fa4e8dcfc729d75655a10b3394f2f70b7e7efb8ea33a31b6e2482065cc81805023101da00584a81e
+DIST llvm-project-abbb22cc0c9c33dedb8d53c2bd3e703f92baace7.tar.gz 183193919 BLAKE2B 75c63d39918f7ec0faca0b1d03ba17dbd7d39a6f1d3a031dcb005ae1729933d8481f0bd745ec029ab21779525b2ddaf2989eaca2aed2b0e9b60c50ef71c7fc11 SHA512 f0c1b6fe2e087db202d32de05613b7570bd9a82dfef2e464014c9d4c9ba02c20d423cb783aa40ce5e9c9e074288efb2e5b6d70d55913bd285108e747400f55e7
EBUILD lld-14.0.6-r1.ebuild 2009 BLAKE2B 4db1dfc9b1997d31cc68240ae0b05afeae5a6b1cb24a0eb2012bc28b2ac8c0da4b532d270d070db5fd401717320a74b006628c19a12c787e2f9ba2dc24eb25b1 SHA512 73b2f0e7b27497ce9037cd10503b328378ff9a2e32cd36e6e264f5423cd05732da4ea2ef97b637fc344a4f3d5d3597c60dda29dba7eb509391c176d32d53a427
EBUILD lld-15.0.7.ebuild 2262 BLAKE2B 8882ba45692d54840d8a5933910ade614427733f3da2e344cf4df2806c125a783ff3c6ad4a2f76fd577cb4787fe07495c93e981c03f116fa7f383575d59936f7 SHA512 9b08495f068a01e991d200363549d29e9146e8687b297fa06beda90da1da9a793b1ebf512c3dad9bb985518a8fd9d1d13049a90dd8f06d4bc3de97779ff8e6ed
EBUILD lld-16.0.3.ebuild 2239 BLAKE2B 33f554acd6e1db31f9aec3d75b2c43994a95240ba42bcdf7060090231ff6214e896b5fd051fcb513337161cef408014f64391e9ecfcf5269749fcfdb8a3771da SHA512 a06a9e4ff4f9109dd4eb3f3fdb2308b043beca30c016b184a3f77e7c4728161b3a1b4a662fccf102419c4a3aabab9e30db5a3c87448fb8b2a91237bc08e834ea
@@ -16,4 +17,5 @@ EBUILD lld-16.0.5.9999.ebuild 2197 BLAKE2B 0f6db5db6fff4f572187749ab1704fce82e18
EBUILD lld-17.0.0.9999.ebuild 2157 BLAKE2B dd17cb187ecc5f448245e19ce67fc9abf26bad3fd62b4f999d01defc43b87e8d47f1613212d56e66061f414de947e0e2a9e24aeffd4b4baf947714b5dadb5ba0 SHA512 fca39302715a0c083b24b94336eeb53a376d69e014f49922ce49987ce2a8c591727cdde49fd70ed5067305c807e4445653753efd5900d8bb61e5b47269fd37d6
EBUILD lld-17.0.0_pre20230502.ebuild 2157 BLAKE2B dd17cb187ecc5f448245e19ce67fc9abf26bad3fd62b4f999d01defc43b87e8d47f1613212d56e66061f414de947e0e2a9e24aeffd4b4baf947714b5dadb5ba0 SHA512 fca39302715a0c083b24b94336eeb53a376d69e014f49922ce49987ce2a8c591727cdde49fd70ed5067305c807e4445653753efd5900d8bb61e5b47269fd37d6
EBUILD lld-17.0.0_pre20230512.ebuild 2157 BLAKE2B dd17cb187ecc5f448245e19ce67fc9abf26bad3fd62b4f999d01defc43b87e8d47f1613212d56e66061f414de947e0e2a9e24aeffd4b4baf947714b5dadb5ba0 SHA512 fca39302715a0c083b24b94336eeb53a376d69e014f49922ce49987ce2a8c591727cdde49fd70ed5067305c807e4445653753efd5900d8bb61e5b47269fd37d6
+EBUILD lld-17.0.0_pre20230520.ebuild 2157 BLAKE2B dd17cb187ecc5f448245e19ce67fc9abf26bad3fd62b4f999d01defc43b87e8d47f1613212d56e66061f414de947e0e2a9e24aeffd4b4baf947714b5dadb5ba0 SHA512 fca39302715a0c083b24b94336eeb53a376d69e014f49922ce49987ce2a8c591727cdde49fd70ed5067305c807e4445653753efd5900d8bb61e5b47269fd37d6
MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/sys-devel/lld/lld-17.0.0_pre20230520.ebuild b/sys-devel/lld/lld-17.0.0_pre20230520.ebuild
new file mode 100644
index 000000000000..5d38213eefc3
--- /dev/null
+++ b/sys-devel/lld/lld-17.0.0_pre20230520.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+
+DESCRIPTION="The LLVM linker (link editor)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS=""
+IUSE="+debug test zstd"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ~sys-devel/llvm-${PV}[debug=,zstd=]
+ sys-libs/zlib:=
+ zstd? ( app-arch/zstd:= )
+"
+RDEPEND="
+ ${DEPEND}
+ !sys-devel/lld:0
+"
+BDEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+ test? (
+ >=dev-util/cmake-3.16
+ $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+ )
+"
+PDEPEND="
+ >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
+llvm.org_set_globals
+
+python_check_deps() {
+ python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ llvm.org_src_unpack
+
+ # Directory ${WORKDIR}/llvm does not exist with USE="-test",
+ # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below,
+ # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system
+ # (lld/MachO/CMakeLists.txt) and is expected to be resolvable
+ # to existent directory ${WORKDIR}/libunwind/include.
+ mkdir -p "${WORKDIR}/llvm" || die
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DBUILD_SHARED_LIBS=ON
+ -DLLVM_INCLUDE_TESTS=$(usex test)
+ )
+
+ use test && mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ tc-is-cross-compiler && mycmakeargs+=(
+ -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-lld
+}
diff --git a/sys-devel/llvm-common/Manifest b/sys-devel/llvm-common/Manifest
index c74d502bf0ab..3daa66489e9f 100644
--- a/sys-devel/llvm-common/Manifest
+++ b/sys-devel/llvm-common/Manifest
@@ -8,6 +8,7 @@ DIST llvm-project-16.0.4.src.tar.xz 117996332 BLAKE2B 2ea3ef25290ce6180d271e42fb
DIST llvm-project-16.0.4.src.tar.xz.sig 566 BLAKE2B 43cb2147f12f98f864797158e8efcfed9c6780fae3b5c71c0f1aea19a4131ee91c36bdf5b10e44f478f2370c8d22a9038038ecd607f25a95f2d3e33628eb9ac0 SHA512 c902d1b652e6e144fcf74f550539f56665475b6bdf673ba5bf2f1731c3bb8f5717ed56433d488c54bbf2f429b432da84e0bfb4b5fb5f2b7fa208b4f24f682be7
DIST llvm-project-52882de0e641487329c9e093a90ea3dad01842c8.tar.gz 182953335 BLAKE2B 98682729992d73202e35b540d5d0d87e2acf44e4ab6896a0b6f9ac4a7423f55ad370ae1d7e919a6c86dc7f138a66890ac89b852b03305612d248ab567833f8be SHA512 3685aff0f648e9b477e1e01edebe4799498c21587e2ed5577e2fdef98bb21ea215e206606a11692fbb93a0989fd59fd324faff2c4d97b7afca0851b53f123f05
DIST llvm-project-7d436d56b60b36508b94e39d08761f1405a9c770.tar.gz 183363091 BLAKE2B e0d3520814b3455e33107715697f00d653ad46bb8d8200caf42c42743520f389217ea2e57449bbc2e98126b602b2aa344e4125e4b1f92152f7957a11a9b9a150 SHA512 65a8e30702217e5e1309efe3daeda5115eeb2e8d25238db1fa4e8dcfc729d75655a10b3394f2f70b7e7efb8ea33a31b6e2482065cc81805023101da00584a81e
+DIST llvm-project-abbb22cc0c9c33dedb8d53c2bd3e703f92baace7.tar.gz 183193919 BLAKE2B 75c63d39918f7ec0faca0b1d03ba17dbd7d39a6f1d3a031dcb005ae1729933d8481f0bd745ec029ab21779525b2ddaf2989eaca2aed2b0e9b60c50ef71c7fc11 SHA512 f0c1b6fe2e087db202d32de05613b7570bd9a82dfef2e464014c9d4c9ba02c20d423cb783aa40ce5e9c9e074288efb2e5b6d70d55913bd285108e747400f55e7
EBUILD llvm-common-14.0.6.ebuild 602 BLAKE2B ef26d6ac2606e9a316ddcce442da1762f578ade0346ba2a947fdace5e2020e8841c63d173e42506d23abf6efc062a2edfac0be98a3eefe1f7a29c88702e9f1d5 SHA512 789dad6fdcf9a930ddc1046e7e98ebc1e05b2dd3713bb1ec5b8a5711690d779691c91d1000d9776720b21ed241d2f12c0ae9a8dba0e6a17d0ddf563cdfbe657f
EBUILD llvm-common-15.0.7.ebuild 601 BLAKE2B 3dd38d17640ed52ff0be26db026475a9d0e7e1acebe95043bc6e0e63e32ff4f03c5637a9dcce25987f673962447feb4aa015f8b5b5cb33553dc1a4f843b75399 SHA512 e8a93a72d06810cface48cce2d8f8a890cdf009939a96350a23fe407b064c05a3016c663d11a3866dc2dd0fd87599b5ac234895c8c42c902e9b0cdb37dba7b62
EBUILD llvm-common-16.0.3.ebuild 615 BLAKE2B dddab327388341f3330d7374a76bc1ea144aa5cad62feea34140b5825daf13118ff7185a6c2cce07479c3ca13c3ba8ad7cac7ba71a8b49fdd25a979d899a5b0a SHA512 57e7d90e7fc4f5dd2daddd1c7e8ed7885112120aca2b13b21e2fc719cfe5a87bb640aa67c605827bcd60aa71300abeba937e158ae1a1a16559236ef9e6d18319
@@ -16,4 +17,5 @@ EBUILD llvm-common-16.0.5.9999.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd8
EBUILD llvm-common-17.0.0.9999.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd896153222cb62647bc6c4a9f7493fc96c23faf788ce8a976d35333e8d40e63cad4c3f44322f6a41f1dbe53f9e772c3a40d9 SHA512 9661a9c544d8bf3edf6c24a307324a58652c8635703dcfa008cad96826e3404cbb05e5c95fe7df85ed6d2642e4f83cfff0c9a381b796cc78f560854aa071acbe
EBUILD llvm-common-17.0.0_pre20230502.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd896153222cb62647bc6c4a9f7493fc96c23faf788ce8a976d35333e8d40e63cad4c3f44322f6a41f1dbe53f9e772c3a40d9 SHA512 9661a9c544d8bf3edf6c24a307324a58652c8635703dcfa008cad96826e3404cbb05e5c95fe7df85ed6d2642e4f83cfff0c9a381b796cc78f560854aa071acbe
EBUILD llvm-common-17.0.0_pre20230512.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd896153222cb62647bc6c4a9f7493fc96c23faf788ce8a976d35333e8d40e63cad4c3f44322f6a41f1dbe53f9e772c3a40d9 SHA512 9661a9c544d8bf3edf6c24a307324a58652c8635703dcfa008cad96826e3404cbb05e5c95fe7df85ed6d2642e4f83cfff0c9a381b796cc78f560854aa071acbe
+EBUILD llvm-common-17.0.0_pre20230520.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd896153222cb62647bc6c4a9f7493fc96c23faf788ce8a976d35333e8d40e63cad4c3f44322f6a41f1dbe53f9e772c3a40d9 SHA512 9661a9c544d8bf3edf6c24a307324a58652c8635703dcfa008cad96826e3404cbb05e5c95fe7df85ed6d2642e4f83cfff0c9a381b796cc78f560854aa071acbe
MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/sys-devel/llvm-common/llvm-common-17.0.0_pre20230520.ebuild b/sys-devel/llvm-common/llvm-common-17.0.0_pre20230520.ebuild
new file mode 100644
index 000000000000..ce5f03ca34a5
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-17.0.0_pre20230520.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit llvm.org
+
+DESCRIPTION="Common files shared between multiple slots of LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS=""
+
+RDEPEND="
+ !sys-devel/llvm:0
+"
+
+LLVM_COMPONENTS=( llvm/utils/vim )
+llvm.org_set_globals
+
+src_install() {
+ insinto /usr/share/vim/vimfiles
+ doins -r */
+ # some users may find it useful
+ newdoc README README.vim
+ dodoc vimrc
+}
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index 1695df8ee0fe..b180f698eb81 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -16,6 +16,7 @@ DIST llvm-project-16.0.4.src.tar.xz 117996332 BLAKE2B 2ea3ef25290ce6180d271e42fb
DIST llvm-project-16.0.4.src.tar.xz.sig 566 BLAKE2B 43cb2147f12f98f864797158e8efcfed9c6780fae3b5c71c0f1aea19a4131ee91c36bdf5b10e44f478f2370c8d22a9038038ecd607f25a95f2d3e33628eb9ac0 SHA512 c902d1b652e6e144fcf74f550539f56665475b6bdf673ba5bf2f1731c3bb8f5717ed56433d488c54bbf2f429b432da84e0bfb4b5fb5f2b7fa208b4f24f682be7
DIST llvm-project-52882de0e641487329c9e093a90ea3dad01842c8.tar.gz 182953335 BLAKE2B 98682729992d73202e35b540d5d0d87e2acf44e4ab6896a0b6f9ac4a7423f55ad370ae1d7e919a6c86dc7f138a66890ac89b852b03305612d248ab567833f8be SHA512 3685aff0f648e9b477e1e01edebe4799498c21587e2ed5577e2fdef98bb21ea215e206606a11692fbb93a0989fd59fd324faff2c4d97b7afca0851b53f123f05
DIST llvm-project-7d436d56b60b36508b94e39d08761f1405a9c770.tar.gz 183363091 BLAKE2B e0d3520814b3455e33107715697f00d653ad46bb8d8200caf42c42743520f389217ea2e57449bbc2e98126b602b2aa344e4125e4b1f92152f7957a11a9b9a150 SHA512 65a8e30702217e5e1309efe3daeda5115eeb2e8d25238db1fa4e8dcfc729d75655a10b3394f2f70b7e7efb8ea33a31b6e2482065cc81805023101da00584a81e
+DIST llvm-project-abbb22cc0c9c33dedb8d53c2bd3e703f92baace7.tar.gz 183193919 BLAKE2B 75c63d39918f7ec0faca0b1d03ba17dbd7d39a6f1d3a031dcb005ae1729933d8481f0bd745ec029ab21779525b2ddaf2989eaca2aed2b0e9b60c50ef71c7fc11 SHA512 f0c1b6fe2e087db202d32de05613b7570bd9a82dfef2e464014c9d4c9ba02c20d423cb783aa40ce5e9c9e074288efb2e5b6d70d55913bd285108e747400f55e7
EBUILD llvm-14.0.6-r2.ebuild 12389 BLAKE2B 549b4e1c7feceb40c7e5aaa624925ec08627c84236c460f85a044621dc388cfca248f8a311c657a3b3dadbd367472f3c820a635c14246f74fdac98dd2ddf6fd1 SHA512 8559954b641fc007c92d4b3e2fcc129bdd812f974dccf37d74f61cb9d7414e28cbb41d7088767356035b972c1e417561770a89169676841e762e62644c6d0323
EBUILD llvm-14.0.6-r4.ebuild 12320 BLAKE2B 171c0d33e97ea1298768370982a54cf3ca16a223c3778511eb50fe37e256e34c40a2060e70e11be52bf808dc515b3d01378252cc34e173fa0b7753b17e33af36 SHA512 c18ab71a04325b2670df733699da5f5a4a7b414fcfcec00422337831edaf4600faad2ff059867a945be51183446400c21f153c891a4bdcb6c748e44e6bb6b730
EBUILD llvm-15.0.7-r3.ebuild 12493 BLAKE2B 86343f2e904e6e4bbd653656c359470fb94909d48ca2e4f78e1f48bc183fba98c830569e92ac157d8a98471a5500c0a48c3eda3e13bb69d4abc204702a2b865c SHA512 aa7f3438deac9d07bf78dd44e0bc33a1b39f7a3ae4c930ab9908559604b28b3dbd22efbe43152eeeaf36352afff86e3c03ed10717d5e0aa0e983fbafd8aff971
@@ -26,4 +27,5 @@ EBUILD llvm-16.0.5.9999.ebuild 12330 BLAKE2B 0ba8d556723f15cedb1c2296653dd33f614
EBUILD llvm-17.0.0.9999.ebuild 12689 BLAKE2B 188b2dc059691ac3a1d181e8aeeadbe836507ea419f966b12203eb64de15a5c0bed49074e055f91e0e98a07b80bdff355302e4a4b6f27f09ff23753a513848f6 SHA512 9fcda73df117c7fcab2be62ad8f8ed51794c7e247cfab39f2533948a3c105575f75459b6dccca7cdc425a13e45947b13cf40c0e5cf70b771b7755a2063562192
EBUILD llvm-17.0.0_pre20230502.ebuild 12758 BLAKE2B 06bd7ab28d6d6105c3d18ccdec1a24f2e589d693ebe72ed320aa8078bdd98b7a8246813a738d0a66688ca3e23687037c2e85ef9a73be32c5e72e77e32f4280c4 SHA512 fce3a727c79f69ec9094fdb6daa6a75145a91fb49560a16b3d299fd8420902932ee84d3a9faa9ac3016b09906f302fb2f4b4511408766e10ff870e57204c7831
EBUILD llvm-17.0.0_pre20230512.ebuild 12758 BLAKE2B 06bd7ab28d6d6105c3d18ccdec1a24f2e589d693ebe72ed320aa8078bdd98b7a8246813a738d0a66688ca3e23687037c2e85ef9a73be32c5e72e77e32f4280c4 SHA512 fce3a727c79f69ec9094fdb6daa6a75145a91fb49560a16b3d299fd8420902932ee84d3a9faa9ac3016b09906f302fb2f4b4511408766e10ff870e57204c7831
+EBUILD llvm-17.0.0_pre20230520.ebuild 12689 BLAKE2B 188b2dc059691ac3a1d181e8aeeadbe836507ea419f966b12203eb64de15a5c0bed49074e055f91e0e98a07b80bdff355302e4a4b6f27f09ff23753a513848f6 SHA512 9fcda73df117c7fcab2be62ad8f8ed51794c7e247cfab39f2533948a3c105575f75459b6dccca7cdc425a13e45947b13cf40c0e5cf70b771b7755a2063562192
MISC metadata.xml 2782 BLAKE2B 4bd546287f630462c3f5d98cbd15a59a4cdef4023f86a5f4fe64fc5f10256cae7014d18823bd0909f4af4e42f299b6e7983c9c3c569cfab1ad38b0160f1eae40 SHA512 6bf1dc4f71f50e1eecc55cbb8366d8ed82a3dd328871acf1d808fc5e3ee4d203d623f81d9968bda45a87c72a2f20ed69b735b0a289b0052b048175cf6502e124
diff --git a/sys-devel/llvm/llvm-17.0.0_pre20230520.ebuild b/sys-devel/llvm/llvm-17.0.0_pre20230520.ebuild
new file mode 100644
index 000000000000..c2c2d7c6b628
--- /dev/null
+++ b/sys-devel/llvm/llvm-17.0.0_pre20230520.ebuild
@@ -0,0 +1,533 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit cmake llvm.org multilib-minimal pax-utils python-any-r1
+inherit toolchain-funcs
+
+DESCRIPTION="Low Level Virtual Machine"
+HOMEPAGE="https://llvm.org/"
+
+# Additional licenses:
+# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
+# 2. xxhash: BSD.
+# 3. MD5 code: public-domain.
+# 4. ConvertUTF.h: TODO.
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+KEYWORDS=""
+IUSE="
+ +binutils-plugin +debug debuginfod doc exegesis libedit +libffi
+ ncurses test xar xml z3 zstd
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ debuginfod? (
+ net-misc/curl:=
+ dev-cpp/cpp-httplib:=
+ )
+ exegesis? ( dev-libs/libpfm:= )
+ libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
+ libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
+ xar? ( app-arch/xar )
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+ z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+ ${RDEPEND}
+ binutils-plugin? ( sys-libs/binutils-libs )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ >=dev-util/cmake-3.16
+ sys-devel/gnuconfig
+ kernel_Darwin? (
+ <sys-libs/libcxx-${LLVM_VERSION}.9999
+ >=sys-devel/binutils-apple-5.1
+ )
+ doc? ( $(python_gen_any_dep '
+ dev-python/recommonmark[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ') )
+ libffi? ( virtual/pkgconfig )
+"
+# There are no file collisions between these versions but having :0
+# installed means llvm-config there will take precedence.
+RDEPEND="
+ ${RDEPEND}
+ !sys-devel/llvm:0
+"
+PDEPEND="
+ sys-devel/llvm-common
+ sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
+ binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
+"
+
+LLVM_COMPONENTS=( llvm cmake third-party )
+LLVM_MANPAGES=1
+LLVM_USE_TARGETS=provide
+llvm.org_set_globals
+
+python_check_deps() {
+ use doc || return 0
+
+ python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
+}
+
+check_uptodate() {
+ local prod_targets=(
+ $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
+ | tail -n +2 | head -n -1)
+ )
+ local all_targets=(
+ lib/Target/*/
+ )
+ all_targets=( "${all_targets[@]#lib/Target/}" )
+ all_targets=( "${all_targets[@]%/}" )
+
+ local exp_targets=() i
+ for i in "${all_targets[@]}"; do
+ has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
+ done
+
+ if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
+ eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
+ eqawarn "Expected: ${exp_targets[*]}"
+ eqawarn
+ fi
+
+ if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then
+ eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}"
+ eqawarn "Expected: ${prod_targets[*]}"
+ fi
+}
+
+check_distribution_components() {
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
+ local all_targets=() my_targets=() l
+ cd "${BUILD_DIR}" || die
+
+ while read -r l; do
+ if [[ ${l} == install-*-stripped:* ]]; then
+ l=${l#install-}
+ l=${l%%-stripped*}
+
+ case ${l} in
+ # shared libs
+ LLVM|LLVMgold)
+ ;;
+ # TableGen lib + deps
+ LLVMDemangle|LLVMSupport|LLVMTableGen)
+ ;;
+ # testing libraries
+ LLVMTestingAnnotations|LLVMTestingSupport)
+ ;;
+ # static libs
+ LLVM*)
+ continue
+ ;;
+ # meta-targets
+ distribution|llvm-libraries)
+ continue
+ ;;
+ # used only w/ USE=doc
+ docs-llvm-html)
+ use doc || continue
+ ;;
+ esac
+
+ all_targets+=( "${l}" )
+ fi
+ done < <(${NINJA} -t targets all)
+
+ while read -r l; do
+ my_targets+=( "${l}" )
+ done < <(get_distribution_components $"\n")
+
+ local add=() remove=()
+ for l in "${all_targets[@]}"; do
+ if ! has "${l}" "${my_targets[@]}"; then
+ add+=( "${l}" )
+ fi
+ done
+ for l in "${my_targets[@]}"; do
+ if ! has "${l}" "${all_targets[@]}"; then
+ remove+=( "${l}" )
+ fi
+ done
+
+ if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
+ eqawarn "get_distribution_components() is outdated!"
+ eqawarn " Add: ${add[*]}"
+ eqawarn "Remove: ${remove[*]}"
+ fi
+ cd - >/dev/null || die
+ fi
+}
+
+src_prepare() {
+ # disable use of SDK on OSX, bug #568758
+ sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
+
+ # Update config.guess to support more systems
+ cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
+
+ # Verify that the ebuild is up-to-date
+ check_uptodate
+
+ llvm.org_src_prepare
+}
+
+get_distribution_components() {
+ local sep=${1-;}
+
+ local out=(
+ # shared libs
+ LLVM
+ LTO
+ Remarks
+
+ # tools
+ llvm-config
+
+ # common stuff
+ cmake-exports
+ llvm-headers
+
+ # libraries needed for clang-tblgen
+ LLVMDemangle
+ LLVMSupport
+ LLVMTableGen
+
+ # testing libraries
+ llvm_gtest
+ llvm_gtest_main
+ LLVMTestingAnnotations
+ LLVMTestingSupport
+ )
+
+ if multilib_is_native_abi; then
+ out+=(
+ # utilities
+ llvm-tblgen
+ FileCheck
+ llvm-PerfectShuffle
+ count
+ not
+ yaml-bench
+ UnicodeNameMappingGenerator
+
+ # tools
+ bugpoint
+ dsymutil
+ llc
+ lli
+ lli-child-target
+ llvm-addr2line
+ llvm-ar
+ llvm-as
+ llvm-bcanalyzer
+ llvm-bitcode-strip
+ llvm-c-test
+ llvm-cat
+ llvm-cfi-verify
+ llvm-config
+ llvm-cov
+ llvm-cvtres
+ llvm-cxxdump
+ llvm-cxxfilt
+ llvm-cxxmap
+ llvm-debuginfo-analyzer
+ llvm-debuginfod-find
+ llvm-diff
+ llvm-dis
+ llvm-dlltool
+ llvm-dwarfdump
+ llvm-dwarfutil
+ llvm-dwp
+ llvm-exegesis
+ llvm-extract
+ llvm-gsymutil
+ llvm-ifs
+ llvm-install-name-tool
+ llvm-jitlink
+ llvm-jitlink-executor
+ llvm-lib
+ llvm-libtool-darwin
+ llvm-link
+ llvm-lipo
+ llvm-lto
+ llvm-lto2
+ llvm-mc
+ llvm-mca
+ llvm-ml
+ llvm-modextract
+ llvm-mt
+ llvm-nm
+ llvm-objcopy
+ llvm-objdump
+ llvm-opt-report
+ llvm-otool
+ llvm-pdbutil
+ llvm-profdata
+ llvm-profgen
+ llvm-ranlib
+ llvm-rc
+ llvm-readelf
+ llvm-readobj
+ llvm-reduce
+ llvm-remark-size-diff
+ llvm-remarkutil
+ llvm-rtdyld
+ llvm-sim
+ llvm-size
+ llvm-split
+ llvm-stress
+ llvm-strings
+ llvm-strip
+ llvm-symbolizer
+ llvm-tapi-diff
+ llvm-tli-checker
+ llvm-undname
+ llvm-windres
+ llvm-xray
+ obj2yaml
+ opt
+ sancov
+ sanstats
+ split-file
+ verify-uselistorder
+ yaml2obj
+
+ # python modules
+ opt-viewer
+ )
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
+ use doc && out+=(
+ docs-llvm-html
+ )
+
+ use binutils-plugin && out+=(
+ LLVMgold
+ )
+ use debuginfod && out+=(
+ llvm-debuginfod
+ )
+ fi
+
+ printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+ local ffi_cflags ffi_ldflags
+ if use libffi; then
+ ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
+ ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ # disable appending VCS revision to the version to improve
+ # direct cache hit ratio
+ -DLLVM_APPEND_VC_REV=OFF
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DBUILD_SHARED_LIBS=OFF
+ -DLLVM_BUILD_LLVM_DYLIB=ON
+ -DLLVM_LINK_LLVM_DYLIB=ON
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+
+ # cheap hack: LLVM combines both anyway, and the only difference
+ # is that the former list is explicitly verified at cmake time
+ -DLLVM_TARGETS_TO_BUILD=""
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_INCLUDE_BENCHMARKS=OFF
+ -DLLVM_INCLUDE_TESTS=ON
+ -DLLVM_BUILD_TESTS=$(usex test)
+ -DLLVM_INSTALL_GTEST=ON
+
+ -DLLVM_ENABLE_FFI=$(usex libffi)
+ -DLLVM_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+ -DLLVM_ENABLE_LIBXML2=$(usex xml)
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
+ -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+ -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
+ -DLLVM_ENABLE_ZSTD=$(usex zstd)
+ -DLLVM_ENABLE_CURL=$(usex debuginfod)
+ -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod)
+
+ -DLLVM_HOST_TRIPLE="${CHOST}"
+
+ -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
+ -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
+ # used only for llvm-objdump tool
+ -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0)
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+
+ # disable OCaml bindings (now in dev-ml/llvm-ocaml)
+ -DOCAMLFIND=NO
+ )
+
+ local suffix=
+ if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then
+ # the ABI of the main branch is not stable, so let's include
+ # the commit id in the SOVERSION to contain the breakage
+ suffix+="git${EGIT_VERSION::8}"
+ fi
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
+ # Smart hack: alter version suffix -> SOVERSION when linking
+ # against libc++. This way we won't end up mixing LLVM libc++
+ # libraries with libstdc++ clang, and the other way around.
+ suffix+="+libcxx"
+ mycmakeargs+=(
+ -DLLVM_ENABLE_LIBCXX=ON
+ )
+ fi
+ mycmakeargs+=(
+ -DLLVM_VERSION_SUFFIX="${suffix}"
+ )
+
+ use test && mycmakeargs+=(
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
+ mycmakeargs+=(
+ -DLLVM_BUILD_DOCS=${build_docs}
+ -DLLVM_ENABLE_OCAMLDOC=OFF
+ -DLLVM_ENABLE_SPHINX=${build_docs}
+ -DLLVM_ENABLE_DOXYGEN=OFF
+ -DLLVM_INSTALL_UTILS=ON
+ )
+ use binutils-plugin && mycmakeargs+=(
+ -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
+ )
+ fi
+
+ # workaround BMI bug in gcc-7 (fixed in 7.4)
+ # https://bugs.gentoo.org/649880
+ # apply only to x86, https://bugs.gentoo.org/650506
+ if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
+ [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
+ then
+ local CFLAGS="${CFLAGS} -mno-bmi"
+ local CXXFLAGS="${CXXFLAGS} -mno-bmi"
+ fi
+
+ # LLVM can have very high memory consumption while linking,
+ # exhausting the limit on 32-bit linker executable
+ use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ cmake_src_configure
+
+ grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
+ CMakeCache.txt ||
+ die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ tc-env_build cmake_build distribution
+
+ pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
+ pax-mark m "${BUILD_DIR}"/bin/lli
+ pax-mark m "${BUILD_DIR}"/bin/lli-child-target
+
+ if use test; then
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
+ pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
+ pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
+ fi
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check
+}
+
+src_install() {
+ local MULTILIB_CHOST_TOOLS=(
+ /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config
+ )
+
+ local MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/llvm/Config/llvm-config.h
+ )
+
+ local LLVM_LDPATHS=()
+ multilib-minimal_src_install
+
+ # move wrapped headers back
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-distribution
+
+ # move headers to /usr/include for wrapping
+ rm -rf "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die
+
+ LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
+}
+
+multilib_src_install_all() {
+ local revord=$(( 9999 - ${LLVM_MAJOR} ))
+ newenvd - "60llvm-${revord}" <<-_EOF_
+ PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ # we need to duplicate it in ROOTPATH for Portage to respect...
+ ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
+ MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
+ _EOF_
+
+ docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
+ llvm_install_manpages
+}
+
+pkg_postinst() {
+ elog "You can find additional opt-viewer utility scripts in:"
+ elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/opt-viewer"
+ elog "To use these scripts, you will need Python along with the following"
+ elog "packages:"
+ elog " dev-python/pygments (for opt-viewer)"
+ elog " dev-python/pyyaml (for all of them)"
+}