summaryrefslogtreecommitdiff
path: root/sys-devel
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/Manifest.gzbin10638 -> 10633 bytes
-rw-r--r--sys-devel/clang-common/Manifest3
-rw-r--r--sys-devel/clang-common/clang-common-16.0.4.ebuild180
-rw-r--r--sys-devel/clang-runtime/Manifest1
-rw-r--r--sys-devel/clang-runtime/clang-runtime-16.0.4.ebuild40
-rw-r--r--sys-devel/clang/Manifest4
-rw-r--r--sys-devel/clang/clang-16.0.4.ebuild481
-rw-r--r--sys-devel/lld/Manifest3
-rw-r--r--sys-devel/lld/lld-16.0.4.ebuild90
-rw-r--r--sys-devel/llvm-common/Manifest3
-rw-r--r--sys-devel/llvm-common/llvm-common-16.0.4.ebuild28
-rw-r--r--sys-devel/llvm/Manifest4
-rw-r--r--sys-devel/llvm/llvm-16.0.4.ebuild516
13 files changed, 1353 insertions, 0 deletions
diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz
index bc72c3675fca..02a42e0ac44d 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 92f7bbf37b1f..ca510d216f33 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -4,12 +4,15 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
DIST llvm-project-16.0.3.src.tar.xz 117998136 BLAKE2B 6117586a117c30515e9a5623ab91d29ba65d33c8041274de0ecdbce08ae4fe1c8c3b120db9ca625f42fdbb2301537b4ffe8f7add701c178282be4f583fa0c8ca SHA512 2eb5eca1cbee92a499d7fba5729b61f31186353bc0545b17eefa300cf2b27c8d9a2f307443b2c1c9fe1b0ba412abf5143fdd4d25aaeb33d975a9a834221d7602
DIST llvm-project-16.0.3.src.tar.xz.sig 566 BLAKE2B bbd96268b006fecffd7402452ae7559bd2ea42c7b771999f58893a48d66b1b056b476a7022c70e2ab8f11dba8318ccc141f97a05ece3b9ed3b4405a6890b0c3a SHA512 cdd5e1c2a252ba58f9b7f8687d6cf9a330c188988707bd72f4632a8158a2db9ac180b3936da99b87e7e99886c39cb8517ebbb04b7d1be198e76964e31ec8dc58
+DIST llvm-project-16.0.4.src.tar.xz 117996332 BLAKE2B 2ea3ef25290ce6180d271e42fbf5e02da973a21e3929c1ac8d1e3e7b268d39db97611e15654ca7e6527add24542d0eed0ee2b1b9d85dfd0ba661e55356bac5d3 SHA512 860bcb999005f55bed25691304983d7bf707f8e3246000595b412b9e88f4a1614be0adb43bbff9c30f49b969373fa0becab02a56ac37915a5f83c52ca8ea3f95
+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
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
EBUILD clang-common-16.0.3.ebuild 5158 BLAKE2B 96869b1c5b4872174e17980aa070c364675a1c3a8b0560af17e6e7530f35b8fd97a8735d3947abc75e8cc245015e585ce44b3e1d9fa418a2a4787cd1f08ef1c9 SHA512 0507f8d775a17b4272e80ee6413df400f1ecbbb0954b1cee0d0cbe97c8793ebf2a90e3ce6bbe7a0e7376b1fb4a0d30b6bdee31f1e1722d81d70cc3b79d4f14c7
+EBUILD clang-common-16.0.4.ebuild 5158 BLAKE2B 96869b1c5b4872174e17980aa070c364675a1c3a8b0560af17e6e7530f35b8fd97a8735d3947abc75e8cc245015e585ce44b3e1d9fa418a2a4787cd1f08ef1c9 SHA512 0507f8d775a17b4272e80ee6413df400f1ecbbb0954b1cee0d0cbe97c8793ebf2a90e3ce6bbe7a0e7376b1fb4a0d30b6bdee31f1e1722d81d70cc3b79d4f14c7
EBUILD clang-common-16.0.5.9999.ebuild 5426 BLAKE2B dbab7084dcf1ec1c79c8f1c9b52733731917e8a98907891ac3498d9614b5762034f3c45ec40e137e34214c1788b5c0f24dc53d39a3ab764800edfbe61dbb7c70 SHA512 cc1a9faaa11de0b0cb484dccca330cc82ed020c21fb3872db58680411ac3f16171ed8569faf9e59eaf713238728c58f737197ebd337fd1fe797a6455a55d1328
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
diff --git a/sys-devel/clang-common/clang-common-16.0.4.ebuild b/sys-devel/clang-common/clang-common-16.0.4.ebuild
new file mode 100644
index 000000000000..4acd801b683d
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-16.0.4.ebuild
@@ -0,0 +1,180 @@
+# 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="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+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
+ 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
+
+ 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 4a0bdbafd39d..83a39fa2decc 100644
--- a/sys-devel/clang-runtime/Manifest
+++ b/sys-devel/clang-runtime/Manifest
@@ -1,6 +1,7 @@
EBUILD clang-runtime-14.0.6.ebuild 760 BLAKE2B 0f6cfb8536569ffe2a09305e71056309690ad1c8e92543e64025bd5e009eac35018ec22b2c0f80c12f3a527cc7e0bfe4ec1bfcb2dd9dea54106abf46b13e5592 SHA512 580efee12fe0e53447f5644fad248ebded8ae6cd8cb5871cb38bb3148091886b6fb9a57ac712d3158d5c3fc38c043b0bfbf62fc550a609752a42c23e605b0ded
EBUILD clang-runtime-15.0.7.ebuild 759 BLAKE2B d7b481faffc4da0a6dc1b4e708322cd17cd497dc75363bdb89e7fbb1ecb2aecd9cbf91bdf816505476c7aca2ec7b6fb9ef178705e6b77361d21a7a270404a70a SHA512 8128acfc92b1601e93ffca1fd4233456f8a28fbc4cc65a1782da25df48abd3af82d0128b31f12b966ca02ab1eafcd28016c4443d9c7f1d28bc3f951cfff5e07f
EBUILD clang-runtime-16.0.3.ebuild 1442 BLAKE2B ccd97064b84899371758ceab7640d2b9a3104e08dccbefc5523062437cec1358ab68773b96bbc8193d8cd52a2bac65e6687cb150127d953aa49ab7f8cb3dbcea SHA512 9b8639788a2bfab9fea6e717e684c4784ae6719ce8d6bb389d16d836df0b43d108be6c649b9aa17dfa60df7b3f490450d4d51e83dd80707467a844871b97535e
+EBUILD clang-runtime-16.0.4.ebuild 1442 BLAKE2B ccd97064b84899371758ceab7640d2b9a3104e08dccbefc5523062437cec1358ab68773b96bbc8193d8cd52a2bac65e6687cb150127d953aa49ab7f8cb3dbcea SHA512 9b8639788a2bfab9fea6e717e684c4784ae6719ce8d6bb389d16d836df0b43d108be6c649b9aa17dfa60df7b3f490450d4d51e83dd80707467a844871b97535e
EBUILD clang-runtime-16.0.5.9999.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6988338bc715c68238367d55b5f01859244954b7ff8719ba285b64e76a578f063ab3f6325d5e9519ef5ebdb31592af1a276225 SHA512 436ecac7bb5ba46ca72ab48ea2bd8e30e2ee180218c0c3f14f41abd4e3b0445655ad033058bb78661b2095c5786ef644b538574d4ae2a9a8ee12fefc179f79db
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
diff --git a/sys-devel/clang-runtime/clang-runtime-16.0.4.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.4.ebuild
new file mode 100644
index 000000000000..6483c7c0c78e
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-16.0.4.ebuild
@@ -0,0 +1,40 @@
+# 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="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="+compiler-rt libcxx openmp +sanitize"
+REQUIRED_USE="sanitize? ( compiler-rt )"
+
+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 a5bd14e1984e..54e680931464 100644
--- a/sys-devel/clang/Manifest
+++ b/sys-devel/clang/Manifest
@@ -1,6 +1,7 @@
DIST llvm-14.0.6-manpages.tar.bz2 218186 BLAKE2B 4491296e490936a2d7b518e19a0ff6312b89abeef3fbe5da5d0b93bb2add1088ddf64a0b00ec8846062d19b1ad31e53eadee7ce03c9034aab554e183d1baccf6 SHA512 f8328dc2ec1e8d941d47e583ee31fae7bdcebb3f854b5c8a4a84bd19a79bf5427ad204012c81349bc05a291e41cf48e5129b4578bbd5d4490dd01e1c0b5823bf
DIST llvm-15.0.7-manpages.tar.bz2 228425 BLAKE2B 573b030a32407cfe241fb2c8c62bed8e7c54f9daf4b8cffdd2d4e5ca2e40b5ec5ed3724475aedf77119be1a4d9de847a989e933d315e6d94908e407a19c98047 SHA512 86d5eeea2757b0a627c8d2d6e70a3265fc0207085f4e473cdd6e8b624c719625dead23fd1737742a1bea27b1c4631ef3e8e3041a1122a85fcb49859e5bfbee49
DIST llvm-16.0.3-manpages.tar.bz2 245859 BLAKE2B ea98ac1a777bb2fe52a576e7a733030e88debc50dbfceb70f20814fd960da6a56d06986272cb2792c86701961e4e39006e5a3aa105eefb8c59e3b99e528078ec SHA512 6669105c9ac66ec0c21ccc788635935b5133b035b97ff31af049ebb8064fa7d257d54c5d9fda79674aa6037668e3ddfd2a09f716dbfd7cd356b0e193242aa9fc
+DIST llvm-16.0.4-manpages.tar.bz2 243154 BLAKE2B 69308e3ec19d750e7249b7c8cd79224c466b879c67dd900e201339486fa7fa4dd6ef9ef5b033b2443b32c3530cc76564fe2856a76f9b466fdab2b5c64148f089 SHA512 2d2b711adbd20a233d0611f81393faa29a2f32f0e64799a9a48185876045023ca1320becd2da110fbcbfce019a38df0d7c13fcaea3770b4fc23aa732eb11321b
DIST llvm-gentoo-patchset-14.0.6-r2.tar.xz 16120 BLAKE2B e12e522fdb7ba505693c679cb09cc8e00e6a954df195c86c2af4dbf1b68334a405b8dcc45f2e28b5e5e0b7e9d5eb7ba907337027927371b7a3b7784ff8aae7e0 SHA512 8a5ea71c30fc0727cc855dd812bbcb6d5f51c80c98eb3d5b80258d5c5eaab1310edc9d53ae63c2ca827abec68e2912c4b69ef0da351ff883fb30545a61e1d09c
DIST llvm-gentoo-patchset-14.0.6-r4.tar.xz 19360 BLAKE2B 814dd617d237b0bd9c80bdd9d921196b8f93248b731083e79455d4609a05dd15b6847fc227359624abce683ecdaadaefea71dc9b65b7edd1fc3912123fa55054 SHA512 9ac57abc87a63cf31ecd021e6dd44f5f11cd6136fa3b92e89c52a6d13e0ed471f88e6e96160baeac4615eedff7943048a35a98c8d37387894c9c2d1f5df277ce
DIST llvm-gentoo-patchset-15.0.7-r3.tar.xz 24268 BLAKE2B 6531ae385ecea87bc26dba8ce19b4cde8ff224c80fd81f04c6ded131e305ecfdeb8d29ebd3b68a641d240805dc83eb0ebc7cc85124f02ad0ee66e0f201b91d7e SHA512 66cb33f8b423736b990fb75d4f2d1e5f14c0b03308f403297204dd1a352d72f85f34220fd66d3de5d6df328cdf2ffce03c2a111cb0bb57791cf68a88069ac7df
@@ -11,6 +12,8 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
DIST llvm-project-16.0.3.src.tar.xz 117998136 BLAKE2B 6117586a117c30515e9a5623ab91d29ba65d33c8041274de0ecdbce08ae4fe1c8c3b120db9ca625f42fdbb2301537b4ffe8f7add701c178282be4f583fa0c8ca SHA512 2eb5eca1cbee92a499d7fba5729b61f31186353bc0545b17eefa300cf2b27c8d9a2f307443b2c1c9fe1b0ba412abf5143fdd4d25aaeb33d975a9a834221d7602
DIST llvm-project-16.0.3.src.tar.xz.sig 566 BLAKE2B bbd96268b006fecffd7402452ae7559bd2ea42c7b771999f58893a48d66b1b056b476a7022c70e2ab8f11dba8318ccc141f97a05ece3b9ed3b4405a6890b0c3a SHA512 cdd5e1c2a252ba58f9b7f8687d6cf9a330c188988707bd72f4632a8158a2db9ac180b3936da99b87e7e99886c39cb8517ebbb04b7d1be198e76964e31ec8dc58
+DIST llvm-project-16.0.4.src.tar.xz 117996332 BLAKE2B 2ea3ef25290ce6180d271e42fbf5e02da973a21e3929c1ac8d1e3e7b268d39db97611e15654ca7e6527add24542d0eed0ee2b1b9d85dfd0ba661e55356bac5d3 SHA512 860bcb999005f55bed25691304983d7bf707f8e3246000595b412b9e88f4a1614be0adb43bbff9c30f49b969373fa0becab02a56ac37915a5f83c52ca8ea3f95
+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
EBUILD clang-14.0.6-r1.ebuild 12014 BLAKE2B 0f9eed7779a5b9aa8f92002f6f4d8e22e7baf3d3f6d1930e4716abf3aa00d866f68a682dc2a404655f53800e26c8b388da552184da6943287b2d91c5c1c2672b SHA512 c5e46f1044604f4e41cdb6c42d2079096c0bcdd396d99f8e95a6b5b66918e3519e4226741202f716fa5f53295188ec2bfcec66ae32480a8e10b4ab18bdb880ab
@@ -18,6 +21,7 @@ EBUILD clang-14.0.6-r4.ebuild 11945 BLAKE2B 1f14f89997a862e04b0d9042c6d9c698c2cd
EBUILD clang-15.0.7-r1.ebuild 12617 BLAKE2B 780db8dc3c92efab35280d32f6b7d4ffcea912d7839b995a18aa603d0cf59df1199eabd53eb5a475e67da7a45e10fdd08e9879b871a25672f135dbdb001a5f46 SHA512 f6302415c9a4fb8571613ff5ebea4096f1318333ba4bc0f3c0b63b04eb0d10755c4555f55186875db0d34bb5d2c0b245b758aff387b97033bc643a1a291d1195
EBUILD clang-15.0.7-r3.ebuild 12552 BLAKE2B 1702065ffe0da6dbf809a82f0f0ec9e84daf7b0c3c4e9fb6d3c8eb320cf0034bfa6197f70f3752b3b58b841c27a7d8e00ccdd19b68f17a25fb54e203e9a66769 SHA512 f93df89921be88cd2bee7ba7d3aae0013db0b35f3f5e8cfac188fb5462a963afb9ce50b69b2046dbbe50d9bbf77532effb639e129176d986bb0c98d3106da3fb
EBUILD clang-16.0.3.ebuild 12442 BLAKE2B 768d62dbfa26da9aa52240132b767c00f27e905bddbbd5078b507330d06c7033c7f2db06a199c74e20f8a83fcbacb94ec401ff4a7e81256a6a33f7774eaa8209 SHA512 e413717bd5191a054822daa2b8f3bc363b58de267e66046b3908edd8da6714552e039bb23e9d4c613a8e535c2d70e7add72a923f82763365dab00b5252a04be5
+EBUILD clang-16.0.4.ebuild 12373 BLAKE2B 8b0dc7d45d5204d29c4c57a5196690e06bb106d4ea36368f2d4af9eb7c5cf3cc1ddb9f72af8836ce54e709c708c0228c8c25347dee665887d194f65938fe98f3 SHA512 be98425dfb8d5cf7f1201750c46fd1c3cd870aacddf300529c6270708bc636a99cb986af8267735b8be8088184bd168f211ce6ac86c393fcc4c07880554d477d
EBUILD clang-16.0.5.9999.ebuild 12293 BLAKE2B b854af4222caecd41ed431d560b9311e3bbc23313323cd7bd3f3fe79935d194657a48e0a64ea3303836d79f4117c28029a6b7b9c8fceaeb2551ea5300871ed23 SHA512 5672ff46c5ed3409e651243b815e5492b9d0f76ef6224860ff60f5b887bf5e1a2c77208c058b94534b1bac614bbe00b858b4d94d017c39ec6554c5e714530077
EBUILD clang-17.0.0.9999.ebuild 12284 BLAKE2B b3ed58b37e00f030d9ab4a8d599cfbcdcb78c17a1542e8942602f360b93077997243f68b4dd441133d9aa79d3e687a3692a8ec31c4937ed4b3f1651b1d1b0d3c SHA512 530d877ab7a240de67056c59c6baad288052133c01171ce9c67d12651300cb3dda3258cd92ab8bd319c89ab9856722c54183bb32ab410201ebe778e5e36e4329
EBUILD clang-17.0.0_pre20230502.ebuild 12353 BLAKE2B b4165aa6ea9c9e65092d93989b8681281d42ce7e27c24df4a1788c6865667f217a9d61769ee83fb4ae23b1fd9c5b6e806d70aad20bd5f97c162471447e89730c SHA512 a125b873840ef52ad77a07c62d3872936ecdb2cd80bfdc9de3c781b6f26b87f2bde70974c12ea19df181e1d996d1990b1c79dcabe2887d7b913113cd2addcbfa
diff --git a/sys-devel/clang/clang-16.0.4.ebuild b/sys-devel/clang/clang-16.0.4.ebuild
new file mode 100644
index 000000000000..a6f929936e58
--- /dev/null
+++ b/sys-devel/clang/clang-16.0.4.ebuild
@@ -0,0 +1,481 @@
+# 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="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos"
+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/lib/Testing
+ llvm/utils
+ third-party
+)
+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
+
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml)
+ # 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_CUDA=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_ARCMT=$(usex static-analyzer)
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+
+ -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/lld/Manifest b/sys-devel/lld/Manifest
index 1419314aae3a..dc1542e16b05 100644
--- a/sys-devel/lld/Manifest
+++ b/sys-devel/lld/Manifest
@@ -4,11 +4,14 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
DIST llvm-project-16.0.3.src.tar.xz 117998136 BLAKE2B 6117586a117c30515e9a5623ab91d29ba65d33c8041274de0ecdbce08ae4fe1c8c3b120db9ca625f42fdbb2301537b4ffe8f7add701c178282be4f583fa0c8ca SHA512 2eb5eca1cbee92a499d7fba5729b61f31186353bc0545b17eefa300cf2b27c8d9a2f307443b2c1c9fe1b0ba412abf5143fdd4d25aaeb33d975a9a834221d7602
DIST llvm-project-16.0.3.src.tar.xz.sig 566 BLAKE2B bbd96268b006fecffd7402452ae7559bd2ea42c7b771999f58893a48d66b1b056b476a7022c70e2ab8f11dba8318ccc141f97a05ece3b9ed3b4405a6890b0c3a SHA512 cdd5e1c2a252ba58f9b7f8687d6cf9a330c188988707bd72f4632a8158a2db9ac180b3936da99b87e7e99886c39cb8517ebbb04b7d1be198e76964e31ec8dc58
+DIST llvm-project-16.0.4.src.tar.xz 117996332 BLAKE2B 2ea3ef25290ce6180d271e42fbf5e02da973a21e3929c1ac8d1e3e7b268d39db97611e15654ca7e6527add24542d0eed0ee2b1b9d85dfd0ba661e55356bac5d3 SHA512 860bcb999005f55bed25691304983d7bf707f8e3246000595b412b9e88f4a1614be0adb43bbff9c30f49b969373fa0becab02a56ac37915a5f83c52ca8ea3f95
+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
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
+EBUILD lld-16.0.4.ebuild 2239 BLAKE2B 33f554acd6e1db31f9aec3d75b2c43994a95240ba42bcdf7060090231ff6214e896b5fd051fcb513337161cef408014f64391e9ecfcf5269749fcfdb8a3771da SHA512 a06a9e4ff4f9109dd4eb3f3fdb2308b043beca30c016b184a3f77e7c4728161b3a1b4a662fccf102419c4a3aabab9e30db5a3c87448fb8b2a91237bc08e834ea
EBUILD lld-16.0.5.9999.ebuild 2197 BLAKE2B 0f6db5db6fff4f572187749ab1704fce82e1859db1b7dd8b9de3652eed3e63ae781f7c48d16237576e9a186fe0680e349d160f15047cb5f54998fab7b8c0d60e SHA512 5de60e7ae08bade5028fb325e81ef82bf2aca38507d131e40505320587cbc43db5d74203d849cb057bee27b7f4e3820263f429db8454e4ca38bcc6f7e873bf9b
EBUILD lld-17.0.0.9999.ebuild 2157 BLAKE2B dd17cb187ecc5f448245e19ce67fc9abf26bad3fd62b4f999d01defc43b87e8d47f1613212d56e66061f414de947e0e2a9e24aeffd4b4baf947714b5dadb5ba0 SHA512 fca39302715a0c083b24b94336eeb53a376d69e014f49922ce49987ce2a8c591727cdde49fd70ed5067305c807e4445653753efd5900d8bb61e5b47269fd37d6
EBUILD lld-17.0.0_pre20230502.ebuild 2157 BLAKE2B dd17cb187ecc5f448245e19ce67fc9abf26bad3fd62b4f999d01defc43b87e8d47f1613212d56e66061f414de947e0e2a9e24aeffd4b4baf947714b5dadb5ba0 SHA512 fca39302715a0c083b24b94336eeb53a376d69e014f49922ce49987ce2a8c591727cdde49fd70ed5067305c807e4445653753efd5900d8bb61e5b47269fd37d6
diff --git a/sys-devel/lld/lld-16.0.4.ebuild b/sys-devel/lld/lld-16.0.4.ebuild
new file mode 100644
index 000000000000..7ddfd8f8a755
--- /dev/null
+++ b/sys-devel/lld/lld-16.0.4.ebuild
@@ -0,0 +1,90 @@
+# 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="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="debug test zstd"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ~sys-devel/llvm-${PV}[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_TEST_COMPONENTS=( llvm/utils third-party )
+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 39bb7026dd59..c74d502bf0ab 100644
--- a/sys-devel/llvm-common/Manifest
+++ b/sys-devel/llvm-common/Manifest
@@ -4,11 +4,14 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
DIST llvm-project-16.0.3.src.tar.xz 117998136 BLAKE2B 6117586a117c30515e9a5623ab91d29ba65d33c8041274de0ecdbce08ae4fe1c8c3b120db9ca625f42fdbb2301537b4ffe8f7add701c178282be4f583fa0c8ca SHA512 2eb5eca1cbee92a499d7fba5729b61f31186353bc0545b17eefa300cf2b27c8d9a2f307443b2c1c9fe1b0ba412abf5143fdd4d25aaeb33d975a9a834221d7602
DIST llvm-project-16.0.3.src.tar.xz.sig 566 BLAKE2B bbd96268b006fecffd7402452ae7559bd2ea42c7b771999f58893a48d66b1b056b476a7022c70e2ab8f11dba8318ccc141f97a05ece3b9ed3b4405a6890b0c3a SHA512 cdd5e1c2a252ba58f9b7f8687d6cf9a330c188988707bd72f4632a8158a2db9ac180b3936da99b87e7e99886c39cb8517ebbb04b7d1be198e76964e31ec8dc58
+DIST llvm-project-16.0.4.src.tar.xz 117996332 BLAKE2B 2ea3ef25290ce6180d271e42fbf5e02da973a21e3929c1ac8d1e3e7b268d39db97611e15654ca7e6527add24542d0eed0ee2b1b9d85dfd0ba661e55356bac5d3 SHA512 860bcb999005f55bed25691304983d7bf707f8e3246000595b412b9e88f4a1614be0adb43bbff9c30f49b969373fa0becab02a56ac37915a5f83c52ca8ea3f95
+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
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
+EBUILD llvm-common-16.0.4.ebuild 615 BLAKE2B dddab327388341f3330d7374a76bc1ea144aa5cad62feea34140b5825daf13118ff7185a6c2cce07479c3ca13c3ba8ad7cac7ba71a8b49fdd25a979d899a5b0a SHA512 57e7d90e7fc4f5dd2daddd1c7e8ed7885112120aca2b13b21e2fc719cfe5a87bb640aa67c605827bcd60aa71300abeba937e158ae1a1a16559236ef9e6d18319
EBUILD llvm-common-16.0.5.9999.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd896153222cb62647bc6c4a9f7493fc96c23faf788ce8a976d35333e8d40e63cad4c3f44322f6a41f1dbe53f9e772c3a40d9 SHA512 9661a9c544d8bf3edf6c24a307324a58652c8635703dcfa008cad96826e3404cbb05e5c95fe7df85ed6d2642e4f83cfff0c9a381b796cc78f560854aa071acbe
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
diff --git a/sys-devel/llvm-common/llvm-common-16.0.4.ebuild b/sys-devel/llvm-common/llvm-common-16.0.4.ebuild
new file mode 100644
index 000000000000..4dd4fe395fe7
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-16.0.4.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="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+
+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 7c732f5ba2da..1695df8ee0fe 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -1,6 +1,7 @@
DIST llvm-14.0.6-manpages.tar.bz2 218186 BLAKE2B 4491296e490936a2d7b518e19a0ff6312b89abeef3fbe5da5d0b93bb2add1088ddf64a0b00ec8846062d19b1ad31e53eadee7ce03c9034aab554e183d1baccf6 SHA512 f8328dc2ec1e8d941d47e583ee31fae7bdcebb3f854b5c8a4a84bd19a79bf5427ad204012c81349bc05a291e41cf48e5129b4578bbd5d4490dd01e1c0b5823bf
DIST llvm-15.0.7-manpages.tar.bz2 228425 BLAKE2B 573b030a32407cfe241fb2c8c62bed8e7c54f9daf4b8cffdd2d4e5ca2e40b5ec5ed3724475aedf77119be1a4d9de847a989e933d315e6d94908e407a19c98047 SHA512 86d5eeea2757b0a627c8d2d6e70a3265fc0207085f4e473cdd6e8b624c719625dead23fd1737742a1bea27b1c4631ef3e8e3041a1122a85fcb49859e5bfbee49
DIST llvm-16.0.3-manpages.tar.bz2 245859 BLAKE2B ea98ac1a777bb2fe52a576e7a733030e88debc50dbfceb70f20814fd960da6a56d06986272cb2792c86701961e4e39006e5a3aa105eefb8c59e3b99e528078ec SHA512 6669105c9ac66ec0c21ccc788635935b5133b035b97ff31af049ebb8064fa7d257d54c5d9fda79674aa6037668e3ddfd2a09f716dbfd7cd356b0e193242aa9fc
+DIST llvm-16.0.4-manpages.tar.bz2 243154 BLAKE2B 69308e3ec19d750e7249b7c8cd79224c466b879c67dd900e201339486fa7fa4dd6ef9ef5b033b2443b32c3530cc76564fe2856a76f9b466fdab2b5c64148f089 SHA512 2d2b711adbd20a233d0611f81393faa29a2f32f0e64799a9a48185876045023ca1320becd2da110fbcbfce019a38df0d7c13fcaea3770b4fc23aa732eb11321b
DIST llvm-gentoo-patchset-14.0.6-r2.tar.xz 16120 BLAKE2B e12e522fdb7ba505693c679cb09cc8e00e6a954df195c86c2af4dbf1b68334a405b8dcc45f2e28b5e5e0b7e9d5eb7ba907337027927371b7a3b7784ff8aae7e0 SHA512 8a5ea71c30fc0727cc855dd812bbcb6d5f51c80c98eb3d5b80258d5c5eaab1310edc9d53ae63c2ca827abec68e2912c4b69ef0da351ff883fb30545a61e1d09c
DIST llvm-gentoo-patchset-14.0.6-r4.tar.xz 19360 BLAKE2B 814dd617d237b0bd9c80bdd9d921196b8f93248b731083e79455d4609a05dd15b6847fc227359624abce683ecdaadaefea71dc9b65b7edd1fc3912123fa55054 SHA512 9ac57abc87a63cf31ecd021e6dd44f5f11cd6136fa3b92e89c52a6d13e0ed471f88e6e96160baeac4615eedff7943048a35a98c8d37387894c9c2d1f5df277ce
DIST llvm-gentoo-patchset-15.0.7-r3.tar.xz 24268 BLAKE2B 6531ae385ecea87bc26dba8ce19b4cde8ff224c80fd81f04c6ded131e305ecfdeb8d29ebd3b68a641d240805dc83eb0ebc7cc85124f02ad0ee66e0f201b91d7e SHA512 66cb33f8b423736b990fb75d4f2d1e5f14c0b03308f403297204dd1a352d72f85f34220fd66d3de5d6df328cdf2ffce03c2a111cb0bb57791cf68a88069ac7df
@@ -11,6 +12,8 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
DIST llvm-project-16.0.3.src.tar.xz 117998136 BLAKE2B 6117586a117c30515e9a5623ab91d29ba65d33c8041274de0ecdbce08ae4fe1c8c3b120db9ca625f42fdbb2301537b4ffe8f7add701c178282be4f583fa0c8ca SHA512 2eb5eca1cbee92a499d7fba5729b61f31186353bc0545b17eefa300cf2b27c8d9a2f307443b2c1c9fe1b0ba412abf5143fdd4d25aaeb33d975a9a834221d7602
DIST llvm-project-16.0.3.src.tar.xz.sig 566 BLAKE2B bbd96268b006fecffd7402452ae7559bd2ea42c7b771999f58893a48d66b1b056b476a7022c70e2ab8f11dba8318ccc141f97a05ece3b9ed3b4405a6890b0c3a SHA512 cdd5e1c2a252ba58f9b7f8687d6cf9a330c188988707bd72f4632a8158a2db9ac180b3936da99b87e7e99886c39cb8517ebbb04b7d1be198e76964e31ec8dc58
+DIST llvm-project-16.0.4.src.tar.xz 117996332 BLAKE2B 2ea3ef25290ce6180d271e42fbf5e02da973a21e3929c1ac8d1e3e7b268d39db97611e15654ca7e6527add24542d0eed0ee2b1b9d85dfd0ba661e55356bac5d3 SHA512 860bcb999005f55bed25691304983d7bf707f8e3246000595b412b9e88f4a1614be0adb43bbff9c30f49b969373fa0becab02a56ac37915a5f83c52ca8ea3f95
+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
EBUILD llvm-14.0.6-r2.ebuild 12389 BLAKE2B 549b4e1c7feceb40c7e5aaa624925ec08627c84236c460f85a044621dc388cfca248f8a311c657a3b3dadbd367472f3c820a635c14246f74fdac98dd2ddf6fd1 SHA512 8559954b641fc007c92d4b3e2fcc129bdd812f974dccf37d74f61cb9d7414e28cbb41d7088767356035b972c1e417561770a89169676841e762e62644c6d0323
@@ -18,6 +21,7 @@ EBUILD llvm-14.0.6-r4.ebuild 12320 BLAKE2B 171c0d33e97ea1298768370982a54cf3ca16a
EBUILD llvm-15.0.7-r3.ebuild 12493 BLAKE2B 86343f2e904e6e4bbd653656c359470fb94909d48ca2e4f78e1f48bc183fba98c830569e92ac157d8a98471a5500c0a48c3eda3e13bb69d4abc204702a2b865c SHA512 aa7f3438deac9d07bf78dd44e0bc33a1b39f7a3ae4c930ab9908559604b28b3dbd22efbe43152eeeaf36352afff86e3c03ed10717d5e0aa0e983fbafd8aff971
EBUILD llvm-15.0.7.ebuild 12558 BLAKE2B 1f73f500a38ee4e96438a5e478781a562d48e10d550cd6c5beaf37a754ead1f0bedb121be78c6bee229f694cb085ee665f7b33a44eacba0d6eeaa42b545f6ca7 SHA512 92dd8f7f8554ee24978ef4e1409f5356a95455d2b5006da0a5dbf27cc277962916a0e93d2f7630a0eb3a9f3a1167eb9aeec0a319de3637c5762a7c391d3f5330
EBUILD llvm-16.0.3.ebuild 12490 BLAKE2B 95b6ae05f64728668134ff348e5d084346285425e57c69a7345a44f85c832523b1219a76c3b2c6274e190b869569be3f91d9e5c0298e13167f3e6e0e8d676f66 SHA512 eec238ccb340ad901e130d984349ee4a9788bec4cd7def73a6c946becd1b86b74ee044e39cda48f892017a06e2a381a0424caaf44d073a51c64625c3b45411ba
+EBUILD llvm-16.0.4.ebuild 12421 BLAKE2B 49bea7429ddde3c8ba494952394d7f2b40c244cfa67bae63b3b65a24e13e461f57569d2cbcad7576dfed59c3e377b3a9f0e42c7a19fdf8cd577781636773bc8b SHA512 6e618b38abfa2dec9bc20c56ec5457a37d41063d9f3aff0b5f36d540ce7d07abec5e6223168478ff0f581a04deb4f10a9164fa370b8402b16e9ea43eb2da6dbb
EBUILD llvm-16.0.5.9999.ebuild 12330 BLAKE2B 0ba8d556723f15cedb1c2296653dd33f6143c9c8d918214dc03645b0726b515cbe8221933ae041bec208bb5a5efc92b7797cbec7b8d5a6a195bc07e5c232cc69 SHA512 50483aafb23649384818a248b5d7a01d2788ec4601cf4926329315727d76a67e2515f76bb29c0665e6a537afc87b08c91aab80e6ad2da5a90906d978019c4646
EBUILD llvm-17.0.0.9999.ebuild 12689 BLAKE2B 188b2dc059691ac3a1d181e8aeeadbe836507ea419f966b12203eb64de15a5c0bed49074e055f91e0e98a07b80bdff355302e4a4b6f27f09ff23753a513848f6 SHA512 9fcda73df117c7fcab2be62ad8f8ed51794c7e247cfab39f2533948a3c105575f75459b6dccca7cdc425a13e45947b13cf40c0e5cf70b771b7755a2063562192
EBUILD llvm-17.0.0_pre20230502.ebuild 12758 BLAKE2B 06bd7ab28d6d6105c3d18ccdec1a24f2e589d693ebe72ed320aa8078bdd98b7a8246813a738d0a66688ca3e23687037c2e85ef9a73be32c5e72e77e32f4280c4 SHA512 fce3a727c79f69ec9094fdb6daa6a75145a91fb49560a16b3d299fd8420902932ee84d3a9faa9ac3016b09906f302fb2f4b4511408766e10ff870e57204c7831
diff --git a/sys-devel/llvm/llvm-16.0.4.ebuild b/sys-devel/llvm/llvm-16.0.4.ebuild
new file mode 100644
index 000000000000..2d844e82840c
--- /dev/null
+++ b/sys-devel/llvm/llvm-16.0.4.ebuild
@@ -0,0 +1,516 @@
+# 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="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="
+ +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar
+ xml z3 zstd
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ 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 )
+LLVM_TEST_COMPONENTS=( 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)
+ ;;
+ # 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
+ )
+
+ 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
+ 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
+ )
+ 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=$(usex test)
+ -DLLVM_BUILD_TESTS=$(usex test)
+
+ -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_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)"
+}