summaryrefslogtreecommitdiff
path: root/sys-devel/clang-common
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-11 18:08:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-11 18:08:11 +0000
commit23650861e24563ddcf10919ab5b1912676c3ff0c (patch)
tree0853606be5f409f8f1859eb33652d0c8c1e62623 /sys-devel/clang-common
parent44a6f923079d51164af67c7bc3f3e0db24658088 (diff)
gentoo auto-resync : 11:03:2023 - 18:08:11
Diffstat (limited to 'sys-devel/clang-common')
-rw-r--r--sys-devel/clang-common/Manifest3
-rw-r--r--sys-devel/clang-common/clang-common-16.0.0_rc4.ebuild168
2 files changed, 171 insertions, 0 deletions
diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest
index c7fcf32732d9..f56990fbaa84 100644
--- a/sys-devel/clang-common/Manifest
+++ b/sys-devel/clang-common/Manifest
@@ -4,11 +4,14 @@ 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.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
EBUILD clang-common-14.0.6.ebuild 541 BLAKE2B 87b158e874cf600e23591a8095e0edb4d30d4482600ef8fe38984e9ba9559e6e2226107cd482f355d950392a6a452e1a8ae79d297d5afc3951a7f1c8f6227b5f SHA512 1bd0481468c278f131ec9f87243927b60a59752f4229450559bf8016e9599155a52593810fcdc1cf0aecd4aa1529e8df300d95123a53de18eb326152caafbbef
EBUILD clang-common-15.0.7-r3.ebuild 4735 BLAKE2B 4c29d23bc621ee4f82056b647147d8bc285f94d3bf26a9e520ff0342d0e46dffb524bb0d0a41142bf9d1c4e17c77afa39c7cef96f2e3934cee1f635c18550f56 SHA512 0077c019648238a8a3a991e07d85ac115f6ee44437a77a25b00d3b91383e2bd5bb7453b2a6d3041a9128bdcc0ea7eaeea0ca04cc952848d354eceb2096fbb4b6
EBUILD clang-common-16.0.0.9999.ebuild 4712 BLAKE2B 5a0410476f2f74934786b57f90676c8ffa15ffc36f6d07ec8e4daf0356b75e19f695d9f1bd33a7470f9e3c348318c07da89b482b3abdac6f096cb91905600cb2 SHA512 c110ddc90ff766fab5a39473c87595c7a2c1fc1dfecef8fb66453ececc57bcc6123912321bac9408d3e1cb4d08839a77d8be7d5003763eba1416a2e94f1b2968
EBUILD clang-common-16.0.0_rc3-r1.ebuild 4718 BLAKE2B b9828aa5db9aab0fa65e35501a733feccee05ac0c244d27305bc798b645c2d9d2d58f5826022a5908d83f46a7aa505cbaa5c66f848531e33cb23a13fc22cdae4 SHA512 8dbf47c513ed0cb781551b61563b5a9b9a0fdcc256590fdf71d1f7f60a87f339a671a8ce5a6b4a46b867e26251cc278d1f9c745d637b17381b124ba1f1328300
+EBUILD clang-common-16.0.0_rc4.ebuild 4712 BLAKE2B 5a0410476f2f74934786b57f90676c8ffa15ffc36f6d07ec8e4daf0356b75e19f695d9f1bd33a7470f9e3c348318c07da89b482b3abdac6f096cb91905600cb2 SHA512 c110ddc90ff766fab5a39473c87595c7a2c1fc1dfecef8fb66453ececc57bcc6123912321bac9408d3e1cb4d08839a77d8be7d5003763eba1416a2e94f1b2968
EBUILD clang-common-17.0.0.9999.ebuild 4712 BLAKE2B 5a0410476f2f74934786b57f90676c8ffa15ffc36f6d07ec8e4daf0356b75e19f695d9f1bd33a7470f9e3c348318c07da89b482b3abdac6f096cb91905600cb2 SHA512 c110ddc90ff766fab5a39473c87595c7a2c1fc1dfecef8fb66453ececc57bcc6123912321bac9408d3e1cb4d08839a77d8be7d5003763eba1416a2e94f1b2968
EBUILD clang-common-17.0.0_pre20230304.ebuild 4712 BLAKE2B 5a0410476f2f74934786b57f90676c8ffa15ffc36f6d07ec8e4daf0356b75e19f695d9f1bd33a7470f9e3c348318c07da89b482b3abdac6f096cb91905600cb2 SHA512 c110ddc90ff766fab5a39473c87595c7a2c1fc1dfecef8fb66453ececc57bcc6123912321bac9408d3e1cb4d08839a77d8be7d5003763eba1416a2e94f1b2968
MISC metadata.xml 735 BLAKE2B 12ea133df3d7eb9367a65e572ef91893e654d5b77caa27c66e4b5b41ba90ebc5e619eb78dfff2a67183d2c1cbfcf35fa903b2bb75604ce153d5cedfce5346e3c SHA512 8ed6b12d4f2aa1985897a8d81ce898dbc0d14ac222f3d0f259cbe80fbb8b2349dff7677627daeaf39a422f290200da4fac6348abc81c9e35da0ca73a11cfdd83
diff --git a/sys-devel/clang-common/clang-common-16.0.0_rc4.ebuild b/sys-devel/clang-common/clang-common-16.0.0_rc4.ebuild
new file mode 100644
index 000000000000..3165f42a329f
--- /dev/null
+++ b/sys-devel/clang-common/clang-common-16.0.0_rc4.ebuild
@@ -0,0 +1,168 @@
+# 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(__OPTIMIZE__) && __OPTIMIZE__ > 0
+ #define _FORTIFY_SOURCE ${fortify_level}
+ #endif
+ #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
+}