summaryrefslogtreecommitdiff
path: root/sys-devel/clang-common
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-20 18:37:48 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-20 18:37:48 +0000
commita075e288474a3a53905a044068223546c5360298 (patch)
tree1c098c5d1bc3bc29ed1fd6df8a9a6d700df3f946 /sys-devel/clang-common
parentbf091a83ac5cdd060495df0aef0aeab9066672a1 (diff)
gentoo auto-resync : 20:03:2023 - 18:37:48
Diffstat (limited to 'sys-devel/clang-common')
-rw-r--r--sys-devel/clang-common/Manifest8
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0_rc3-r2.ebuild177
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0_rc4-r1.ebuild177
-rw-r--r--sys-devel/clang-common/clang-common-17.0.0_pre20230304-r1.ebuild177
4 files changed, 0 insertions, 539 deletions
diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest
index afc43c6fd02e..1622ed24b04a 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -4,19 +4,11 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
DIST llvm-project-16.0.0.src.tar.xz 117933476 BLAKE2B fa09cd8f647ce0daf5a7eae9ac03b99594a9b3193b12065f43f9a6731875243f2f5b354136bcadcb31622b246054e94f880eec3dab0bcd6ae89973fa9dca845c SHA512 3f040abc1b03205693824aeff2ee6efb0cff25fe04bd5265141c093f294655a1f3fcda73cab9c57cbed7523c8f186a7e2484afce0792c55e90e3fb80450fabb7
DIST llvm-project-16.0.0.src.tar.xz.sig 566 BLAKE2B daba130aa5662fbf7cc2e7aa8fa6b64f9cb355a72330f7a01a21b86389c6f2f85ae93de19ff08ba3f1cfe2834d9a2b7648bdf659caba3afdb2a0d13984774a54 SHA512 38e2449dce20cfbf813d1a9a68b36807722ac8ebb5ee07360fa215b2de8534d2329d3e41cfc3ed33e59e36714b94a6683a6d8077950bcf0037973492e0820fb3
-DIST llvm-project-16.0.0rc3.src.tar.xz 117914548 BLAKE2B 18ffa35eb73c7cc4626d7b6b7b30aade7171ee2e17fb8d72e79a67185e809f611fefa4cfef17e5cd16822a5a70de2222534dc9f146fc53987eb49ff6a9d98c18 SHA512 d14e5e5ec984a0dc0292a2d27440398b3e32f120c1579517054dcb1a05dbc4ac5f1c6d078a3d6ef8597a71af6f22863868680a972a571839dcd573418b4a4697
-DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f71412bf6236a355462430330fc0da1d624fb8dfbc98bfc982d367baee74d5b4964a9e82e7a4a6ea84bdcff3996d246932f516cced1a SHA512 61adc4dc3eb5a4c11a7f96f9267ff37895e5845a08d48a609a03a2696c1b6bca5af5861a6f28de936c48e6d621bf282170589187f2cb593a912b9078300cf47c
-DIST llvm-project-16.0.0rc4.src.tar.xz 117930024 BLAKE2B 55cf032ad3ba52d2af0942fe1c627319ae95b466122d04b24a917c33e29139fae546d92c375715600190c02426b798803ead0ab7a97d86960cf98fca80e8815c SHA512 8d628205c5b93fe6683b67b97b5c7f98bae945bd87cccebcdac00ddd4362108bd171f077a5196242be0fb909c795592b34bfa1c96c50a744fb68f287fd9781cc
-DIST llvm-project-16.0.0rc4.src.tar.xz.sig 566 BLAKE2B bfcf39070f32e16cfeae699d95d06f184b1331c3af403340c31cc5a973a3bb1faec0b6342445176cebed5819ddf68e4abfdaa8542ec425b1c822fc8c03c03349 SHA512 2af72e3d771e2361873007a944dcccfe81fbdbc3025a2101e03cbc15f1a173d39ceb94c4ae8966b1d7564bf004ee9a5ffa032e2334c0cf7154aea1090d04b00f
-DIST llvm-project-2708869801ae00f4681f6b2d9d69b25b3fce26b6.tar.gz 180523586 BLAKE2B cf918d1e23f922d201a44531c9765b7d8ec2b3b8499ea7954845abcd5fa2687e85b3a34819a583c4f4a6d6e1baa49dbac0b4450cd6b9b322b0f13c88cd7da93c SHA512 18cb00e93d819993a925ae0467d382bc952d82c1eb92dbbb5bb3cdf87043269948670713734ddc3ea4ec50544e54dd11b6747496f7eaa02479374ab9ad075aa5
DIST llvm-project-4bf004e07e2b9d6e04e3f33e1b02628c679de664.tar.gz 180304467 BLAKE2B 6750855453b575eb8fcc861d5b24b144497bba62df9b9292ac586cf340e04b2b58290fe9df6d89142f29b56aa37ddeb3bd11cc3337e4dc985a4487954d1e2ffa SHA512 d8a87064ba0f92967df019e9345222b87cda81852a9599902cedc4a49ec7d9e2175c972b7fa6d19920489c1d309822f9c31c23bdce0376a8d40c71d57bcd5068
EBUILD clang-common-14.0.6.ebuild 541 BLAKE2B 87b158e874cf600e23591a8095e0edb4d30d4482600ef8fe38984e9ba9559e6e2226107cd482f355d950392a6a452e1a8ae79d297d5afc3951a7f1c8f6227b5f SHA512 1bd0481468c278f131ec9f87243927b60a59752f4229450559bf8016e9599155a52593810fcdc1cf0aecd4aa1529e8df300d95123a53de18eb326152caafbbef
EBUILD clang-common-15.0.7-r4.ebuild 5034 BLAKE2B 1159de8d27d4fbd771229bc298823e44cef20872d96832f5e49ba564fc321bfbb0e366e6ac9866ba4e537cb0baa14c5dd63931daf58c4eb9b791bdde412e093d SHA512 24431cb1fc31ebb43f3749d0f780f08d4acea701105817d21413006de48bf9d87293406dcf05d0bb3ac092b8739d5c773e46815013f497c544ddda1e1ae6cdde
EBUILD clang-common-16.0.0.9999.ebuild 5011 BLAKE2B c39389ad4d45449ea239e1c0b8c64c9be098f0a6dd072b2ce85798b7cdbd5e63dc34659e3c792698b44e7e231dc5f19942bfdd0388533e1cbd32d99d704a6f3d SHA512 7b8556150b56f1f59a655ec1599c442be0e5f6c1a1d434243d9c2f422a542fb6e22e11ec6a9983ba0440eb4f1ebec70038e435d3b27da09284e2d150c658d175
EBUILD clang-common-16.0.0.ebuild 5102 BLAKE2B cf6db25d4e3597ff0ccd039604c7c6a4c5ce7892c7ed2e2cf8031c0ebf7a039d8c30483dd152f71e0d89a85d6f1a0e807f044c4ab53709f913a1a361fdf8f49c SHA512 a0ed53847b12ead06552314ba7b69695ec93231b07a0c7cb835bad9c7ca8dfc5785c180ca5e00e89cc960c56bc770029bec6c873a8c0015becca5aaec19c01ad
-EBUILD clang-common-16.0.0_rc3-r2.ebuild 5017 BLAKE2B 861c1fa59ade1bd9dfe9bdb391c92d528f8426e958e30242299474462a1ed86d299419c6ca7b85a2e377b2a17854a1de74b45a82b5c8117ff2453ea69aa2c229 SHA512 dc37a47244d7b47b415fc1eb0d13d5c1b32be1a5edf4bc3c2b3c90ecd53946a971a4bb850781b1f964a7bedba407ead9560730c1fcb63880841a443f061052de
-EBUILD clang-common-16.0.0_rc4-r1.ebuild 5017 BLAKE2B 861c1fa59ade1bd9dfe9bdb391c92d528f8426e958e30242299474462a1ed86d299419c6ca7b85a2e377b2a17854a1de74b45a82b5c8117ff2453ea69aa2c229 SHA512 dc37a47244d7b47b415fc1eb0d13d5c1b32be1a5edf4bc3c2b3c90ecd53946a971a4bb850781b1f964a7bedba407ead9560730c1fcb63880841a443f061052de
EBUILD clang-common-17.0.0.9999.ebuild 5011 BLAKE2B c39389ad4d45449ea239e1c0b8c64c9be098f0a6dd072b2ce85798b7cdbd5e63dc34659e3c792698b44e7e231dc5f19942bfdd0388533e1cbd32d99d704a6f3d SHA512 7b8556150b56f1f59a655ec1599c442be0e5f6c1a1d434243d9c2f422a542fb6e22e11ec6a9983ba0440eb4f1ebec70038e435d3b27da09284e2d150c658d175
-EBUILD clang-common-17.0.0_pre20230304-r1.ebuild 5011 BLAKE2B c39389ad4d45449ea239e1c0b8c64c9be098f0a6dd072b2ce85798b7cdbd5e63dc34659e3c792698b44e7e231dc5f19942bfdd0388533e1cbd32d99d704a6f3d SHA512 7b8556150b56f1f59a655ec1599c442be0e5f6c1a1d434243d9c2f422a542fb6e22e11ec6a9983ba0440eb4f1ebec70038e435d3b27da09284e2d150c658d175
EBUILD clang-common-17.0.0_pre20230314.ebuild 5011 BLAKE2B c39389ad4d45449ea239e1c0b8c64c9be098f0a6dd072b2ce85798b7cdbd5e63dc34659e3c792698b44e7e231dc5f19942bfdd0388533e1cbd32d99d704a6f3d SHA512 7b8556150b56f1f59a655ec1599c442be0e5f6c1a1d434243d9c2f422a542fb6e22e11ec6a9983ba0440eb4f1ebec70038e435d3b27da09284e2d150c658d175
MISC metadata.xml 735 BLAKE2B 12ea133df3d7eb9367a65e572ef91893e654d5b77caa27c66e4b5b41ba90ebc5e619eb78dfff2a67183d2c1cbfcf35fa903b2bb75604ce153d5cedfce5346e3c SHA512 8ed6b12d4f2aa1985897a8d81ce898dbc0d14ac222f3d0f259cbe80fbb8b2349dff7677627daeaf39a422f290200da4fac6348abc81c9e35da0ca73a11cfdd83
diff --git a/sys-devel/clang-common/clang-common-16.0.0_rc3-r2.ebuild b/sys-devel/clang-common/clang-common-16.0.0_rc3-r2.ebuild
deleted file mode 100644
index 1f768ea302a9..000000000000
--- a/sys-devel/clang-common/clang-common-16.0.0_rc3-r2.ebuild
+++ /dev/null
@@ -1,177 +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="~loong"
-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
- #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.0_rc4-r1.ebuild b/sys-devel/clang-common/clang-common-16.0.0_rc4-r1.ebuild
deleted file mode 100644
index 1f768ea302a9..000000000000
--- a/sys-devel/clang-common/clang-common-16.0.0_rc4-r1.ebuild
+++ /dev/null
@@ -1,177 +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="~loong"
-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
- #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_pre20230304-r1.ebuild b/sys-devel/clang-common/clang-common-17.0.0_pre20230304-r1.ebuild
deleted file mode 100644
index 808c1e1a0ae1..000000000000
--- a/sys-devel/clang-common/clang-common-17.0.0_pre20230304-r1.ebuild
+++ /dev/null
@@ -1,177 +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
- #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
-}