summaryrefslogtreecommitdiff
path: root/sys-devel/clang-common
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-06 17:34:33 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-06 17:34:33 +0100
commitfb6a7e84128cd7df87023d4e7d224de83057f748 (patch)
tree6ace847db7319686f5aeb137202fa1d273c75491 /sys-devel/clang-common
parent0e52cbae2c719c3ef794ebeb0f4374fb96efcff3 (diff)
gentoo auto-resync : 06:05:2023 - 17:34:33
Diffstat (limited to 'sys-devel/clang-common')
-rw-r--r--sys-devel/clang-common/Manifest14
-rw-r--r--sys-devel/clang-common/clang-common-16.0.1.ebuild180
-rw-r--r--sys-devel/clang-common/clang-common-16.0.2.ebuild180
-rw-r--r--sys-devel/clang-common/clang-common-16.0.4.9999.ebuild (renamed from sys-devel/clang-common/clang-common-16.0.3.9999.ebuild)0
-rw-r--r--sys-devel/clang-common/clang-common-17.0.0_pre20230325.ebuild180
-rw-r--r--sys-devel/clang-common/clang-common-17.0.0_pre20230414.ebuild180
-rw-r--r--sys-devel/clang-common/clang-common-17.0.0_pre20230421.ebuild180
7 files changed, 1 insertions, 913 deletions
diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest
index 8f3d63334cd5..ac77db37cda5 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -1,26 +1,14 @@
-DIST llvm-project-0be1fbac2a7797399c0970e3f4033288036b65f6.tar.gz 181527027 BLAKE2B f2f3b3a33b2a50f3b4f97df16a948e5ed5e642f737de8e852da164aefd3ed9af7bbd0fc1de9f7c9dbee6b9b8ebe11e52af8cc79b8a130cff405fc1238afe217d SHA512 946cd1435a26673c851bdda170864d0c362dfc14d1a7087fbe6303ac79e1821e9c53b72e92d15ad7180b1d6ea3bcc0458e7bec37acc3e8b8bcca8efbb9ff2387
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
-DIST llvm-project-16.0.1.src.tar.xz 117990772 BLAKE2B 298189ce6d7245711e5bd3e03fa74d603dda5a458463ca0cb261fe6949290c46a70abbd1ad1c556e08da3adc5df577305e267c1135214b900d78502e39b46bc5 SHA512 98fc11c0ad90d5e5a2cb123b497b89a1583fe7f91b3ff05c335037801ef66cbfab08f6d2eff539f0da238e9685d4bc7a9fb2578e28864fc9e9357b84129cefaa
-DIST llvm-project-16.0.1.src.tar.xz.sig 566 BLAKE2B 06c03d789e63ab30bba4c56ba9ec91400d804448482d6a7fd395252b3b9166a5ee7a42a94c2074aa0d1809a3327f993d8932211f3fc05ad281db64c17b2a7094 SHA512 f42db28eb8280db06b1c78fa7a7aaea3a79499cecee1a64ce18c49b90c755b3a78fc93f01d1855887c7918ccc927c3b6147cfc916520f05d4cef65381ca6fe60
-DIST llvm-project-16.0.2.src.tar.xz 117995768 BLAKE2B b329b2b123428f3a966a96f074a75520f07d12fc13ec755403cff2346b23195e6a0c05ca9e789b4cf5b4b3557a922bd41d8dffb6056ee33fbbf2b81001511fae SHA512 4ca76aaaca8812a06a94071e7444a3213d85dca51ea86f6125f854776f69a3e088a92d0621e3911e526f280b35bfb778fb3742c6010d3ed1eba605c08720377c
-DIST llvm-project-16.0.2.src.tar.xz.sig 566 BLAKE2B 8243748ac27e4eec3cc011371e179e19f1005336f07d956fd358f649d1429c8d0ea22ecc376b1dec9fe3db971467ad1dd63e97bb089885d0e1994eeab26b6fd7 SHA512 dbe9367a259954a38f2369b2f226726162090227f1a5ae8c8809eaae47cad7b3b26c754633e6e5c54cacd6360a504d7ba4c659d9232c1648388d657a2aaad10c
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-52882de0e641487329c9e093a90ea3dad01842c8.tar.gz 182953335 BLAKE2B 98682729992d73202e35b540d5d0d87e2acf44e4ab6896a0b6f9ac4a7423f55ad370ae1d7e919a6c86dc7f138a66890ac89b852b03305612d248ab567833f8be SHA512 3685aff0f648e9b477e1e01edebe4799498c21587e2ed5577e2fdef98bb21ea215e206606a11692fbb93a0989fd59fd324faff2c4d97b7afca0851b53f123f05
-DIST llvm-project-5c60a08c696c0420ddc5fdad5b8e50a7528cb3bf.tar.gz 182291041 BLAKE2B f5997611e0293df515d4494d14895cc8fbe22b536f5c419e4ad7d098acbf2b1046ceb332d865eacdae0b7fa1a77b78090551976835dd1b95b5270c9f6e12e410 SHA512 6cda8e55b4fc70e94838c772c56213c811affda96fb98a03d432348f995a313447d0e0e84533350e1fda3162d82633b260ccd8e3b1d59d3216187b44dc5556fb
-DIST llvm-project-5ea158077ec9ca50857ede5cbb0b27c61663fd55.tar.gz 182543024 BLAKE2B 32f5a9ddaa6c7e283d97256d7bd68634f2f8ed6d7167e743ba8076809ea1a3a7159f9ccc56a6e5a8838481cade07389669d8a35b17b5922da0cbef04c80131f8 SHA512 3d180c04ef39adbc9c6ee485e21cdf63fde362f0a22026b00a6d3eba6243e4c8e96fc088335f31051e54f4546d62569131a671d2e655ea735d597361f5732827
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.1.ebuild 5158 BLAKE2B 96869b1c5b4872174e17980aa070c364675a1c3a8b0560af17e6e7530f35b8fd97a8735d3947abc75e8cc245015e585ce44b3e1d9fa418a2a4787cd1f08ef1c9 SHA512 0507f8d775a17b4272e80ee6413df400f1ecbbb0954b1cee0d0cbe97c8793ebf2a90e3ce6bbe7a0e7376b1fb4a0d30b6bdee31f1e1722d81d70cc3b79d4f14c7
-EBUILD clang-common-16.0.2.ebuild 5158 BLAKE2B 96869b1c5b4872174e17980aa070c364675a1c3a8b0560af17e6e7530f35b8fd97a8735d3947abc75e8cc245015e585ce44b3e1d9fa418a2a4787cd1f08ef1c9 SHA512 0507f8d775a17b4272e80ee6413df400f1ecbbb0954b1cee0d0cbe97c8793ebf2a90e3ce6bbe7a0e7376b1fb4a0d30b6bdee31f1e1722d81d70cc3b79d4f14c7
-EBUILD clang-common-16.0.3.9999.ebuild 5067 BLAKE2B daae19bdc044695e3c2a7c6a16687011f499fdbb7a3c7c1dd62488ac17631ba06cc6d9e5f58aaca1c72bbdf3204d80c915094ed59d19a81320616f5f5426a35b SHA512 5a2336c686fe9d45bbc66014d8957f3b5fad926f0b7907b8665864b2932486defd9b2b53de9c0b661077d9efdbd830dd9bbbf388ab2e8f02311135e65c3ebc31
EBUILD clang-common-16.0.3.ebuild 5158 BLAKE2B 96869b1c5b4872174e17980aa070c364675a1c3a8b0560af17e6e7530f35b8fd97a8735d3947abc75e8cc245015e585ce44b3e1d9fa418a2a4787cd1f08ef1c9 SHA512 0507f8d775a17b4272e80ee6413df400f1ecbbb0954b1cee0d0cbe97c8793ebf2a90e3ce6bbe7a0e7376b1fb4a0d30b6bdee31f1e1722d81d70cc3b79d4f14c7
+EBUILD clang-common-16.0.4.9999.ebuild 5067 BLAKE2B daae19bdc044695e3c2a7c6a16687011f499fdbb7a3c7c1dd62488ac17631ba06cc6d9e5f58aaca1c72bbdf3204d80c915094ed59d19a81320616f5f5426a35b SHA512 5a2336c686fe9d45bbc66014d8957f3b5fad926f0b7907b8665864b2932486defd9b2b53de9c0b661077d9efdbd830dd9bbbf388ab2e8f02311135e65c3ebc31
EBUILD clang-common-17.0.0.9999.ebuild 5067 BLAKE2B daae19bdc044695e3c2a7c6a16687011f499fdbb7a3c7c1dd62488ac17631ba06cc6d9e5f58aaca1c72bbdf3204d80c915094ed59d19a81320616f5f5426a35b SHA512 5a2336c686fe9d45bbc66014d8957f3b5fad926f0b7907b8665864b2932486defd9b2b53de9c0b661077d9efdbd830dd9bbbf388ab2e8f02311135e65c3ebc31
-EBUILD clang-common-17.0.0_pre20230325.ebuild 5067 BLAKE2B daae19bdc044695e3c2a7c6a16687011f499fdbb7a3c7c1dd62488ac17631ba06cc6d9e5f58aaca1c72bbdf3204d80c915094ed59d19a81320616f5f5426a35b SHA512 5a2336c686fe9d45bbc66014d8957f3b5fad926f0b7907b8665864b2932486defd9b2b53de9c0b661077d9efdbd830dd9bbbf388ab2e8f02311135e65c3ebc31
-EBUILD clang-common-17.0.0_pre20230414.ebuild 5067 BLAKE2B daae19bdc044695e3c2a7c6a16687011f499fdbb7a3c7c1dd62488ac17631ba06cc6d9e5f58aaca1c72bbdf3204d80c915094ed59d19a81320616f5f5426a35b SHA512 5a2336c686fe9d45bbc66014d8957f3b5fad926f0b7907b8665864b2932486defd9b2b53de9c0b661077d9efdbd830dd9bbbf388ab2e8f02311135e65c3ebc31
-EBUILD clang-common-17.0.0_pre20230421.ebuild 5067 BLAKE2B daae19bdc044695e3c2a7c6a16687011f499fdbb7a3c7c1dd62488ac17631ba06cc6d9e5f58aaca1c72bbdf3204d80c915094ed59d19a81320616f5f5426a35b SHA512 5a2336c686fe9d45bbc66014d8957f3b5fad926f0b7907b8665864b2932486defd9b2b53de9c0b661077d9efdbd830dd9bbbf388ab2e8f02311135e65c3ebc31
EBUILD clang-common-17.0.0_pre20230502.ebuild 5067 BLAKE2B daae19bdc044695e3c2a7c6a16687011f499fdbb7a3c7c1dd62488ac17631ba06cc6d9e5f58aaca1c72bbdf3204d80c915094ed59d19a81320616f5f5426a35b SHA512 5a2336c686fe9d45bbc66014d8957f3b5fad926f0b7907b8665864b2932486defd9b2b53de9c0b661077d9efdbd830dd9bbbf388ab2e8f02311135e65c3ebc31
MISC metadata.xml 735 BLAKE2B 12ea133df3d7eb9367a65e572ef91893e654d5b77caa27c66e4b5b41ba90ebc5e619eb78dfff2a67183d2c1cbfcf35fa903b2bb75604ce153d5cedfce5346e3c SHA512 8ed6b12d4f2aa1985897a8d81ce898dbc0d14ac222f3d0f259cbe80fbb8b2349dff7677627daeaf39a422f290200da4fac6348abc81c9e35da0ca73a11cfdd83
diff --git a/sys-devel/clang-common/clang-common-16.0.1.ebuild b/sys-devel/clang-common/clang-common-16.0.1.ebuild
deleted file mode 100644
index 4acd801b683d..000000000000
--- a/sys-devel/clang-common/clang-common-16.0.1.ebuild
+++ /dev/null
@@ -1,180 +0,0 @@
-# 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-common/clang-common-16.0.2.ebuild b/sys-devel/clang-common/clang-common-16.0.2.ebuild
deleted file mode 100644
index 4acd801b683d..000000000000
--- a/sys-devel/clang-common/clang-common-16.0.2.ebuild
+++ /dev/null
@@ -1,180 +0,0 @@
-# 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-common/clang-common-16.0.3.9999.ebuild b/sys-devel/clang-common/clang-common-16.0.4.9999.ebuild
index 5b4a6647f3ca..5b4a6647f3ca 100644
--- a/sys-devel/clang-common/clang-common-16.0.3.9999.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.4.9999.ebuild
diff --git a/sys-devel/clang-common/clang-common-17.0.0_pre20230325.ebuild b/sys-devel/clang-common/clang-common-17.0.0_pre20230325.ebuild
deleted file mode 100644
index 5b4a6647f3ca..000000000000
--- a/sys-devel/clang-common/clang-common-17.0.0_pre20230325.ebuild
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-IUSE="
- default-compiler-rt default-libcxx default-lld llvm-libunwind
- hardened stricter
-"
-
-PDEPEND="
- sys-devel/clang:*
- default-compiler-rt? (
- sys-devel/clang-runtime[compiler-rt]
- llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
- !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
- )
- !default-compiler-rt? ( sys-devel/gcc )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- !default-libcxx? ( sys-devel/gcc )
- default-lld? ( sys-devel/lld )
- !default-lld? ( sys-devel/binutils )
-"
-IDEPEND="
- !default-compiler-rt? ( sys-devel/gcc-config )
- !default-libcxx? ( sys-devel/gcc-config )
-"
-
-LLVM_COMPONENTS=( clang/utils )
-llvm.org_set_globals
-
-pkg_pretend() {
- [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
-
- local flag missing_flags=()
- for flag in default-{compiler-rt,libcxx,lld}; do
- if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
- missing_flags+=( "${flag}" )
- fi
- done
-
- if [[ ${missing_flags[@]} ]]; then
- eerror "It seems that you have the following flags set on sys-devel/clang:"
- eerror
- eerror " ${missing_flags[*]}"
- eerror
- eerror "The default runtimes are now set via flags on sys-devel/clang-common."
- eerror "The build is being aborted to prevent breakage. Please either set"
- eerror "the respective flags on this ebuild, e.g.:"
- eerror
- eerror " sys-devel/clang-common ${missing_flags[*]}"
- eerror
- eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
- die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
- fi
-}
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-
- insinto /etc/clang
- newins - gentoo-runtimes.cfg <<-EOF
- # This file is initially generated by sys-devel/clang-runtime.
- # It is used to control the default runtimes using by clang.
-
- --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
- --unwindlib=$(usex default-compiler-rt libunwind libgcc)
- --stdlib=$(usex default-libcxx libc++ libstdc++)
- -fuse-ld=$(usex default-lld lld bfd)
- EOF
-
- newins - gentoo-gcc-install.cfg <<-EOF
- # This file is maintained by gcc-config.
- # It is used to specify the selected GCC installation.
- EOF
-
- newins - gentoo-common.cfg <<-EOF
- # This file contains flags common to clang, clang++ and clang-cpp.
- @gentoo-runtimes.cfg
- @gentoo-gcc-install.cfg
- @gentoo-hardened.cfg
- 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-common/clang-common-17.0.0_pre20230414.ebuild b/sys-devel/clang-common/clang-common-17.0.0_pre20230414.ebuild
deleted file mode 100644
index 5b4a6647f3ca..000000000000
--- a/sys-devel/clang-common/clang-common-17.0.0_pre20230414.ebuild
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-IUSE="
- default-compiler-rt default-libcxx default-lld llvm-libunwind
- hardened stricter
-"
-
-PDEPEND="
- sys-devel/clang:*
- default-compiler-rt? (
- sys-devel/clang-runtime[compiler-rt]
- llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
- !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
- )
- !default-compiler-rt? ( sys-devel/gcc )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- !default-libcxx? ( sys-devel/gcc )
- default-lld? ( sys-devel/lld )
- !default-lld? ( sys-devel/binutils )
-"
-IDEPEND="
- !default-compiler-rt? ( sys-devel/gcc-config )
- !default-libcxx? ( sys-devel/gcc-config )
-"
-
-LLVM_COMPONENTS=( clang/utils )
-llvm.org_set_globals
-
-pkg_pretend() {
- [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
-
- local flag missing_flags=()
- for flag in default-{compiler-rt,libcxx,lld}; do
- if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
- missing_flags+=( "${flag}" )
- fi
- done
-
- if [[ ${missing_flags[@]} ]]; then
- eerror "It seems that you have the following flags set on sys-devel/clang:"
- eerror
- eerror " ${missing_flags[*]}"
- eerror
- eerror "The default runtimes are now set via flags on sys-devel/clang-common."
- eerror "The build is being aborted to prevent breakage. Please either set"
- eerror "the respective flags on this ebuild, e.g.:"
- eerror
- eerror " sys-devel/clang-common ${missing_flags[*]}"
- eerror
- eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
- die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
- fi
-}
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-
- insinto /etc/clang
- newins - gentoo-runtimes.cfg <<-EOF
- # This file is initially generated by sys-devel/clang-runtime.
- # It is used to control the default runtimes using by clang.
-
- --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
- --unwindlib=$(usex default-compiler-rt libunwind libgcc)
- --stdlib=$(usex default-libcxx libc++ libstdc++)
- -fuse-ld=$(usex default-lld lld bfd)
- EOF
-
- newins - gentoo-gcc-install.cfg <<-EOF
- # This file is maintained by gcc-config.
- # It is used to specify the selected GCC installation.
- EOF
-
- newins - gentoo-common.cfg <<-EOF
- # This file contains flags common to clang, clang++ and clang-cpp.
- @gentoo-runtimes.cfg
- @gentoo-gcc-install.cfg
- @gentoo-hardened.cfg
- 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-common/clang-common-17.0.0_pre20230421.ebuild b/sys-devel/clang-common/clang-common-17.0.0_pre20230421.ebuild
deleted file mode 100644
index 5b4a6647f3ca..000000000000
--- a/sys-devel/clang-common/clang-common-17.0.0_pre20230421.ebuild
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit bash-completion-r1 llvm.org
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-IUSE="
- default-compiler-rt default-libcxx default-lld llvm-libunwind
- hardened stricter
-"
-
-PDEPEND="
- sys-devel/clang:*
- default-compiler-rt? (
- sys-devel/clang-runtime[compiler-rt]
- llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] )
- !llvm-libunwind? ( sys-libs/libunwind[static-libs] )
- )
- !default-compiler-rt? ( sys-devel/gcc )
- default-libcxx? ( >=sys-libs/libcxx-${PV} )
- !default-libcxx? ( sys-devel/gcc )
- default-lld? ( sys-devel/lld )
- !default-lld? ( sys-devel/binutils )
-"
-IDEPEND="
- !default-compiler-rt? ( sys-devel/gcc-config )
- !default-libcxx? ( sys-devel/gcc-config )
-"
-
-LLVM_COMPONENTS=( clang/utils )
-llvm.org_set_globals
-
-pkg_pretend() {
- [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
-
- local flag missing_flags=()
- for flag in default-{compiler-rt,libcxx,lld}; do
- if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
- missing_flags+=( "${flag}" )
- fi
- done
-
- if [[ ${missing_flags[@]} ]]; then
- eerror "It seems that you have the following flags set on sys-devel/clang:"
- eerror
- eerror " ${missing_flags[*]}"
- eerror
- eerror "The default runtimes are now set via flags on sys-devel/clang-common."
- eerror "The build is being aborted to prevent breakage. Please either set"
- eerror "the respective flags on this ebuild, e.g.:"
- eerror
- eerror " sys-devel/clang-common ${missing_flags[*]}"
- eerror
- eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
- die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
- fi
-}
-
-src_install() {
- newbashcomp bash-autocomplete.sh clang
-
- insinto /etc/clang
- newins - gentoo-runtimes.cfg <<-EOF
- # This file is initially generated by sys-devel/clang-runtime.
- # It is used to control the default runtimes using by clang.
-
- --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
- --unwindlib=$(usex default-compiler-rt libunwind libgcc)
- --stdlib=$(usex default-libcxx libc++ libstdc++)
- -fuse-ld=$(usex default-lld lld bfd)
- EOF
-
- newins - gentoo-gcc-install.cfg <<-EOF
- # This file is maintained by gcc-config.
- # It is used to specify the selected GCC installation.
- EOF
-
- newins - gentoo-common.cfg <<-EOF
- # This file contains flags common to clang, clang++ and clang-cpp.
- @gentoo-runtimes.cfg
- @gentoo-gcc-install.cfg
- @gentoo-hardened.cfg
- 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
-}