From 6c9dc10e04cd513437e046ccca0e51a3d6d4dc7c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 17 May 2024 00:01:35 +0100 Subject: gentoo auto-resync : 17:05:2024 - 00:01:35 --- sys-devel/clang-common/Manifest | 7 - .../clang-common/clang-common-18.1.4-r4.ebuild | 305 --------------------- .../clang-common-19.0.0_pre20240427.ebuild | 304 -------------------- .../clang-common-19.0.0_pre20240504.ebuild | 304 -------------------- 4 files changed, 920 deletions(-) delete mode 100644 sys-devel/clang-common/clang-common-18.1.4-r4.ebuild delete mode 100644 sys-devel/clang-common/clang-common-19.0.0_pre20240427.ebuild delete mode 100644 sys-devel/clang-common/clang-common-19.0.0_pre20240504.ebuild (limited to 'sys-devel/clang-common') diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest index 200b6310bd05..2a51c587c2cb 100644 --- a/sys-devel/clang-common/Manifest +++ b/sys-devel/clang-common/Manifest @@ -4,20 +4,13 @@ DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db3659 DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 -DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29 -DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386 DIST llvm-project-18.1.5.src.tar.xz 132061072 BLAKE2B bfdd987d5992a4d94ae8b14792df3be67a8e8fdf1daef9834cdaa2132df1b7ddb72ba0aabbb34b171a73d0f3b2b0f61e7160f0b278a67fd4850e3f501fd21531 SHA512 9e2f1e251b3754a24a0b39676d78c98692887c05c85cf0bee50fd44d9635290019930d4dabd1ff4ba3c9c1067e7e0e09aa1bbcd3d76687f919a1d44ba85eee20 DIST llvm-project-18.1.5.src.tar.xz.sig 566 BLAKE2B ad935db71ec3b9fc885d696af440764a71fe7cafc5b3ca0b25a2963100d9cb3790392daebcac1341716c95a8da3c6243f5a8667fea1ed18b93fc8baa495414c9 SHA512 3cbca1059d940f3bd7bd72d68f2828039b66304980cc5f43769649e5494fc7d71117bf8aba5cc7f7a2ffca52f60ba30fadf3b28f984fd49ddb14300e30b45237 -DIST llvm-project-338561657685c1831a53563b1bc36ffc7470239e.tar.gz 209715501 BLAKE2B 49152479d4f2cae430e783784d0cfcc129134f5cc0bf12c72701cd15e59cb3e1be2f61385ba9baa93d1d1193e89374ac8877b909650c163b681d1fcd26732cdc SHA512 d34bbe82e85c5b9d493029ad7b46e802f06f7e7a8a48515d0043c58c3251271f8f3e1e11c47eb91bd3db2477f819d33b43ddebb276eb9601c5ad141e463c9682 -DIST llvm-project-76aa042dde6ba9ba57c680950f5818259ee02690.tar.gz 210235525 BLAKE2B fbbb8e70e0a08bde1fa2277746f692399fa15015b69693f5e8d3297abf02dfb7b36c535880f5c6924c870652dd3106936776d57c34b22234a5419f75b3561bb7 SHA512 9107551ceb2b28aa735006144b3344801ea861d7b49eae4881831af507314fb8da2bf5e8a3a407aeebd2eee01fbfad2ca90269d2331fe43cca5c2cc49dd257b7 DIST llvm-project-a7ee81e8279e0bf6e05617a4a638e5f2f8e45022.tar.gz 210384692 BLAKE2B 28b85b08a42c173e1c3bf530483112b1629c7e6684a83a016fbe9f132774f7b864d793581873a6529defeabb4479ad9a3d7c025b781b2fa4952c239b6d567b11 SHA512 1d593818347452f96611a62fa3aa22ce4355a4ee5d5dcfcb54a286a1aa980e9531d5fb6cbee3b0ee5943c6d0f4e2ba2245e13262fe7859e5b114f9c5d5cf1417 EBUILD clang-common-15.0.7-r8.ebuild 5482 BLAKE2B 20e8744166a852b4dbc233f128807e60bb204f14558d2cc1691b1a87777be2775d1a6c82a108945f795b02919bc47bf213b1a85e45f423c49a6009aed0fbbc3b SHA512 bf1f5cdf47c6772266117e9545994dcfb27cfd263a5e7749604106686d8e56b8b45ddab7073d6baf73e966304162f3aad755075c11dbb16bb42b88fa78e6face EBUILD clang-common-16.0.6-r4.ebuild 5726 BLAKE2B de26b88570bf487a2be2a59f4551c8e61b940fb84b0dc3cb5be1884252672782700b657fb63c0b7ac247ec2092b236a550b51273f73ec19fab7db6eeda0ff94e SHA512 9f2778fbb89d578e162b36c7a692219533437d9fbec407422e7aff1b11d942f09c8cf0edb5c5bd37bbf34523b1f947b418f954b632d769f836baa7d2493bc527 EBUILD clang-common-17.0.6-r5.ebuild 9010 BLAKE2B cbb5c5094ca6e99fc9ce1734acf02e2e35b792173f84b71e19b25e687f7a93a6fca31e4461fc580d92c0eadabe1400359bec3938fc0cba2cac9bc28a4b8d66be SHA512 ea66877912d34f11a0b788a0d188caf03a5c06098507e7bbb3fa609f594d7b9397ac8fa21c7b502238e36b1ede7bf32dc173b9a6d74a3be1e5d3f25babac9165 -EBUILD clang-common-18.1.4-r4.ebuild 9134 BLAKE2B ffad8a93bd8838dc8c22880e7cd195d777e960b4a4469ea6a3febb3507b324b582ed3109fc47685a759c9b06c6be98ecb04a56302b30ad723fe14b23989df9c8 SHA512 edddf1740383db3344500eada2484f2f1aa97bd8e3ad1142c23e4df43ee32df0cc21e085601294d4b0d02fd544e8983c1388c259af7e5d950f8fae44a1b093f6 EBUILD clang-common-18.1.5.ebuild 9134 BLAKE2B ffad8a93bd8838dc8c22880e7cd195d777e960b4a4469ea6a3febb3507b324b582ed3109fc47685a759c9b06c6be98ecb04a56302b30ad723fe14b23989df9c8 SHA512 edddf1740383db3344500eada2484f2f1aa97bd8e3ad1142c23e4df43ee32df0cc21e085601294d4b0d02fd544e8983c1388c259af7e5d950f8fae44a1b093f6 EBUILD clang-common-19.0.0.9999.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 -EBUILD clang-common-19.0.0_pre20240427.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 -EBUILD clang-common-19.0.0_pre20240504.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 EBUILD clang-common-19.0.0_pre20240509.ebuild 9018 BLAKE2B 5f055aeaec9b6ebdfbfe9b84aa65dc6de8ffac3003235d3aef66e48b2f0f4daff56f38a574de61f9abb0a12e4728b27f99f726f840528ba279e7334b85d5bee4 SHA512 5463729ed67144428d5a154a91083efa2006e0d449b31f8870650097dd0b1322f4bd5ec7a7b2884ffd906a976ffa310e36dacd3c9dba519c1d5c26b3879cbd85 MISC metadata.xml 1248 BLAKE2B d9c542ec74a08857a87a42927feef909c343b5b672145e471ebc69753a3f93432d2ae93ed2659a67d504e2c5ff4212640e4208b173d96e5a173a1043766b66f8 SHA512 eb6d4be1dfbdf6b70b774d42493f6b3015472d5e4bba9386254f6e4ae92307169fe1ac6f0f613d452a9c21c6d61ed57ab50efb54813146983f4d6809b32ddacb diff --git a/sys-devel/clang-common/clang-common-18.1.4-r4.ebuild b/sys-devel/clang-common/clang-common-18.1.4-r4.ebuild deleted file mode 100644 index b7d4720e0e22..000000000000 --- a/sys-devel/clang-common/clang-common-18.1.4-r4.ebuild +++ /dev/null @@ -1,305 +0,0 @@ -# Copyright 1999-2024 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 ~arm64-macos ~ppc-macos ~x64-macos" -IUSE=" - default-compiler-rt default-libcxx default-lld - bootstrap-prefix cet hardened llvm-libunwind -" - -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-${PV} ) - !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 - if [[ ${triple} == x86_64* ]]; then - cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die - @gentoo-cet.cfg - EOF - fi - done - - if use kernel_Darwin; then - cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die - -lc++abi - EOF - fi - - newins - "${triple}-clang-cpp.cfg" <<-EOF - # This configuration file is used by the ${triple}-clang-cpp driver. - @gentoo-common.cfg - EOF - if [[ ${triple} == x86_64* ]]; then - cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die - @gentoo-cet.cfg - EOF - fi - - # 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 -} - -doclang_cfg() { - local triple="${1}" - - _doclang_cfg ${triple} - - # LLVM may have different arch names in some cases. For example in x86 - # profiles the triple uses i686, but llvm will prefer i386 if invoked - # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will - # be used if invoked through ${CHOST}-clang{,++,-cpp} though. - # - # To make sure the correct triples are installed, - # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp - # and compare with CHOST values in profiles. - - local abi=${triple%%-*} - case ${abi} in - armv4l|armv4t|armv5tel|armv6j|armv7a) - _doclang_cfg ${triple/${abi}/arm} - ;; - i686) - _doclang_cfg ${triple/${abi}/i386} - ;; - sparc) - _doclang_cfg ${triple/${abi}/sparcel} - ;; - sparc64) - _doclang_cfg ${triple/${abi}/sparcv9} - ;; - esac -} - -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. - -Xarch_host -fstack-clash-protection - -Xarch_host -fstack-protector-strong - -fPIE - -include "${EPREFIX}/usr/include/gentoo/fortify.h" - EOF - - newins - gentoo-cet.cfg <<-EOF - -Xarch_host -fcf-protection=$(usex cet full none) - EOF - - if use kernel_Darwin; then - newins - gentoo-hardened-ld.cfg <<-EOF - # There was -Wl,-z,relro here, but it's not supported on Mac - # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job - EOF - else - 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 - -Wl,-z,now - EOF - fi - - 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 () && !defined(__GLIBC__) - # include - #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 - - # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for - # non-hardened? - 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_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE - EOF - - cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die - # Options below are conditional on USE=hardened. - 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. 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 - - if use kernel_Darwin; then - cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die - # Gentoo Prefix on Darwin - -Wl,-search_paths_first - -Wl,-rpath,${EPREFIX}/usr/lib - -L ${EPREFIX}/usr/lib - -isystem ${EPREFIX}/usr/include - -isysroot ${EPREFIX}/MacOSX.sdk - EOF - if use bootstrap-prefix ; then - # bootstrap-prefix is only set during stage2 of bootstrapping - # Prefix, where EPREFIX is set to EPREFIX/tmp. - # Here we need to point it at the future lib dir of the stage3's - # EPREFIX. - cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die - -Wl,-rpath,${EPREFIX}/../usr/lib - EOF - fi - fi -} - -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-19.0.0_pre20240427.ebuild b/sys-devel/clang-common/clang-common-19.0.0_pre20240427.ebuild deleted file mode 100644 index f260391ba4ab..000000000000 --- a/sys-devel/clang-common/clang-common-19.0.0_pre20240427.ebuild +++ /dev/null @@ -1,304 +0,0 @@ -# Copyright 1999-2024 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 - bootstrap-prefix cet hardened llvm-libunwind -" - -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-${PV} ) - !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 - if [[ ${triple} == x86_64* ]]; then - cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die - @gentoo-cet.cfg - EOF - fi - done - - if use kernel_Darwin; then - cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die - -lc++abi - EOF - fi - - newins - "${triple}-clang-cpp.cfg" <<-EOF - # This configuration file is used by the ${triple}-clang-cpp driver. - @gentoo-common.cfg - EOF - if [[ ${triple} == x86_64* ]]; then - cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die - @gentoo-cet.cfg - EOF - fi - - # 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 -} - -doclang_cfg() { - local triple="${1}" - - _doclang_cfg ${triple} - - # LLVM may have different arch names in some cases. For example in x86 - # profiles the triple uses i686, but llvm will prefer i386 if invoked - # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will - # be used if invoked through ${CHOST}-clang{,++,-cpp} though. - # - # To make sure the correct triples are installed, - # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp - # and compare with CHOST values in profiles. - - local abi=${triple%%-*} - case ${abi} in - armv4l|armv4t|armv5tel|armv6j|armv7a) - _doclang_cfg ${triple/${abi}/arm} - ;; - i686) - _doclang_cfg ${triple/${abi}/i386} - ;; - sparc) - _doclang_cfg ${triple/${abi}/sparcel} - ;; - sparc64) - _doclang_cfg ${triple/${abi}/sparcv9} - ;; - esac -} - -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. - -Xarch_host -fstack-clash-protection - -Xarch_host -fstack-protector-strong - -fPIE - -include "${EPREFIX}/usr/include/gentoo/fortify.h" - EOF - - newins - gentoo-cet.cfg <<-EOF - -Xarch_host -fcf-protection=$(usex cet full none) - EOF - - if use kernel_Darwin; then - newins - gentoo-hardened-ld.cfg <<-EOF - # There was -Wl,-z,relro here, but it's not supported on Mac - # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job - EOF - else - 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 - -Wl,-z,now - EOF - fi - - 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 () && !defined(__GLIBC__) - # include - #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 - - # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for - # non-hardened? - 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_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE - EOF - - cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die - # Options below are conditional on USE=hardened. - 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. 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 - - if use kernel_Darwin; then - cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die - # Gentoo Prefix on Darwin - -Wl,-search_paths_first - -Wl,-rpath,${EPREFIX}/usr/lib - -L ${EPREFIX}/usr/lib - -isystem ${EPREFIX}/usr/include - -isysroot ${EPREFIX}/MacOSX.sdk - EOF - if use bootstrap-prefix ; then - # bootstrap-prefix is only set during stage2 of bootstrapping - # Prefix, where EPREFIX is set to EPREFIX/tmp. - # Here we need to point it at the future lib dir of the stage3's - # EPREFIX. - cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die - -Wl,-rpath,${EPREFIX}/../usr/lib - EOF - fi - fi -} - -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-19.0.0_pre20240504.ebuild b/sys-devel/clang-common/clang-common-19.0.0_pre20240504.ebuild deleted file mode 100644 index f260391ba4ab..000000000000 --- a/sys-devel/clang-common/clang-common-19.0.0_pre20240504.ebuild +++ /dev/null @@ -1,304 +0,0 @@ -# Copyright 1999-2024 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 - bootstrap-prefix cet hardened llvm-libunwind -" - -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-${PV} ) - !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 - if [[ ${triple} == x86_64* ]]; then - cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die - @gentoo-cet.cfg - EOF - fi - done - - if use kernel_Darwin; then - cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die - -lc++abi - EOF - fi - - newins - "${triple}-clang-cpp.cfg" <<-EOF - # This configuration file is used by the ${triple}-clang-cpp driver. - @gentoo-common.cfg - EOF - if [[ ${triple} == x86_64* ]]; then - cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die - @gentoo-cet.cfg - EOF - fi - - # 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 -} - -doclang_cfg() { - local triple="${1}" - - _doclang_cfg ${triple} - - # LLVM may have different arch names in some cases. For example in x86 - # profiles the triple uses i686, but llvm will prefer i386 if invoked - # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will - # be used if invoked through ${CHOST}-clang{,++,-cpp} though. - # - # To make sure the correct triples are installed, - # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp - # and compare with CHOST values in profiles. - - local abi=${triple%%-*} - case ${abi} in - armv4l|armv4t|armv5tel|armv6j|armv7a) - _doclang_cfg ${triple/${abi}/arm} - ;; - i686) - _doclang_cfg ${triple/${abi}/i386} - ;; - sparc) - _doclang_cfg ${triple/${abi}/sparcel} - ;; - sparc64) - _doclang_cfg ${triple/${abi}/sparcv9} - ;; - esac -} - -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. - -Xarch_host -fstack-clash-protection - -Xarch_host -fstack-protector-strong - -fPIE - -include "${EPREFIX}/usr/include/gentoo/fortify.h" - EOF - - newins - gentoo-cet.cfg <<-EOF - -Xarch_host -fcf-protection=$(usex cet full none) - EOF - - if use kernel_Darwin; then - newins - gentoo-hardened-ld.cfg <<-EOF - # There was -Wl,-z,relro here, but it's not supported on Mac - # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job - EOF - else - 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 - -Wl,-z,now - EOF - fi - - 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 () && !defined(__GLIBC__) - # include - #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 - - # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for - # non-hardened? - 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_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE - EOF - - cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die - # Options below are conditional on USE=hardened. - 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. 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 - - if use kernel_Darwin; then - cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die - # Gentoo Prefix on Darwin - -Wl,-search_paths_first - -Wl,-rpath,${EPREFIX}/usr/lib - -L ${EPREFIX}/usr/lib - -isystem ${EPREFIX}/usr/include - -isysroot ${EPREFIX}/MacOSX.sdk - EOF - if use bootstrap-prefix ; then - # bootstrap-prefix is only set during stage2 of bootstrapping - # Prefix, where EPREFIX is set to EPREFIX/tmp. - # Here we need to point it at the future lib dir of the stage3's - # EPREFIX. - cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die - -Wl,-rpath,${EPREFIX}/../usr/lib - EOF - fi - fi -} - -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 -} -- cgit v1.2.3