From fcd00f02f3d3ec2d37625d68ee736a3e7381fb87 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 8 Aug 2023 21:28:31 +0100 Subject: gentoo auto-resync : 08:08:2023 - 21:28:31 --- sys-devel/clang-common/Manifest | 3 + .../clang-common/clang-common-17.0.0_rc2.ebuild | 190 +++++++++++++++++++++ 2 files changed, 193 insertions(+) create mode 100644 sys-devel/clang-common/clang-common-17.0.0_rc2.ebuild (limited to 'sys-devel/clang-common') diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest index 57d02670ffdc..316d5bf5d6d8 100644 --- a/sys-devel/clang-common/Manifest +++ b/sys-devel/clang-common/Manifest @@ -6,6 +6,8 @@ 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.0rc1.src.tar.xz 127805900 BLAKE2B ab6e3b7e7af10bbb086bdd271691c259925b8047d8425b0eafb55d2c1daf637c3a56903b88e50283667955e780a47f61e7215a1e3a1acd3634c62960cf17317f SHA512 fa7ebe7fad14087861dc0eea08f68e8aa01dcc6560d70163ec38819a7fd799484f6ab1e35a69393a14962b45fa0a469c9d6c5fd2882b3609305bd01bc9f6701f DIST llvm-project-17.0.0rc1.src.tar.xz.sig 438 BLAKE2B 976098c616d7f01c08c5be1d76dd395950184d2c6750f3f2c14235cdf446f1d876d842b3591f827cf1157fa25c707862a374e34d61fb73afe5a7b08d6041ee4a SHA512 272e92dec1fd43819f6fafdaa7f55a975e60a1c3000a69875209b89b7f3e2d2851e32ec0f2725242479203068349aaeff8da261d998a2325a9c52733bc5d7697 +DIST llvm-project-17.0.0rc2.src.tar.xz 127795160 BLAKE2B 58ed818f61e1cd179288d578e89460782617a3791a65dbc3e1f207629004f0d61225e87b78fdc0eeb3647912e5056ab68ce35ea2639a34ded1d8bdf0452e31f8 SHA512 7eb5c5172b5e9af65c940c876779f90e20a02659bf1489cedd06c67eea205aa1f4bdc5a8134a120db98cb80ca54673902b530c3315c9b53384c091200d9162c0 +DIST llvm-project-17.0.0rc2.src.tar.xz.sig 438 BLAKE2B 55788eacc592729839dad581b507794f279d84cafcaa49785ae34e02931ee9d4f64caf9e251e280dbc8676f3cacdca52a22f36cf7282655a3fc0721a61c9f003 SHA512 141e1ba7eb9870c21b91060ca484316cc8a402d4e61c8312688023850070b255b0eebe2d10ef63925f7269ee1b347074440e1a9a18d37cb7e1b6c82a7d1a1710 DIST llvm-project-c4bb3e073548cf436d5fa0406e3ae75e94684dec.tar.gz 195462091 BLAKE2B 982f1105db6cf63575916a20432df4c8623bdff236ce3bd95e63ffd931bc8e1f0e9ea9ad673b09d749c35c1bfe68a48f5b4080118f25040498db09a580db3a7e SHA512 1c591175f44da85eb5ee831220c0387a3d9a0604beaf7abd89fbc6d1e0e9c4f80dac73de1dc22375a45115dd4c1d764fed0a0f628993ca780eb6991682aa0b5b 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 @@ -13,6 +15,7 @@ EBUILD clang-common-15.0.7-r7.ebuild 5462 BLAKE2B 098697c65115e672a1e878167997d8 EBUILD clang-common-16.0.6-r2.ebuild 5523 BLAKE2B d1679b6e4b3f8430b9840c0e43e16d7deaf26990822c4754e906ece5451f142a201d70d8f9207ec461c9be4c28960811bb4c4f3f253c23d2c9abe5e3e66278e3 SHA512 8b9f63bbd13006f1c2e207ba889c3e4a03e8edd63b7c51d4bfa78bb10ccbb6f64636a0ccf2fde91abc43fed16b5c5993375a8bc6226315c80fb9fd3f2d0ebf14 EBUILD clang-common-17.0.0.9999.ebuild 5439 BLAKE2B a9e244677be20b2eb40ec21906a2985ffe08936908f0680adf258e2bb0d0cb4c58c17d9914cca82f46845c862266be4c595c54a99fe3ed21e2e7f7d2fa37cb8b SHA512 68b40b0470e25cb50c2cf9ea937a99bd01db8abe8d22c2e51de9ff98ea6cb2389133343757a5c341110c51bb9dc7de5ae66d01597ddc5b9689a578b7158594bc EBUILD clang-common-17.0.0_rc1.ebuild 5439 BLAKE2B a9e244677be20b2eb40ec21906a2985ffe08936908f0680adf258e2bb0d0cb4c58c17d9914cca82f46845c862266be4c595c54a99fe3ed21e2e7f7d2fa37cb8b SHA512 68b40b0470e25cb50c2cf9ea937a99bd01db8abe8d22c2e51de9ff98ea6cb2389133343757a5c341110c51bb9dc7de5ae66d01597ddc5b9689a578b7158594bc +EBUILD clang-common-17.0.0_rc2.ebuild 5439 BLAKE2B a9e244677be20b2eb40ec21906a2985ffe08936908f0680adf258e2bb0d0cb4c58c17d9914cca82f46845c862266be4c595c54a99fe3ed21e2e7f7d2fa37cb8b SHA512 68b40b0470e25cb50c2cf9ea937a99bd01db8abe8d22c2e51de9ff98ea6cb2389133343757a5c341110c51bb9dc7de5ae66d01597ddc5b9689a578b7158594bc EBUILD clang-common-18.0.0.9999.ebuild 5439 BLAKE2B a9e244677be20b2eb40ec21906a2985ffe08936908f0680adf258e2bb0d0cb4c58c17d9914cca82f46845c862266be4c595c54a99fe3ed21e2e7f7d2fa37cb8b SHA512 68b40b0470e25cb50c2cf9ea937a99bd01db8abe8d22c2e51de9ff98ea6cb2389133343757a5c341110c51bb9dc7de5ae66d01597ddc5b9689a578b7158594bc EBUILD clang-common-18.0.0_pre20230803.ebuild 5439 BLAKE2B a9e244677be20b2eb40ec21906a2985ffe08936908f0680adf258e2bb0d0cb4c58c17d9914cca82f46845c862266be4c595c54a99fe3ed21e2e7f7d2fa37cb8b SHA512 68b40b0470e25cb50c2cf9ea937a99bd01db8abe8d22c2e51de9ff98ea6cb2389133343757a5c341110c51bb9dc7de5ae66d01597ddc5b9689a578b7158594bc MISC metadata.xml 735 BLAKE2B 12ea133df3d7eb9367a65e572ef91893e654d5b77caa27c66e4b5b41ba90ebc5e619eb78dfff2a67183d2c1cbfcf35fa903b2bb75604ce153d5cedfce5346e3c SHA512 8ed6b12d4f2aa1985897a8d81ce898dbc0d14ac222f3d0f259cbe80fbb8b2349dff7677627daeaf39a422f290200da4fac6348abc81c9e35da0ca73a11cfdd83 diff --git a/sys-devel/clang-common/clang-common-17.0.0_rc2.ebuild b/sys-devel/clang-common/clang-common-17.0.0_rc2.ebuild new file mode 100644 index 000000000000..9295c64406f2 --- /dev/null +++ b/sys-devel/clang-common/clang-common-17.0.0_rc2.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}[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 +} + +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