summaryrefslogtreecommitdiff
path: root/sys-devel
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/Manifest.gzbin10640 -> 10645 bytes
-rw-r--r--sys-devel/clang-common/Manifest2
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0_pre20230101.ebuild132
-rw-r--r--sys-devel/clang-runtime/Manifest1
-rw-r--r--sys-devel/clang-runtime/clang-runtime-16.0.0_pre20230101.ebuild41
-rw-r--r--sys-devel/clang/Manifest2
-rw-r--r--sys-devel/clang/clang-16.0.0_pre20230101.ebuild461
-rw-r--r--sys-devel/gcc/Manifest5
-rw-r--r--sys-devel/gcc/gcc-11.3.1_p20221230.ebuild4
-rw-r--r--sys-devel/gcc/gcc-12.2.1_p20221231.ebuild8
-rw-r--r--sys-devel/lld/Manifest2
-rw-r--r--sys-devel/lld/lld-16.0.0_pre20230101.ebuild83
-rw-r--r--sys-devel/llvm-common/Manifest2
-rw-r--r--sys-devel/llvm-common/llvm-common-16.0.0_pre20230101.ebuild28
-rw-r--r--sys-devel/llvm/Manifest2
-rw-r--r--sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild524
16 files changed, 1289 insertions, 8 deletions
diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz
index 68b610fc9943..9525e0dde1e2 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 e5f7a19bf437..416c16d13574 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -4,6 +4,7 @@ DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6
DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
+DIST llvm-project-b20dd2b186fdc76828219b705a2b58f5830f4b9d.tar.gz 175044630 BLAKE2B f9a955e8413b57067fb697792316fb0c1e3eac00b1af208ba5d29db01a9acc96b88c7edca12c43762b1425c71a716a7c74d5d7edad45a442f32ba73f88f548b6 SHA512 5133c32d7856c8280bfeb47c3e5a9c0d8c1c291aad29af93586523110f95b08e582ff416fc6be02241eabfe80c35ad4f0334de5ead2a41bc6504616b1c6fd15a
DIST llvm-project-dfc20708bcdf7b4c4bea8595fc4ac8674634d5e6.tar.gz 174878013 BLAKE2B 9c37423ae2a85a9d4a17fba97733cf808ebc98fa1488fb02e8c3e23039511154a220184af1bc6950c857b7d3c528d01e3dde5441c18903f25a7d7b7781e08f9b SHA512 146d6ab53cce257c21ae202b887bbb77b017f883cf26337bd3af29289cd828aabf95c528c6c192473c3cafb7e803940261f32a8fab6130deca01ccd5576c78eb
DIST llvm-project-fb792ebaf2114ad11d673cf891ae560e2e604711.tar.gz 174312496 BLAKE2B dd7f30b911ef5049e9e2bff7b2768e31b48b1f4c7acaf159f535fe3deb5aa6630fdf7857c83fffcda1119a38a52101490d2b6cb41cb295bb7dd85cde0445b7ee SHA512 bef15e7d82a2faf8be24f784d3d34ff9b21c8f17256879587ea5471011a32a1eb885e1b020da55aa096f2e0b5fe4bcf9fe8f0f5b5d34f5f386c48899c68fb7d1
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
@@ -15,4 +16,5 @@ EBUILD clang-common-15.0.6.ebuild 3514 BLAKE2B cf083c79b37a0fb37ccfada41de423024
EBUILD clang-common-16.0.0.9999.ebuild 3569 BLAKE2B fa58a81a826ae45c5287dcd49ba78ad5a5da4cbcdf7f28def7d8691fef5d622ac3dfb116e21b642f143a541d8cb4cdd136056f3d488dc3d4d8fed6383ed55c04 SHA512 3032daff6a584f1b3490738c967e38f26d860841d606e649c394c18237de3cf71c4ae91ce33ac6ca8f8c991e670b750023c10210626f9cdf7e7e3961405885b7
EBUILD clang-common-16.0.0_pre20221217.ebuild 3575 BLAKE2B 1c2007779af34e1fcb365371e266e0dc86e675792c28a02f53615e207239ab259ee7a71ac2d971a7833a1872409ceb8f8fe95a50e45ef3b8c948af3184dabc38 SHA512 97568c6737ac321f46782ce784a30c31a3d1ce6d2839e38cabfdde9becf56a1b44f2c05ab108fe18681ca021ad8f4d8d6161c5afce773f6b137d2d11f21177ad
EBUILD clang-common-16.0.0_pre20221226.ebuild 3575 BLAKE2B 1c2007779af34e1fcb365371e266e0dc86e675792c28a02f53615e207239ab259ee7a71ac2d971a7833a1872409ceb8f8fe95a50e45ef3b8c948af3184dabc38 SHA512 97568c6737ac321f46782ce784a30c31a3d1ce6d2839e38cabfdde9becf56a1b44f2c05ab108fe18681ca021ad8f4d8d6161c5afce773f6b137d2d11f21177ad
+EBUILD clang-common-16.0.0_pre20230101.ebuild 3569 BLAKE2B 5aaee932ed1421cb5dc595d2a236eb84e8df04922625e05c24d8e07f7d00589c9251b0eebaab0dc47858cc1e4206fe26487e9708e824c376b607ab8de09f871d SHA512 f05d7cd43849c81fce6f31c6a97c8122351e87f9a98950edfd6ae9fa32097036be52e31444000e9a1fecd3cf761bfd3d9999842a4f941883dafaedfb657cd946
MISC metadata.xml 735 BLAKE2B 12ea133df3d7eb9367a65e572ef91893e654d5b77caa27c66e4b5b41ba90ebc5e619eb78dfff2a67183d2c1cbfcf35fa903b2bb75604ce153d5cedfce5346e3c SHA512 8ed6b12d4f2aa1985897a8d81ce898dbc0d14ac222f3d0f259cbe80fbb8b2349dff7677627daeaf39a422f290200da4fac6348abc81c9e35da0ca73a11cfdd83
diff --git a/sys-devel/clang-common/clang-common-16.0.0_pre20230101.ebuild b/sys-devel/clang-common/clang-common-16.0.0_pre20230101.ebuild
new file mode 100644
index 000000000000..f842b4113d92
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-16.0.0_pre20230101.ebuild
@@ -0,0 +1,132 @@
+# 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
+ stricter
+"
+
+PDEPEND="
+ sys-devel/clang:*
+ default-compiler-rt? (
+ sys-devel/clang-runtime[compiler-rt]
+ llvm-libunwind? ( sys-libs/llvm-libunwind )
+ !llvm-libunwind? ( sys-libs/libunwind )
+ )
+ !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
+ EOF
+
+ 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 4bb457fb0398..339c5b23e9d5 100644
--- a/sys-devel/clang-runtime/Manifest
+++ b/sys-devel/clang-runtime/Manifest
@@ -6,4 +6,5 @@ EBUILD clang-runtime-15.0.6.ebuild 764 BLAKE2B e299328f6a748acdd6cf9ca5f07d66c6f
EBUILD clang-runtime-16.0.0.9999.ebuild 1369 BLAKE2B a25d32189f78e993706138f339ad0645e3042bd283ddc26b4189c117ea2368d0a1c2b09c2f5f538112bcad65fc14dc0d29f16e4d6ff98e3401c3bdb74d59d750 SHA512 c37860675576d51047f5347400753a19469ea0e2e6ff49a3a5ba6e35f5b33372c06ee2ac1e82aa4a681f35e8c186a1ff8eb25a9eccd0ee35e5ab3d57873f40e0
EBUILD clang-runtime-16.0.0_pre20221217.ebuild 1357 BLAKE2B 41fdd4a52628924b2e5a2af2a06126e533749f36e15ff66cea9273d2e0afbc9107ed1656431170a121d59d1c39a8731c8ebd966e7ec53d23a833a95526f20fba SHA512 5919d5f398ba8be49072679cdf84bca0dfe16759a5d148b7f3df322d3c9087adac172c302b96bc6b67dffd5ccacfcca44cc7091bf631c0af16d5685aacc4e7ef
EBUILD clang-runtime-16.0.0_pre20221226.ebuild 1357 BLAKE2B 41fdd4a52628924b2e5a2af2a06126e533749f36e15ff66cea9273d2e0afbc9107ed1656431170a121d59d1c39a8731c8ebd966e7ec53d23a833a95526f20fba SHA512 5919d5f398ba8be49072679cdf84bca0dfe16759a5d148b7f3df322d3c9087adac172c302b96bc6b67dffd5ccacfcca44cc7091bf631c0af16d5685aacc4e7ef
+EBUILD clang-runtime-16.0.0_pre20230101.ebuild 1369 BLAKE2B f69af454137c9689bebc710a7a6988338bc715c68238367d55b5f01859244954b7ff8719ba285b64e76a578f063ab3f6325d5e9519ef5ebdb31592af1a276225 SHA512 436ecac7bb5ba46ca72ab48ea2bd8e30e2ee180218c0c3f14f41abd4e3b0445655ad033058bb78661b2095c5786ef644b538574d4ae2a9a8ee12fefc179f79db
MISC metadata.xml 661 BLAKE2B 24688c511713ea102b83c71d226d519981b3aee0e05ef7a56d6a80be829efd843194e45cb4fd801f0bb976b6f1976386d6a2b05d2bc907fe2aa42b22b85b7d1f SHA512 2b5ab8783c90795f2e7d1673d876048ed9745f4911fb7a860df56deac13a6dfeba4581a84562eae54eff757c45042ca3fab75c7800313ae61df9ce69780a9294
diff --git a/sys-devel/clang-runtime/clang-runtime-16.0.0_pre20230101.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.0_pre20230101.ebuild
new file mode 100644
index 000000000000..67b42357665e
--- /dev/null
+++ b/sys-devel/clang-runtime/clang-runtime-16.0.0_pre20230101.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 7100de0b6972..e0000088acd5 100644
--- a/sys-devel/clang/Manifest
+++ b/sys-devel/clang/Manifest
@@ -13,6 +13,7 @@ DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6
DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
+DIST llvm-project-b20dd2b186fdc76828219b705a2b58f5830f4b9d.tar.gz 175044630 BLAKE2B f9a955e8413b57067fb697792316fb0c1e3eac00b1af208ba5d29db01a9acc96b88c7edca12c43762b1425c71a716a7c74d5d7edad45a442f32ba73f88f548b6 SHA512 5133c32d7856c8280bfeb47c3e5a9c0d8c1c291aad29af93586523110f95b08e582ff416fc6be02241eabfe80c35ad4f0334de5ead2a41bc6504616b1c6fd15a
DIST llvm-project-dfc20708bcdf7b4c4bea8595fc4ac8674634d5e6.tar.gz 174878013 BLAKE2B 9c37423ae2a85a9d4a17fba97733cf808ebc98fa1488fb02e8c3e23039511154a220184af1bc6950c857b7d3c528d01e3dde5441c18903f25a7d7b7781e08f9b SHA512 146d6ab53cce257c21ae202b887bbb77b017f883cf26337bd3af29289cd828aabf95c528c6c192473c3cafb7e803940261f32a8fab6130deca01ccd5576c78eb
DIST llvm-project-fb792ebaf2114ad11d673cf891ae560e2e604711.tar.gz 174312496 BLAKE2B dd7f30b911ef5049e9e2bff7b2768e31b48b1f4c7acaf159f535fe3deb5aa6630fdf7857c83fffcda1119a38a52101490d2b6cb41cb295bb7dd85cde0445b7ee SHA512 bef15e7d82a2faf8be24f784d3d34ff9b21c8f17256879587ea5471011a32a1eb885e1b020da55aa096f2e0b5fe4bcf9fe8f0f5b5d34f5f386c48899c68fb7d1
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
@@ -24,4 +25,5 @@ EBUILD clang-15.0.6.ebuild 11956 BLAKE2B 71af5a091c6b3a4f1fca7282a0d33655154fe16
EBUILD clang-16.0.0.9999.ebuild 11627 BLAKE2B cbd615942bca5e36ae06262b708afb3b676745bd5d693e9703c738948331206894c3a2ea4dfaf72bf2863ad7282f3933c6f7cf83b84840f75cd35bde1cd7338c SHA512 954cfe068030aefd8452498bfe5b4c0b95a392fdab871d948f349322f9176924b94213a679d432e6330fe95d9c5b3e4c300caee99704a93d0a935422ffbcdea0
EBUILD clang-16.0.0_pre20221217.ebuild 11633 BLAKE2B a0e4a596b3eaa975e8da6903df1e4dc936190d9a08a691a24e8e914adf27aa117bedc3bb55a05d77973a5217fcfe91ecadc8b2a695bb8344c4bf1ff02a268c80 SHA512 bec2b0cffc636b5f2cf0065725a95659fd2057dc43e0829f25a67756f3fa2784191e323713f57934ba24512aa54f250d293594746b56fb13c7b36a6774984d2f
EBUILD clang-16.0.0_pre20221226.ebuild 11633 BLAKE2B a0e4a596b3eaa975e8da6903df1e4dc936190d9a08a691a24e8e914adf27aa117bedc3bb55a05d77973a5217fcfe91ecadc8b2a695bb8344c4bf1ff02a268c80 SHA512 bec2b0cffc636b5f2cf0065725a95659fd2057dc43e0829f25a67756f3fa2784191e323713f57934ba24512aa54f250d293594746b56fb13c7b36a6774984d2f
+EBUILD clang-16.0.0_pre20230101.ebuild 11627 BLAKE2B 6394b90d5145124cd7d5aa04cd812e083b35889cdddd72db284765518248059368a26ecf311679987cf19962a9ac137a162f939cac5fccb2517938f73deb69a0 SHA512 fc9f8f0f62ffd02ea1a1de84ecf0b9c6f138956b107f88773141c485a054008e35d61b9e1274accf0f80195f6ee528ac95fb4b013f9810ed79e10461d67e752c
MISC metadata.xml 1600 BLAKE2B 8e49e099132445cf695e904acad8a699f3d8c4c1e4cd6ba9d0b97180dfa5b67e9c30b00d1e4cb6cd2f61b27f022accc8d6ee889c6569fc58fbc058186ad216fc SHA512 96b7cf4988ff1fd923ec87311caed458b64888b5acaaf20cc1ad893f2a963158f7f59398f9fd4f9e65cab3df265c0d002048ff874f7a76b94f36377bf9e8f5f6
diff --git a/sys-devel/clang/clang-16.0.0_pre20230101.ebuild b/sys-devel/clang/clang-16.0.0_pre20230101.ebuild
new file mode 100644
index 000000000000..b8648e340558
--- /dev/null
+++ b/sys-devel/clang/clang-16.0.0_pre20230101.ebuild
@@ -0,0 +1,461 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+inherit cmake llvm llvm.org multilib multilib-minimal \
+ 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/lib/Testing/Support
+ 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
+}
+
+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
+ c-index-test
+ clang
+ clang-format
+ clang-offload-bundler
+ clang-offload-packager
+ clang-refactor
+ clang-repl
+ clang-rename
+ clang-scan-deps
+ diagtool
+ hmaptool
+ )
+
+ 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=(
+ -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// /;}"
+
+ -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
+
+ -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
+ [[ -x "/usr/bin/clang-tblgen" ]] \
+ || die "/usr/bin/clang-tblgen not found or usable"
+ mycmakeargs+=(
+ -DCMAKE_CROSSCOMPILING=ON
+ -DCLANG_TABLEGEN=/usr/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 eab92f1a27eb..4050445fdaac 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -16,6 +16,7 @@ DIST gcc-11.3.0-musl-patches-1.tar.xz 3856 BLAKE2B f511f8b4c0696771d906beee9645b
DIST gcc-11.3.0-patches-7.tar.xz 15184 BLAKE2B 426f00feaa982a35d2c459e7a2c2e9d29b4b467ac3625ebd72bb31077c75bbf0c028137df03921c52ddc97a14d92c49777bd3f27b47a7b47d8a05e2d106b6bdb SHA512 bec8bf26b3e50633a5a2e0bb75ffeaba86becb704c14365ff3342e8d651ab75bb3ceec7808d88a25989b8c7182398184b95b6d1267aaef9aa828f687e4895e9d
DIST gcc-11.3.0.tar.xz 81141364 BLAKE2B 7e562d25446ca4ab9fe8cdb714866f66aba3744d78bf84f31bfb097c1a981e4c7f990cb1e6bcfec5ae6671836a4984e2b70eb8fed81dcef5e244f88da8623469 SHA512 f0be5ad705c73b84477128a69c047f57dd47002f375eb60e1e842e08cf2009a509e92152bca345823926d550b7395ae6d4de7db51d1ee371c2dc37313881fca7
DIST gcc-11.4.0-musl-patches-0.tar.xz 3844 BLAKE2B f3f1be6718e3cf08e553a1a2319a85e13368279849f6f3ab89ad7abe505316afacf5084846c0cb133bdcb5c918244644242c194e6ce55455a26e67b3983d73ef SHA512 a81db52d21de364137461dcff7e1af696df4a02fa26452f90439ae4af14ccbffe68eb4ee93ae56257490ab8aa36b4bff37c4e1f2cf4dd4624b3a6fb4cb50b7ac
+DIST gcc-11.4.0-musl-patches-1.tar.xz 4320 BLAKE2B 9f59aef44243b6d63bd9c4639b413523e74784dc0da931a9f1be75d2091f7e99c530b32b567315972a88816d6b30d2c404465a2f28138ba2cc894914d7a123fb SHA512 c174623bf40fb0cab53d1ca82fa7e0b05f0114c61c839e316dfff7678d202b850d4d5011432cf6fa40c54e563e28381e9a9f80667d9428b3f272ba8391c6ac84
DIST gcc-11.4.0-patches-3.tar.xz 15200 BLAKE2B a393df941a2a31164f477d6bc0032e28319e8f0bd87200eb453708f85aa8c0bf5d67e733ee7b75cf6d14743e18cc941cee1b77a8247f8c5683d17a98cbeb280f SHA512 6f6096d95c7c62780d1070097739882393a8df5172c3a5ae811a8d4d1c98a0cd14a34f3f7e95410c8f210aec434330ac3b8876c688faeb130d7bb8fa3333ece9
DIST gcc-11.4.0-patches-5.tar.xz 15136 BLAKE2B 202bc321d1a75a543bcbb54ddd7aae2a6d81764b1ae752e95bbcb7b1e68cbac33e2066a1c935c705fc7cea6603e93a6dcb3041645131a5e76c986242a8613908 SHA512 96ec2dec4e663d739fa7b80e63df32aa6d72c193e124bc93580cc1c0f9b8d3578dee3faf0e765b766cc6bb46136958a4b0e7095962d73b6e2a8066b8be558a5c
DIST gcc-12-20221126.tar.xz 79631864 BLAKE2B 3bb97ef4a1a17ab8b92b431b1f792c11131085a1b523efa08c5b4f995b44bf628be371564813e5affb1f8e2320bb8a9b04532e57b2deeef26b33f517783daa5e SHA512 163e0aa39dc5c24980f84000bd6ccd4b7c24581831b7a4cdbd63e4726be5c2b1933d034ce12c65cf95e4c0ebe1175af7e32facace465bfd7c7c377401350a2df
@@ -44,13 +45,13 @@ EBUILD gcc-10.5.9999.ebuild 1108 BLAKE2B 2db612df53fbaec59c707acb56bac804a4ee797
EBUILD gcc-11.3.0.ebuild 659 BLAKE2B 310352b879c732515ce63983db79b32bf7c8c200a650627a14b5284fceea9a7e7f3e545044a8c00ccc44cd760b18123542bd233242cb3ebc48ef422439c8e430 SHA512 44c89a7782e5e37c5ef61c50d5aa6d07c09f19bada293ed657d7062837a5a9be9483fda0b1845ee794f42031ea098a1b88d439f7be202f4276f77748ff45815e
EBUILD gcc-11.3.1_p20221209.ebuild 1286 BLAKE2B 5bb5bb1dfa617deb42fd1194fd51172e7865f6890bf430d2269ce0a5c27854b494e2ef2a997371dafd6328b2c59656718201ad0dae946911d18ddfae01ad9904 SHA512 d8242777dd4aec49d56319b7da0423a3d39a906cc78650e733db27a3021603fe7043cfd5f2e5497847ca64f7439ebaca20b01a2fb7264d790748d300d87377ab
EBUILD gcc-11.3.1_p20221223.ebuild 1294 BLAKE2B c6aa11e60a7cd0d5906fb0ef055b53583472fb17a5715f8f3450ce13cad83ae9f04cb42f10b41b8905532e0538b78e36d6fca8d56bf1550ee2f20b03cef0f4d1 SHA512 62e61d7502d140012879dadee28dc8140215b43a5bb24b4e59fce1cf697b5bf4d1433b887f8958d77c92abd3c7f06a2d4a90ae93bfc9baf1640b0d048132b872
-EBUILD gcc-11.3.1_p20221230.ebuild 1297 BLAKE2B 2f9401f30ef88c7e8fcba08c8f4d4f1bd405c4d0a24185a158cbfd1e42e7a1d6323293c76553a5f136e1d06b5bf5f30c2222263a64396c1d187c3cc866ae7fa5 SHA512 9a8f8d1e2ed6732541eb97565e8f47b7fefc9de462a71b9e04d190f25e654f2eb6f378bf21b0839bad7be07b41398b9938e8e76123ccd37650780b52293a3b6e
+EBUILD gcc-11.3.1_p20221230.ebuild 1297 BLAKE2B eaa41030ed29e23dad88339b03620e6f3aeb4746b4900b747acae6e13b1a173f30fea686b4517f670efc59211e9006b094ead0be477ce0b8b6dd23d6202ff50f SHA512 41d0f64c9c2f1651e4b4c2e7499e01a3e2e4b45e4cbea91924c3afcde1468f6ae377a3cb9f8a12e98d8705256a48d4f9c8655337db472f99305619887442d297
EBUILD gcc-11.4.9999.ebuild 1267 BLAKE2B 09a26812068945e11164d0a4f8f5cc10dc261a20a647fd4102decc83eecbbe8fcc7f38093609314fa1f26c46164e8248aede741880f7cff64dd5a94836765fa2 SHA512 4ecf698cd6e96dc08683a0e9b69936cdd9085c300d330fb9830cee0e38783e0a1fc8409db39159f9b247f28fc5d7d7572ad3e975f3951f1cb8537f49886bdcde
EBUILD gcc-12.2.0.ebuild 1434 BLAKE2B a02496eb0178f8f3e38487b233eea12467e9e799763eb447cd545ea5afd48460bc8fc64bd68c84fca38f2d4cdb7487a65b34f4ceedf335393964ec770c0a69de SHA512 62d1a2dfac584c8abe548ff03c960a9e545e34ee1bd61977413af1b31ce98e281b5b90a33be2c666f418a272658f5188e9355bacc51dd0cc7ff456bcc47f2edd
EBUILD gcc-12.2.1_p20221126.ebuild 1437 BLAKE2B be29d238ca36333c711e627b74e5ff647115259acaa853afab9b21436ff2738bf7529a6290339a0fd6c9cb79a93ba9df553cff6f30f9ff67dea07ae8632accb2 SHA512 a93d611ec6e1dcb9563ea7664c5c2840ebccf90c5cade0ac5000e6922219a2c5e1c1a6912f44c35597feb0ee218e7103b848bcb7f3fe7289ea724955b58604e7
EBUILD gcc-12.2.1_p20221210.ebuild 1434 BLAKE2B 5755d51a87eaf089108e881d501d0464514131bf0ca753abf13d012acc813ac5e7165f4fefb9117a0fda18118bf1fbee837e66fca083431a34021c37c9438368 SHA512 14f1a37595812c10b4da0c6ce970ea00a45e66b884df8102879c5f9c5d65472ac1196528f64ba1a5aae442f586d5f210939d7f8e26a1f4e9d1a7c7c03ca94198
EBUILD gcc-12.2.1_p20221224.ebuild 1434 BLAKE2B 2e78e2f2c44d329e9bf4360083f27579fecff712f773f854be0d5fbc79f71ef028114388d6ecce3ec3201d4698a5ae35969614746811ecb361dbb4ea61b22478 SHA512 176164b6d9af91e1b09230626e2705e0a483a21b6d7e2042e4a6b17455964a30b8e4f7b5a0957f9b3c91c91fc53b8a6b77e98be74c897a9ef778854e8ca0e998
-EBUILD gcc-12.2.1_p20221231.ebuild 1437 BLAKE2B dce6bcbd77f29a42bd7687d483285cadacd0969a962dab6f7bf73d8cd06460263c4aac4791b9a38a2695e82caa33e3e8bf4723ff0989ec421900028b591d28fa SHA512 cf98d4c61208a06eade085ad52515b7f9edede76b8ca4247883ea0fc3a37b7fa0d7566511e1f5e22982b892b5cb2bef04c1e0b4d374f0dce32e7ed4a61326d45
+EBUILD gcc-12.2.1_p20221231.ebuild 1434 BLAKE2B 47136fbf5ba5e3bfbb4a631dbd7e71472a4760b598396c8e21c1505e257c7eb9f3459e90311152df1878203cda659d8cbb542036b6ba2940ff90d15351b37201 SHA512 4ded3e25cfce0aba6e6408a8e0d9bca82dd3ae33d274c4ec3bfe8bb41f9e9e92cb4b849e72859751de33de35433a398b378b5af5c78c0e1577c4cdd3e5720711
EBUILD gcc-12.3.9999.ebuild 1545 BLAKE2B 78fdc4a7b20d22bba137cba00e49d2249c5616bf1c4cf619162da1d98c750fb3da71fbb1cd4e136624cc4e0a112547e6c4c29992aa58ab12507917c7d728831a SHA512 f3562696a79035e64b8e79cee720fe24c7041bf922d79e5cff1ae864a533997995465d0871bfc4f87f6d5a66e7f8ac02c490792554a0628ae30d96a061ef9279
EBUILD gcc-13.0.0_pre20221218.ebuild 1286 BLAKE2B 5dbd2f3d4a436938f80d6303dad46a43b01a379aa9d170412168c7c560088468d35ed22ed15ada6dcb86c03f7f87c8243483da89ee3d67ce40b6f2aae5168213 SHA512 b949a2d0ecfd08ed0d449dfb0743aca3568339b5e85885d77ae4a2a67d7e86594a7271b1e360717ebd22a2323795300d0e2fc2c3dc53df2306a9a1528fc62fdf
EBUILD gcc-13.0.0_pre20221225.ebuild 1286 BLAKE2B 5dbd2f3d4a436938f80d6303dad46a43b01a379aa9d170412168c7c560088468d35ed22ed15ada6dcb86c03f7f87c8243483da89ee3d67ce40b6f2aae5168213 SHA512 b949a2d0ecfd08ed0d449dfb0743aca3568339b5e85885d77ae4a2a67d7e86594a7271b1e360717ebd22a2323795300d0e2fc2c3dc53df2306a9a1528fc62fdf
diff --git a/sys-devel/gcc/gcc-11.3.1_p20221230.ebuild b/sys-devel/gcc/gcc-11.3.1_p20221230.ebuild
index ac913fa29146..6335866c4e6a 100644
--- a/sys-devel/gcc/gcc-11.3.1_p20221230.ebuild
+++ b/sys-devel/gcc/gcc-11.3.1_p20221230.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -7,7 +7,7 @@ TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
PATCH_VER="5"
PATCH_GCC_VER="11.4.0"
-MUSL_VER="0"
+MUSL_VER="1"
MUSL_GCC_VER="11.4.0"
if [[ $(ver_cut 3) == 9999 ]] ; then
diff --git a/sys-devel/gcc/gcc-12.2.1_p20221231.ebuild b/sys-devel/gcc/gcc-12.2.1_p20221231.ebuild
index 0a26e86f2242..85b3b5eaeecb 100644
--- a/sys-devel/gcc/gcc-12.2.1_p20221231.ebuild
+++ b/sys-devel/gcc/gcc-12.2.1_p20221231.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -34,9 +34,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 ~loong ~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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
# 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.
diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest
index 08d098f71d27..343562b33d35 100644
--- a/sys-devel/lld/Manifest
+++ b/sys-devel/lld/Manifest
@@ -4,6 +4,7 @@ DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6
DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
+DIST llvm-project-b20dd2b186fdc76828219b705a2b58f5830f4b9d.tar.gz 175044630 BLAKE2B f9a955e8413b57067fb697792316fb0c1e3eac00b1af208ba5d29db01a9acc96b88c7edca12c43762b1425c71a716a7c74d5d7edad45a442f32ba73f88f548b6 SHA512 5133c32d7856c8280bfeb47c3e5a9c0d8c1c291aad29af93586523110f95b08e582ff416fc6be02241eabfe80c35ad4f0334de5ead2a41bc6504616b1c6fd15a
DIST llvm-project-dfc20708bcdf7b4c4bea8595fc4ac8674634d5e6.tar.gz 174878013 BLAKE2B 9c37423ae2a85a9d4a17fba97733cf808ebc98fa1488fb02e8c3e23039511154a220184af1bc6950c857b7d3c528d01e3dde5441c18903f25a7d7b7781e08f9b SHA512 146d6ab53cce257c21ae202b887bbb77b017f883cf26337bd3af29289cd828aabf95c528c6c192473c3cafb7e803940261f32a8fab6130deca01ccd5576c78eb
DIST llvm-project-fb792ebaf2114ad11d673cf891ae560e2e604711.tar.gz 174312496 BLAKE2B dd7f30b911ef5049e9e2bff7b2768e31b48b1f4c7acaf159f535fe3deb5aa6630fdf7857c83fffcda1119a38a52101490d2b6cb41cb295bb7dd85cde0445b7ee SHA512 bef15e7d82a2faf8be24f784d3d34ff9b21c8f17256879587ea5471011a32a1eb885e1b020da55aa096f2e0b5fe4bcf9fe8f0f5b5d34f5f386c48899c68fb7d1
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
@@ -15,4 +16,5 @@ EBUILD lld-15.0.6.ebuild 2097 BLAKE2B 53c1a4950dd420629325653a6529634a995e79e318
EBUILD lld-16.0.0.9999.ebuild 2029 BLAKE2B 11f5ed949a1bee56186364445e5a64a64b7e4b51c10664cab20dfed1f22e3809ac10a474e1cf0991f38b1d0f47cee8dfbf601af5500480d928a8f186925b1db5 SHA512 7a92f13d78403f0e44781392446e63dd4cbab564872f5156fa53ba7b04eae6ddcb0f7c809e45080dff92bcaf6d1eff1ee8e6dd4991d51c1d6dc0a0c724f7b304
EBUILD lld-16.0.0_pre20221217.ebuild 2029 BLAKE2B 11f5ed949a1bee56186364445e5a64a64b7e4b51c10664cab20dfed1f22e3809ac10a474e1cf0991f38b1d0f47cee8dfbf601af5500480d928a8f186925b1db5 SHA512 7a92f13d78403f0e44781392446e63dd4cbab564872f5156fa53ba7b04eae6ddcb0f7c809e45080dff92bcaf6d1eff1ee8e6dd4991d51c1d6dc0a0c724f7b304
EBUILD lld-16.0.0_pre20221226.ebuild 2029 BLAKE2B 11f5ed949a1bee56186364445e5a64a64b7e4b51c10664cab20dfed1f22e3809ac10a474e1cf0991f38b1d0f47cee8dfbf601af5500480d928a8f186925b1db5 SHA512 7a92f13d78403f0e44781392446e63dd4cbab564872f5156fa53ba7b04eae6ddcb0f7c809e45080dff92bcaf6d1eff1ee8e6dd4991d51c1d6dc0a0c724f7b304
+EBUILD lld-16.0.0_pre20230101.ebuild 2029 BLAKE2B d4790c6a33351f4018d7b8e68735ed3319daa0de15cbfa16d258e53cba7da1ef1db96bde5ecd7ecd861e87f4c5d984a1252405f030f1fff4d27fc76d200e3bbf SHA512 a1125b3210877fb03cae6ac1213ceb90cfed451b69f1b646ee6b0a7e47efd0fbfcd017ad3cf5e26274e4b4bceb6d9593d8c25476d83a334a7ef2a35797f667e6
MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/sys-devel/lld/lld-16.0.0_pre20230101.ebuild b/sys-devel/lld/lld-16.0.0_pre20230101.ebuild
new file mode 100644
index 000000000000..35e7ea49ec4c
--- /dev/null
+++ b/sys-devel/lld/lld-16.0.0_pre20230101.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+inherit cmake flag-o-matic llvm llvm.org python-any-r1
+
+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}[zstd=]
+ sys-libs/zlib:=
+ zstd? ( app-arch/zstd:= )
+"
+RDEPEND="
+ ${DEPEND}
+ !sys-devel/lld:0
+"
+BDEPEND="
+ 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}"
+ )
+ 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 99b1b2d9e750..40a3f2790454 100644
--- a/sys-devel/llvm-common/Manifest
+++ b/sys-devel/llvm-common/Manifest
@@ -4,6 +4,7 @@ DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6
DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
+DIST llvm-project-b20dd2b186fdc76828219b705a2b58f5830f4b9d.tar.gz 175044630 BLAKE2B f9a955e8413b57067fb697792316fb0c1e3eac00b1af208ba5d29db01a9acc96b88c7edca12c43762b1425c71a716a7c74d5d7edad45a442f32ba73f88f548b6 SHA512 5133c32d7856c8280bfeb47c3e5a9c0d8c1c291aad29af93586523110f95b08e582ff416fc6be02241eabfe80c35ad4f0334de5ead2a41bc6504616b1c6fd15a
DIST llvm-project-dfc20708bcdf7b4c4bea8595fc4ac8674634d5e6.tar.gz 174878013 BLAKE2B 9c37423ae2a85a9d4a17fba97733cf808ebc98fa1488fb02e8c3e23039511154a220184af1bc6950c857b7d3c528d01e3dde5441c18903f25a7d7b7781e08f9b SHA512 146d6ab53cce257c21ae202b887bbb77b017f883cf26337bd3af29289cd828aabf95c528c6c192473c3cafb7e803940261f32a8fab6130deca01ccd5576c78eb
DIST llvm-project-fb792ebaf2114ad11d673cf891ae560e2e604711.tar.gz 174312496 BLAKE2B dd7f30b911ef5049e9e2bff7b2768e31b48b1f4c7acaf159f535fe3deb5aa6630fdf7857c83fffcda1119a38a52101490d2b6cb41cb295bb7dd85cde0445b7ee SHA512 bef15e7d82a2faf8be24f784d3d34ff9b21c8f17256879587ea5471011a32a1eb885e1b020da55aa096f2e0b5fe4bcf9fe8f0f5b5d34f5f386c48899c68fb7d1
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
@@ -15,4 +16,5 @@ EBUILD llvm-common-15.0.6.ebuild 606 BLAKE2B 831983952073003ab26566b9d6d0405d10d
EBUILD llvm-common-16.0.0.9999.ebuild 524 BLAKE2B 1864e7c6a8578fe3ad74718368deca408757c501726fd3a2941087756f50bbf9ed83a6a635ef264150c86b577f373b5d391df4cbc6ff3e3e6a561bcc41b2c5f1 SHA512 feab4cb373d2384ce018d26b480024060b89c6a5475e7e7d475124b9a20a2c55470d98799067c437540b6ec6e7471f712534005ec426f76a247b8767edff6164
EBUILD llvm-common-16.0.0_pre20221217.ebuild 530 BLAKE2B 006dd37bb215961550b533dbe6e2b8b72451bef5cb73579ea1f865732ce1b2667c446391b05eda5af61bcd90530a15e8b40adf3435f20e016e50f81acd76d7c3 SHA512 b6cb45020ce26ca2666e841467ac1206d58c3cc628a3c68d4cf57ce5da2497609a55a0546e987562893f66d6636d3d24a466475bd075edc3c0255b2d0aa24178
EBUILD llvm-common-16.0.0_pre20221226.ebuild 524 BLAKE2B 1864e7c6a8578fe3ad74718368deca408757c501726fd3a2941087756f50bbf9ed83a6a635ef264150c86b577f373b5d391df4cbc6ff3e3e6a561bcc41b2c5f1 SHA512 feab4cb373d2384ce018d26b480024060b89c6a5475e7e7d475124b9a20a2c55470d98799067c437540b6ec6e7471f712534005ec426f76a247b8767edff6164
+EBUILD llvm-common-16.0.0_pre20230101.ebuild 524 BLAKE2B 381b028d6ad33fa97d2ff250266bd896153222cb62647bc6c4a9f7493fc96c23faf788ce8a976d35333e8d40e63cad4c3f44322f6a41f1dbe53f9e772c3a40d9 SHA512 9661a9c544d8bf3edf6c24a307324a58652c8635703dcfa008cad96826e3404cbb05e5c95fe7df85ed6d2642e4f83cfff0c9a381b796cc78f560854aa071acbe
MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/sys-devel/llvm-common/llvm-common-16.0.0_pre20230101.ebuild b/sys-devel/llvm-common/llvm-common-16.0.0_pre20230101.ebuild
new file mode 100644
index 000000000000..ce5f03ca34a5
--- /dev/null
+++ b/sys-devel/llvm-common/llvm-common-16.0.0_pre20230101.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 8b1830fb6477..09f4075ad4bb 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -13,6 +13,7 @@ DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6
DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
+DIST llvm-project-b20dd2b186fdc76828219b705a2b58f5830f4b9d.tar.gz 175044630 BLAKE2B f9a955e8413b57067fb697792316fb0c1e3eac00b1af208ba5d29db01a9acc96b88c7edca12c43762b1425c71a716a7c74d5d7edad45a442f32ba73f88f548b6 SHA512 5133c32d7856c8280bfeb47c3e5a9c0d8c1c291aad29af93586523110f95b08e582ff416fc6be02241eabfe80c35ad4f0334de5ead2a41bc6504616b1c6fd15a
DIST llvm-project-dfc20708bcdf7b4c4bea8595fc4ac8674634d5e6.tar.gz 174878013 BLAKE2B 9c37423ae2a85a9d4a17fba97733cf808ebc98fa1488fb02e8c3e23039511154a220184af1bc6950c857b7d3c528d01e3dde5441c18903f25a7d7b7781e08f9b SHA512 146d6ab53cce257c21ae202b887bbb77b017f883cf26337bd3af29289cd828aabf95c528c6c192473c3cafb7e803940261f32a8fab6130deca01ccd5576c78eb
DIST llvm-project-fb792ebaf2114ad11d673cf891ae560e2e604711.tar.gz 174312496 BLAKE2B dd7f30b911ef5049e9e2bff7b2768e31b48b1f4c7acaf159f535fe3deb5aa6630fdf7857c83fffcda1119a38a52101490d2b6cb41cb295bb7dd85cde0445b7ee SHA512 bef15e7d82a2faf8be24f784d3d34ff9b21c8f17256879587ea5471011a32a1eb885e1b020da55aa096f2e0b5fe4bcf9fe8f0f5b5d34f5f386c48899c68fb7d1
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
@@ -24,4 +25,5 @@ EBUILD llvm-15.0.6.ebuild 12541 BLAKE2B c2db6e18e43722ae466e91cd2336fff3cb3c9d4f
EBUILD llvm-16.0.0.9999.ebuild 12584 BLAKE2B 54adab5484a93dcea378220dbeea3cc461be770e5a6484bfae3c5bef0866ebb42c1c3996244a02789fa76ecd7fd9dcb81b6c186389cba34b6be584af47a4f98d SHA512 cb1d3a09c4d3745b18a718e3d497f72b563726db4badeaf24a87972c3ac8be5021a00be98ec1f49cac33ac0e4915386e2c62c614c37665d0d7109bed510a7cba
EBUILD llvm-16.0.0_pre20221217.ebuild 12590 BLAKE2B 16512fc7c4eb6c9aa1997883e9ebc637f443339b4bf742dc1e802b84d47dc833d9f63c15bb7be7eb835f869d8f5cdb99390953be8e7bcf468b8e118f354a3a77 SHA512 3ef9826bad76a4439bc65bdbdba5c37de8ab6b49f4451b7a2c146fadb56fccd3bf2885bfb065616b422504ee0b05098083db0f30e38ef2ea4b43539b7347b545
EBUILD llvm-16.0.0_pre20221226.ebuild 12590 BLAKE2B 16512fc7c4eb6c9aa1997883e9ebc637f443339b4bf742dc1e802b84d47dc833d9f63c15bb7be7eb835f869d8f5cdb99390953be8e7bcf468b8e118f354a3a77 SHA512 3ef9826bad76a4439bc65bdbdba5c37de8ab6b49f4451b7a2c146fadb56fccd3bf2885bfb065616b422504ee0b05098083db0f30e38ef2ea4b43539b7347b545
+EBUILD llvm-16.0.0_pre20230101.ebuild 12584 BLAKE2B 65d81875bbb3d9b562bb719bc48efb40e672cb2c85d3be93e2e51ba7545c416d5c5818021aa9654215b8067ec40bba7ed6775cb7534c310eff6e22eb86c4be5a SHA512 03113d290778d1cd7ad93254f1ef1480e42ab202f715d471bcbed295a084d2db773f8e669ec0792c607da43afdf6e51b88406932a76049c4b38c58bf1606cfcd
MISC metadata.xml 2654 BLAKE2B c27983265b6c9b33200ee42565648f30a6cc9c51be53a1cb82a3353d7c1f7aa9c9501c58254280c2880ff2d4992b4834e4b5e2f1c9b1c60e9b21945f234b9973 SHA512 b331d9186908762907f5713b00e357785b62afbee83afefac8701beb1a20f7ebd68df4a030bb82c6f9164719d4ccfcaf16c189833ad40e9f5900c36247d9cff2
diff --git a/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild
new file mode 100644
index 000000000000..0e4934164443
--- /dev/null
+++ b/sys-devel/llvm/llvm-16.0.0_pre20230101.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
+ 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 doc exegesis libedit +libffi ncurses test xar
+ xml z3 zstd
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
+ 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_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
+
+ if tc-is-cross-compiler; then
+ local tblgen="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+ [[ -x "${tblgen}" ]] \
+ || die "${tblgen} not found or usable"
+ mycmakeargs+=(
+ -DCMAKE_CROSSCOMPILING=ON
+ -DLLVM_TABLEGEN="${tblgen}"
+ )
+ 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() {
+ 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)"
+}