commit:     431596bde474581b4ba489a95b5719a18c4f50c7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 11 09:23:54 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov 11 10:36:27 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=431596bd

sys-devel/clang-common: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-devel/clang-common/Manifest                    |   5 -
 sys-devel/clang-common/clang-common-17.0.3.ebuild  | 228 ---------------------
 .../clang-common-18.0.0_pre20231013.ebuild         | 227 --------------------
 .../clang-common-18.0.0_pre20231019.ebuild         | 227 --------------------
 .../clang-common-18.0.0_pre20231025.ebuild         | 227 --------------------
 5 files changed, 914 deletions(-)

diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest
index 8a547e85b6d5..db6bc21c0cb1 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -4,11 +4,6 @@ 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.6.src.tar.xz 118013488 BLAKE2B 
95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d
 SHA512 
89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
 DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 
2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a
 SHA512 
ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
-DIST llvm-project-17.0.3.src.tar.xz 127843636 BLAKE2B 
5331d9b545faab282a4caec9ee688d0f1e0615a56a26aa24d8f6fbbae10258e132d94634dab2f7bd69ada06bb28dc899730b9cd774a1086d7c03d5706de6d997
 SHA512 
44f37dea494a66a83c252e28d7d0517c3b2eed5b196565432dc663c7914bd66d665c8d13479e2776a14cac1905faf6972f986176722c053b58528570a6e68316
-DIST llvm-project-17.0.3.src.tar.xz.sig 438 BLAKE2B 
045e7ca82c8d9b3f182e4fa331ec841b24777ac1888f10de435a389ae3a88172e0559a3fca0c2d37cc874464411ae50d7bc0d0829455149a8de8b953ef6c98c7
 SHA512 
95f9e6729074cfd71b0ffb21e423cd0fd87763268c24e0513f7afd6a85d08061658c44c03ea3ea3b6e3cc7051676d44c41a791e6905c8abb456d48a3762fc152
 DIST llvm-project-17.0.4.src.tar.xz 127828636 BLAKE2B 
bd91ef7f07e085b935500b056f75ab792d13e7f33825df36e85e7988f313a4f3fbb1b4c854615a5e437a97ad552838eb1be5098194f281ba1279330156dd6a38
 SHA512 
6703eede8013e7e5733fbd7b527757166d5698f52e239522fb320717430c88696309038501d22fe384b016b330bd92126a2c0ba88b0258c3f092801e3800b7a3
 DIST llvm-project-17.0.4.src.tar.xz.sig 438 BLAKE2B 
e417c14d0af8c2f13eccec7a42d0e4d5a6a834d7a3d31061b9f56f7e880cd982c2b1e84322bcf8f6a3d3167519c31f16c7acb8fc725ab5b453f467a196ca2688
 SHA512 
4e79bb1d2b41289c092d4ec2759d7cfd4f12df8d107f9510aa9e2354691e7f878e3929b2b50e29fd6c65bd5a3aa13baf6b791847c1cd99817adbf59700cf2bdd
-DIST llvm-project-5d35273a32d239b7407338e13ed71b59174d6536.tar.gz 198787569 
BLAKE2B 
7f4f1eb490028e18826a6ebade649a682e433252ceab1f3dcd9e50c34f24e7ef108c3325ec209a4d4fa1ded8e09ebda4980cb9d8ddce8a0d517923d6c38b8f4a
 SHA512 
4d263561fb12cc07a5e8f7ed2f8f22a3645aa959cf963a6a735a9bb93cfc2a51bf7e4d36b54e8425725029cfcfd868dfcc53af95d26d84be72be124d8c564271
 DIST llvm-project-83888a5404d46667647fe36d6fa510d075ed57ea.tar.gz 200867834 
BLAKE2B 
20f5afa071089852abfdcc316e5db77681afe0fdb189a515d7724a0abaf1c545f37ba4b946414c7b8afca62636107bd4e1c7c99d8ba6a514bb413b13f5f634b0
 SHA512 
4cd7680a227388382076d5735a97a379546f5bdde33272a5a3d317d98c2847e34917dd38a3cfb3f1f677f6d9a9b2163b29f89dd9c4b92506f5be34a3072e0509
-DIST llvm-project-a7700985577694d6cc2498833f27b4fb5eeaf252.tar.gz 199221825 
BLAKE2B 
047ab7c0e80e1dbbe61ebd9aaae17166665a33b5cb50beec6da2cc19bec9a16777b82c157e74f88b0678d843b200f292d696a964211a8e532f128491dc39a6e4
 SHA512 
