From 81ab1a4db30480fdfb51d6e784b0f3ad9bbe2432 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 18 Jun 2023 01:46:36 +0100 Subject: gentoo auto-resync : 18:06:2023 - 01:46:36 --- sys-devel/clang-common/Manifest | 4 +- .../clang-common/clang-common-16.0.5-r1.ebuild | 2 +- .../clang-common-17.0.0_pre20230615.ebuild | 190 +++++++++++++++++++++ 3 files changed, 194 insertions(+), 2 deletions(-) create mode 100644 sys-devel/clang-common/clang-common-17.0.0_pre20230615.ebuild (limited to 'sys-devel/clang-common') diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest index 77efab27c5e0..f4f96f1f6328 100644 --- a/sys-devel/clang-common/Manifest +++ b/sys-devel/clang-common/Manifest @@ -1,3 +1,4 @@ +DIST llvm-project-0e08374abb2c61a3ae5c24d5f60be3b548da9778.tar.gz 191661586 BLAKE2B 05e5328d8eb9972bd6399e8c0f5ab241a78e6591e63ee520180c4ff154df432ad96f49ddc615a2208f69ffbec539b201fffeaf4906011b7a961cbc3860126ffa SHA512 1d4429ecb2292e419ed6172cf251ba4a1448ed51424552ac48a159d0e3d3414777f7821382d1839b56f0c906fb0a147b1df4eecb071f8a5c11b0fc1d0d40d339 DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13 DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6 DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 @@ -10,8 +11,9 @@ DIST llvm-project-62c0bdabfa32f6e32b17b45425b15309db340dfb.tar.gz 190948645 BLAK EBUILD clang-common-14.0.6.ebuild 541 BLAKE2B 87b158e874cf600e23591a8095e0edb4d30d4482600ef8fe38984e9ba9559e6e2226107cd482f355d950392a6a452e1a8ae79d297d5afc3951a7f1c8f6227b5f SHA512 1bd0481468c278f131ec9f87243927b60a59752f4229450559bf8016e9599155a52593810fcdc1cf0aecd4aa1529e8df300d95123a53de18eb326152caafbbef EBUILD clang-common-15.0.7-r5.ebuild 5090 BLAKE2B 39974630209630607d10903585223df68cd809fb390fc9eb2a80c4235ce70ae21120083f8eaf749c769a93f738c4e971e31e978dd637a0b87d07260281db4b83 SHA512 6cb37a7eb373d300d165e851e3643fd35e11d78a6a88617b4a8c0063b83558d10d307c32861e9ba2d0ac902c1cd2069ece6bd1446e309a6753f13adf8cd8fa2c EBUILD clang-common-15.0.7-r6.ebuild 5449 BLAKE2B 34001daa85a7ed75e5b27b2a93d4b7c12a11fcd575a76198937d4214b350f6ec5674c9e856a5b29a7b946c19a77fc818f33b75b82a94861e1c25a19b2c35bf8d SHA512 189e8fe88850fb2d22b39d6d4ed2df7bad0f321c0293823f0a335f10f0f6d29328e57190997da83699c9f34c1ef82ac6f530fd7ac866db2ffa1afde8d2198bb6 -EBUILD clang-common-16.0.5-r1.ebuild 5516 BLAKE2B 3c49327bdadecfd84a37047ed86653ae6e983f7cdc4c58894701e0368c6b059197435e94b3ad4a806920ea054a44893493038892950a470ef434650ceafba8cb SHA512 30af72f57b4d3894c7e2bbda932a9def04226f966067d2172e693e5bb40f15cb9ce2f925bb5eae33ec07cd032129e66d020fcd51306286dd7d870ec896cefca7 +EBUILD clang-common-16.0.5-r1.ebuild 5515 BLAKE2B 65537f34d9f23760d552740c1c78c1c8e77163bbce0f0baeffb5355213401f58e2dc5da497c432fa87fbcee9d5de82136bbc18ee5af5716afe2c3e85ccae4289 SHA512 6f805f1ca96cad38acfa7bf061776c78ef3861110ab536b58cc19a3acb71ba426e37be5c0c9b01e011c4c0b79d04b56f1581346a2ac0b6c94848463f6f5f0703 EBUILD clang-common-16.0.6-r1.ebuild 5517 BLAKE2B b6ab86006359b058f3503e0686a9f9b2172c0cf8db02859213ccfa3785cd670229b174326a142817299f8ac841139eb03029430a68a46ef75388024da9303afe SHA512 e063f0a43f937ed4f173aff4fe090ba1e084bf1ecd80549a41459e0ed1ebff0d68a6617b66926e1abb4874eccb2fb4541cf6667299d33be3cb969cc1a5eb32b7 EBUILD clang-common-17.0.0.9999.ebuild 5426 BLAKE2B dbab7084dcf1ec1c79c8f1c9b52733731917e8a98907891ac3498d9614b5762034f3c45ec40e137e34214c1788b5c0f24dc53d39a3ab764800edfbe61dbb7c70 SHA512 cc1a9faaa11de0b0cb484dccca330cc82ed020c21fb3872db58680411ac3f16171ed8569faf9e59eaf713238728c58f737197ebd337fd1fe797a6455a55d1328 EBUILD clang-common-17.0.0_pre20230609.ebuild 5426 BLAKE2B dbab7084dcf1ec1c79c8f1c9b52733731917e8a98907891ac3498d9614b5762034f3c45ec40e137e34214c1788b5c0f24dc53d39a3ab764800edfbe61dbb7c70 SHA512 cc1a9faaa11de0b0cb484dccca330cc82ed020c21fb3872db58680411ac3f16171ed8569faf9e59eaf713238728c58f737197ebd337fd1fe797a6455a55d1328 +EBUILD clang-common-17.0.0_pre20230615.ebuild 5426 BLAKE2B dbab7084dcf1ec1c79c8f1c9b52733731917e8a98907891ac3498d9614b5762034f3c45ec40e137e34214c1788b5c0f24dc53d39a3ab764800edfbe61dbb7c70 SHA512 cc1a9faaa11de0b0cb484dccca330cc82ed020c21fb3872db58680411ac3f16171ed8569faf9e59eaf713238728c58f737197ebd337fd1fe797a6455a55d1328 MISC metadata.xml 735 BLAKE2B 12ea133df3d7eb9367a65e572ef91893e654d5b77caa27c66e4b5b41ba90ebc5e619eb78dfff2a67183d2c1cbfcf35fa903b2bb75604ce153d5cedfce5346e3c SHA512 8ed6b12d4f2aa1985897a8d81ce898dbc0d14ac222f3d0f259cbe80fbb8b2349dff7677627daeaf39a422f290200da4fac6348abc81c9e35da0ca73a11cfdd83 diff --git a/sys-devel/clang-common/clang-common-16.0.5-r1.ebuild b/sys-devel/clang-common/clang-common-16.0.5-r1.ebuild index 273edf2baa01..58c8f37548f4 100644 --- a/sys-devel/clang-common/clang-common-16.0.5-r1.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.5-r1.ebuild @@ -10,7 +10,7 @@ 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" +KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE=" default-compiler-rt default-libcxx default-lld llvm-libunwind hardened stricter diff --git a/sys-devel/clang-common/clang-common-17.0.0_pre20230615.ebuild b/sys-devel/clang-common/clang-common-17.0.0_pre20230615.ebuild new file mode 100644 index 000000000000..51e0f70c6470 --- /dev/null +++ b/sys-devel/clang-common/clang-common-17.0.0_pre20230615.ebuild @@ -0,0 +1,190 @@ +# 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 + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" + 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 + + 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(__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 +} -- cgit v1.2.3