b747210d53402ae01238fa82195fa5c1c8d1c832d976bcc996ef657ac54dacb2fb19521c6f080151e6b1af8a49ddfe58979afaa00b3f1f72dc664ac79b99a8bb
-DIST llvm-project-e6e90840708099425b7b69dd053634ff25d4907f.tar.gz 199022115 
BLAKE2B 
442aff8f561f7c5834a36b7eb217fd2b984e58af9cbcf3e6495305f386a7651e73345bbe65133af4bffaf8cb209cfb9a94fb28756ffaaaae8f7d28ec253ccb78
 SHA512 
fa9c180f36f4c782208ae7baff1683ee466c70f7d021b21b9cb8a8fd0f2005c0b47889d8bb37f5fb984f6b2ec26c74df60490c7b51ac3d080830e6844e33e300

diff --git a/sys-devel/clang-common/clang-common-17.0.3.ebuild 
b/sys-devel/clang-common/clang-common-17.0.3.ebuild
deleted file mode 100644
index 696ae8ee4996..000000000000
--- a/sys-devel/clang-common/clang-common-17.0.3.ebuild
+++ /dev/null
@@ -1,228 +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 multilib
-
-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
-"
-
-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}[static-libs] )
-       !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
-}
-
-doclang_cfg() {
-       local triple="${1}"
-
-       local tool
-       for tool in ${triple}-clang{,++}; do
-               newins - "${tool}.cfg" <<-EOF
-                       # This configuration file is used by ${tool} driver.
-                       @gentoo-common.cfg
-                       @gentoo-common-ld.cfg
-               EOF
-       done
-
-       newins - "${triple}-clang-cpp.cfg" <<-EOF
-               # This configuration file is used by the ${triple}-clang-cpp 
driver.
-               @gentoo-common.cfg
-       EOF
-
-       # Install symlinks for triples with other vendor strings since some
-       # programs insist on mangling the triple.
-       local vendor
-       for vendor in gentoo pc unknown; do
-               local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}"
-               for tool in clang{,++,-cpp}; do
-                       if [[ ! -f 
"${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then
-                               dosym "${triple}-${tool}.cfg" 
"/etc/clang/${vendor_triple}-${tool}.cfg"
-                       fi
-               done
-       done
-}
-
-src_install() {
-       newbashcomp bash-autocomplete.sh clang
-
-       insinto /etc/clang
-       newins - gentoo-runtimes.cfg <<-EOF
-               # This file is initially generated by sys-devel/clang-runtime.
-               # It is used to control the default runtimes using by clang.
-
-               --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
-               --unwindlib=$(usex default-compiler-rt libunwind libgcc)
-               --stdlib=$(usex default-libcxx libc++ libstdc++)
-               -fuse-ld=$(usex default-lld lld bfd)
-       EOF
-
-       newins - gentoo-gcc-install.cfg <<-EOF
-               # This file is maintained by gcc-config.
-               # It is used to specify the selected GCC installation.
-       EOF
-
-       newins - gentoo-common.cfg <<-EOF
-               # This file contains flags common to clang, clang++ and 
clang-cpp.
-               @gentoo-runtimes.cfg
-               @gentoo-gcc-install.cfg
-               @gentoo-hardened.cfg
-               # bug #870001
-               -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
-       EOF
-
-       # clang-cpp does not like link args being passed to it when directly
-       # invoked, so use a separate configuration file.
-       newins - gentoo-common-ld.cfg <<-EOF
-               # This file contains flags common to clang and clang++
-               @gentoo-hardened-ld.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
-
-       newins - gentoo-hardened-ld.cfg <<-EOF
-               # Some of these options are added unconditionally, regardless of
-               # USE=hardened, for parity with sys-devel/gcc.
-               -Wl,-z,relro
-       EOF
-
-       dodir /usr/include/gentoo
-
-       cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
-       /* __has_include is an extension, but it's fine, because this is only
-       for Clang anyway. */
-       #if defined __has_include && __has_include (<stdc-predef.h>) && 
!defined(__GLIBC__)
-       # include <stdc-predef.h>
-       #endif
-       EOF
-
-       local fortify_level=$(usex hardened 3 2)
-       # We have to do this because glibc's headers warn if F_S is set
-       # without optimization and that would at the very least be very noisy
-       # during builds and at worst trigger many -Werror builds.
-       cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
-       #ifdef __clang__
-       # pragma clang system_header
-       #endif
-       #ifndef _FORTIFY_SOURCE
-       # if defined(__has_feature)
-       #  define __GENTOO_HAS_FEATURE(x) __has_feature(x)
-       # else
-       #  define __GENTOO_HAS_FEATURE(x) 0
-       # endif
-       #
-       # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
-       #  define __GENTOO_NOT_FREESTANDING 1
-       # else
-       #  define __GENTOO_NOT_FREESTANDING 0
-       # endif
-       #
-       # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && 
__GENTOO_NOT_FREESTANDING > 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
-       # undef __GENTOO_NOT_FREESTANDING
-       #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
-                       # 
https://libcxx.llvm.org/Hardening.html#using-hardened-mode
-                       -D_LIBCPP_ENABLE_ASSERTIONS=1
-               EOF
-
-               cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die
-                       # Options below are conditional on USE=hardened.
-                       -Wl,-z,now
-               EOF
-       fi
-
-       # We only install config files for supported ABIs because unprefixed 
tools
-       # might be used for crosscompilation where e.g. PIE may not be 
supported.
-       # See bug #912237 and bug #901247.
-       doclang_cfg "${CHOST}"
-
-       # Just ${CHOST} won't do due to bug #912685.
-       local abi
-       for abi in $(get_all_abis); do
-               local abi_chost=$(get_abi_CHOST "${abi}")
-               doclang_cfg "${abi_chost}"
-       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-18.0.0_pre20231013.ebuild 
b/sys-devel/clang-common/clang-common-18.0.0_pre20231013.ebuild
deleted file mode 100644
index b58ed6b486c2..000000000000
--- a/sys-devel/clang-common/clang-common-18.0.0_pre20231013.ebuild
+++ /dev/null
@@ -1,227 +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 multilib
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/";
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-IUSE="
-       default-compiler-rt default-libcxx default-lld llvm-libunwind
-       hardened
-"
-
-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}[static-libs] )
-       !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
-}
-
-doclang_cfg() {
-       local triple="${1}"
-
-       local tool
-       for tool in ${triple}-clang{,++}; do
-               newins - "${tool}.cfg" <<-EOF
-                       # This configuration file is used by ${tool} driver.
-                       @gentoo-common.cfg
-                       @gentoo-common-ld.cfg
-               EOF
-       done
-
-       newins - "${triple}-clang-cpp.cfg" <<-EOF
-               # This configuration file is used by the ${triple}-clang-cpp 
driver.
-               @gentoo-common.cfg
-       EOF
-
-       # Install symlinks for triples with other vendor strings since some
-       # programs insist on mangling the triple.
-       local vendor
-       for vendor in gentoo pc unknown; do
-               local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}"
-               for tool in clang{,++,-cpp}; do
-                       if [[ ! -f 
"${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then
-                               dosym "${triple}-${tool}.cfg" 
"/etc/clang/${vendor_triple}-${tool}.cfg"
-                       fi
-               done
-       done
-}
-
-src_install() {
-       newbashcomp bash-autocomplete.sh clang
-
-       insinto /etc/clang
-       newins - gentoo-runtimes.cfg <<-EOF
-               # This file is initially generated by sys-devel/clang-runtime.
-               # It is used to control the default runtimes using by clang.
-
-               --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
-               --unwindlib=$(usex default-compiler-rt libunwind libgcc)
-               --stdlib=$(usex default-libcxx libc++ libstdc++)
-               -fuse-ld=$(usex default-lld lld bfd)
-       EOF
-
-       newins - gentoo-gcc-install.cfg <<-EOF
-               # This file is maintained by gcc-config.
-               # It is used to specify the selected GCC installation.
-       EOF
-
-       newins - gentoo-common.cfg <<-EOF
-               # This file contains flags common to clang, clang++ and 
clang-cpp.
-               @gentoo-runtimes.cfg
-               @gentoo-gcc-install.cfg
-               @gentoo-hardened.cfg
-               # bug #870001
-               -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
-       EOF
-
-       # clang-cpp does not like link args being passed to it when directly
-       # invoked, so use a separate configuration file.
-       newins - gentoo-common-ld.cfg <<-EOF
-               # This file contains flags common to clang and clang++
-               @gentoo-hardened-ld.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
-
-       newins - gentoo-hardened-ld.cfg <<-EOF
-               # Some of these options are added unconditionally, regardless of
-               # USE=hardened, for parity with sys-devel/gcc.
-               -Wl,-z,relro
-       EOF
-
-       dodir /usr/include/gentoo
-
-       cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
-       /* __has_include is an extension, but it's fine, because this is only
-       for Clang anyway. */
-       #if defined __has_include && __has_include (<stdc-predef.h>) && 
!defined(__GLIBC__)
-       # include <stdc-predef.h>
-       #endif
-       EOF
-
-       local fortify_level=$(usex hardened 3 2)
-       # We have to do this because glibc's headers warn if F_S is set
-       # without optimization and that would at the very least be very noisy
-       # during builds and at worst trigger many -Werror builds.
-       cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
-       #ifdef __clang__
-       # pragma clang system_header
-       #endif
-       #ifndef _FORTIFY_SOURCE
-       # if defined(__has_feature)
-       #  define __GENTOO_HAS_FEATURE(x) __has_feature(x)
-       # else
-       #  define __GENTOO_HAS_FEATURE(x) 0
-       # endif
-       #
-       # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
-       #  define __GENTOO_NOT_FREESTANDING 1
-       # else
-       #  define __GENTOO_NOT_FREESTANDING 0
-       # endif
-       #
-       # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && 
__GENTOO_NOT_FREESTANDING > 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
-       # undef __GENTOO_NOT_FREESTANDING
-       #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
-                       # 
https://libcxx.llvm.org/Hardening.html#using-hardened-mode
-                       -D_LIBCPP_ENABLE_HARDENED_MODE=1
-               EOF
-
-               cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die
-                       # Options below are conditional on USE=hardened.
-                       -Wl,-z,now
-               EOF
-       fi
-
-       # We only install config files for supported ABIs because unprefixed 
tools
-       # might be used for crosscompilation where e.g. PIE may not be 
supported.
-       # See bug #912237 and bug #901247.
-       doclang_cfg "${CHOST}"
-
-       # Just ${CHOST} won't do due to bug #912685.
-       local abi
-       for abi in $(get_all_abis); do
-               local abi_chost=$(get_abi_CHOST "${abi}")
-               doclang_cfg "${abi_chost}"
-       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-18.0.0_pre20231019.ebuild 
b/sys-devel/clang-common/clang-common-18.0.0_pre20231019.ebuild
deleted file mode 100644
index b58ed6b486c2..000000000000
--- a/sys-devel/clang-common/clang-common-18.0.0_pre20231019.ebuild
+++ /dev/null
@@ -1,227 +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 multilib
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/";
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-IUSE="
-       default-compiler-rt default-libcxx default-lld llvm-libunwind
-       hardened
-"
-
-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}[static-libs] )
-       !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
-}
-
-doclang_cfg() {
-       local triple="${1}"
-
-       local tool
-       for tool in ${triple}-clang{,++}; do
-               newins - "${tool}.cfg" <<-EOF
-                       # This configuration file is used by ${tool} driver.
-                       @gentoo-common.cfg
-                       @gentoo-common-ld.cfg
-               EOF
-       done
-
-       newins - "${triple}-clang-cpp.cfg" <<-EOF
-               # This configuration file is used by the ${triple}-clang-cpp 
driver.
-               @gentoo-common.cfg
-       EOF
-
-       # Install symlinks for triples with other vendor strings since some
-       # programs insist on mangling the triple.
-       local vendor
-       for vendor in gentoo pc unknown; do
-               local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}"
-               for tool in clang{,++,-cpp}; do
-                       if [[ ! -f 
"${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then
-                               dosym "${triple}-${tool}.cfg" 
"/etc/clang/${vendor_triple}-${tool}.cfg"
-                       fi
-               done
-       done
-}
-
-src_install() {
-       newbashcomp bash-autocomplete.sh clang
-
-       insinto /etc/clang
-       newins - gentoo-runtimes.cfg <<-EOF
-               # This file is initially generated by sys-devel/clang-runtime.
-               # It is used to control the default runtimes using by clang.
-
-               --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
-               --unwindlib=$(usex default-compiler-rt libunwind libgcc)
-               --stdlib=$(usex default-libcxx libc++ libstdc++)
-               -fuse-ld=$(usex default-lld lld bfd)
-       EOF
-
-       newins - gentoo-gcc-install.cfg <<-EOF
-               # This file is maintained by gcc-config.
-               # It is used to specify the selected GCC installation.
-       EOF
-
-       newins - gentoo-common.cfg <<-EOF
-               # This file contains flags common to clang, clang++ and 
clang-cpp.
-               @gentoo-runtimes.cfg
-               @gentoo-gcc-install.cfg
-               @gentoo-hardened.cfg
-               # bug #870001
-               -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
-       EOF
-
-       # clang-cpp does not like link args being passed to it when directly
-       # invoked, so use a separate configuration file.
-       newins - gentoo-common-ld.cfg <<-EOF
-               # This file contains flags common to clang and clang++
-               @gentoo-hardened-ld.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
-
-       newins - gentoo-hardened-ld.cfg <<-EOF
-               # Some of these options are added unconditionally, regardless of
-               # USE=hardened, for parity with sys-devel/gcc.
-               -Wl,-z,relro
-       EOF
-
-       dodir /usr/include/gentoo
-
-       cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
-       /* __has_include is an extension, but it's fine, because this is only
-       for Clang anyway. */
-       #if defined __has_include && __has_include (<stdc-predef.h>) && 
!defined(__GLIBC__)
-       # include <stdc-predef.h>
-       #endif
-       EOF
-
-       local fortify_level=$(usex hardened 3 2)
-       # We have to do this because glibc's headers warn if F_S is set
-       # without optimization and that would at the very least be very noisy
-       # during builds and at worst trigger many -Werror builds.
-       cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
-       #ifdef __clang__
-       # pragma clang system_header
-       #endif
-       #ifndef _FORTIFY_SOURCE
-       # if defined(__has_feature)
-       #  define __GENTOO_HAS_FEATURE(x) __has_feature(x)
-       # else
-       #  define __GENTOO_HAS_FEATURE(x) 0
-       # endif
-       #
-       # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
-       #  define __GENTOO_NOT_FREESTANDING 1
-       # else
-       #  define __GENTOO_NOT_FREESTANDING 0
-       # endif
-       #
-       # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && 
__GENTOO_NOT_FREESTANDING > 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
-       # undef __GENTOO_NOT_FREESTANDING
-       #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
-                       # 
https://libcxx.llvm.org/Hardening.html#using-hardened-mode
-                       -D_LIBCPP_ENABLE_HARDENED_MODE=1
-               EOF
-
-               cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die
-                       # Options below are conditional on USE=hardened.
-                       -Wl,-z,now
-               EOF
-       fi
-
-       # We only install config files for supported ABIs because unprefixed 
tools
-       # might be used for crosscompilation where e.g. PIE may not be 
supported.
-       # See bug #912237 and bug #901247.
-       doclang_cfg "${CHOST}"
-
-       # Just ${CHOST} won't do due to bug #912685.
-       local abi
-       for abi in $(get_all_abis); do
-               local abi_chost=$(get_abi_CHOST "${abi}")
-               doclang_cfg "${abi_chost}"
-       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-18.0.0_pre20231025.ebuild 
b/sys-devel/clang-common/clang-common-18.0.0_pre20231025.ebuild
deleted file mode 100644
index b58ed6b486c2..000000000000
--- a/sys-devel/clang-common/clang-common-18.0.0_pre20231025.ebuild
+++ /dev/null
@@ -1,227 +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 multilib
-
-DESCRIPTION="Common files shared between multiple slots of clang"
-HOMEPAGE="https://llvm.org/";
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
-SLOT="0"
-IUSE="
-       default-compiler-rt default-libcxx default-lld llvm-libunwind
-       hardened
-"
-
-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}[static-libs] )
-       !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
-}
-
-doclang_cfg() {
-       local triple="${1}"
-
-       local tool
-       for tool in ${triple}-clang{,++}; do
-               newins - "${tool}.cfg" <<-EOF
-                       # This configuration file is used by ${tool} driver.
-                       @gentoo-common.cfg
-                       @gentoo-common-ld.cfg
-               EOF
-       done
-
-       newins - "${triple}-clang-cpp.cfg" <<-EOF
-               # This configuration file is used by the ${triple}-clang-cpp 
driver.
-               @gentoo-common.cfg
-       EOF
-
-       # Install symlinks for triples with other vendor strings since some
-       # programs insist on mangling the triple.
-       local vendor
-       for vendor in gentoo pc unknown; do
-               local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}"
-               for tool in clang{,++,-cpp}; do
-                       if [[ ! -f 
"${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then
-                               dosym "${triple}-${tool}.cfg" 
"/etc/clang/${vendor_triple}-${tool}.cfg"
-                       fi
-               done
-       done
-}
-
-src_install() {
-       newbashcomp bash-autocomplete.sh clang
-
-       insinto /etc/clang
-       newins - gentoo-runtimes.cfg <<-EOF
-               # This file is initially generated by sys-devel/clang-runtime.
-               # It is used to control the default runtimes using by clang.
-
-               --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
-               --unwindlib=$(usex default-compiler-rt libunwind libgcc)
-               --stdlib=$(usex default-libcxx libc++ libstdc++)
-               -fuse-ld=$(usex default-lld lld bfd)
-       EOF
-
-       newins - gentoo-gcc-install.cfg <<-EOF
-               # This file is maintained by gcc-config.
-               # It is used to specify the selected GCC installation.
-       EOF
-
-       newins - gentoo-common.cfg <<-EOF
-               # This file contains flags common to clang, clang++ and 
clang-cpp.
-               @gentoo-runtimes.cfg
-               @gentoo-gcc-install.cfg
-               @gentoo-hardened.cfg
-               # bug #870001
-               -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h"
-       EOF
-
-       # clang-cpp does not like link args being passed to it when directly
-       # invoked, so use a separate configuration file.
-       newins - gentoo-common-ld.cfg <<-EOF
-               # This file contains flags common to clang and clang++
-               @gentoo-hardened-ld.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
-
-       newins - gentoo-hardened-ld.cfg <<-EOF
-               # Some of these options are added unconditionally, regardless of
-               # USE=hardened, for parity with sys-devel/gcc.
-               -Wl,-z,relro
-       EOF
-
-       dodir /usr/include/gentoo
-
-       cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die
-       /* __has_include is an extension, but it's fine, because this is only
-       for Clang anyway. */
-       #if defined __has_include && __has_include (<stdc-predef.h>) && 
!defined(__GLIBC__)
-       # include <stdc-predef.h>
-       #endif
-       EOF
-
-       local fortify_level=$(usex hardened 3 2)
-       # We have to do this because glibc's headers warn if F_S is set
-       # without optimization and that would at the very least be very noisy
-       # during builds and at worst trigger many -Werror builds.
-       cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die
-       #ifdef __clang__
-       # pragma clang system_header
-       #endif
-       #ifndef _FORTIFY_SOURCE
-       # if defined(__has_feature)
-       #  define __GENTOO_HAS_FEATURE(x) __has_feature(x)
-       # else
-       #  define __GENTOO_HAS_FEATURE(x) 0
-       # endif
-       #
-       # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1
-       #  define __GENTOO_NOT_FREESTANDING 1
-       # else
-       #  define __GENTOO_NOT_FREESTANDING 0
-       # endif
-       #
-       # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && 
__GENTOO_NOT_FREESTANDING > 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
-       # undef __GENTOO_NOT_FREESTANDING
-       #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
-                       # 
https://libcxx.llvm.org/Hardening.html#using-hardened-mode
-                       -D_LIBCPP_ENABLE_HARDENED_MODE=1
-               EOF
-
-               cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die
-                       # Options below are conditional on USE=hardened.
-                       -Wl,-z,now
-               EOF
-       fi
-
-       # We only install config files for supported ABIs because unprefixed 
tools
-       # might be used for crosscompilation where e.g. PIE may not be 
supported.
-       # See bug #912237 and bug #901247.
-       doclang_cfg "${CHOST}"
-
-       # Just ${CHOST} won't do due to bug #912685.
-       local abi
-       for abi in $(get_all_abis); do
-               local abi_chost=$(get_abi_CHOST "${abi}")
-               doclang_cfg "${abi_chost}"
-       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
-}

Reply via email to