Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang-common/
Date: Tue, 29 Nov 2022 19:56:19
Message-Id: 1669751762.dcfb40cf07ff6327214314bab9d55a8c5b8de572.mgorny@gentoo
1 commit: dcfb40cf07ff6327214314bab9d55a8c5b8de572
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 29 14:03:32 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 29 19:56:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcfb40cf
7
8 sys-devel/clang-common: Bump to 15.0.6
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-devel/clang-common/Manifest | 2 +
13 sys-devel/clang-common/clang-common-15.0.6.ebuild | 126 ++++++++++++++++++++++
14 2 files changed, 128 insertions(+)
15
16 diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest
17 index b13bf7c63190..c7036963f43c 100644
18 --- a/sys-devel/clang-common/Manifest
19 +++ b/sys-devel/clang-common/Manifest
20 @@ -4,6 +4,8 @@ DIST llvm-project-15.0.3.src.tar.xz 112069972 BLAKE2B 3d29bab890467ba87fedcc4e76
21 DIST llvm-project-15.0.3.src.tar.xz.sig 438 BLAKE2B e7e0614e144eb878f694c12e97cf42ff8476e47cb55e8f259eb2ec52e303463ad753771271512e89baf0137c1382b11cfa028c85324174ebcd054a124000f537 SHA512 41229bebdb0c2df9a5e3a4d6f02d39fac7dc91f21895a659523beab4fa3ef99ff06eff5e4386221369b6e2b6f8fe974d67b7d8496d5911ce484d09ae0db8b916
22 DIST llvm-project-15.0.5.src.tar.xz 110931004 BLAKE2B d751e3627ee26e60a1a037a4a6cc574a31c4abe038331b86206348ac3ce93a243add2be3a0bbfc2ec5ec3f3562a5b5efea745cb1943c9c9153bc7b0fcf4de22e SHA512 cf2a89ebb6bc9d7e3f1fd09531c84ac9927cdbe5ee13a6fcb8ce4d08e5a9d6d480ad982f62126b9c757beafa283b34f2ba1fbc56223c641e70da2be4627f59a6
23 DIST llvm-project-15.0.5.src.tar.xz.sig 566 BLAKE2B a6e7204abc912045346a36f2b349e0829a4d5b9efcb230fb0c97caa38d5159ca17ffb47ce0485cbab276a4938ff3a5c05ef9f8b0b75f4c2028d870ee33023431 SHA512 312bc09b54408a9265f8102241089b0f674be0832dd5cb1998ff13dbccbe19324d7060ba2680457118dee96a1ff390b16282677ad825d7230008014ecebe47d5
24 +DIST llvm-project-15.0.6.src.tar.xz 112074576 BLAKE2B 74b1aa967c95191fa492f06b3a21930842da0ccbd9995dd33b4c2cf07852bbedcae97041fd5966209b16c63b90c87cc02fb2e858eda13dd9cc0641edcede0f75 SHA512 3311d85f4e02610af52f06e83c8c6d2b93950d24324b831b7afc47c39a20a546d39683a14e1a315da87d226379042de900a3f36a0351053547482af9035ab949
25 +DIST llvm-project-15.0.6.src.tar.xz.sig 438 BLAKE2B 3c97dbd55667f52dad964ef71257c36e3075794f5616cfd46de8bf874867e861bf45c0d56cff2d0ad5d4f1b5a1c9b3a395aedcc40bce545ce7f3c84ac75ae3da SHA512 a184103d84f8197a709c6c067fa83ca9290cd06532c487ad2c1fefa423438a1ac3c7f88835a94e3c9f04876e8d5f09afabef15bd8605df38aec6a4118597090c
26 DIST llvm-project-7b91798a5d3a8432b296778da4efe169012fb7b4.tar.gz 170989337 BLAKE2B 1ab79554a05f8d7a74c0b4bab319c30375475d3fd089764733744fde55c65eb38967cdb19e5b0211a1543549c2bfc3c0f3d43facb7e041f51988e8a65e4448f3 SHA512 4c4d3a748b967cbc75372d0db87ac48d32271a54047ddeeb028d565fa6b7004b2ab3abd82d8ff4621e50c9410fce28c3044550cc94aaf0f6e4f672498f47aba8
27 DIST llvm-project-959c9cc7acf4d0aa433f2436e2a45b782e18022a.tar.gz 171575300 BLAKE2B 090d41a8913f8e061d297e66ca653d95e18b8da744464d7085d7a199c0a444753a82b6ff6503e142aec81be01b419323cdbe3709497738df74afa886d69fd63d SHA512 fc3b26e148ead7a07b4d1509909a42712a43b179da435b052c26a237b0d2ae88c3c8d76eaa93c415be1ed0f0b5fb55e0ad92f427a18d70bc9634a6e7d1b6a4d9
28 DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
29
30 diff --git a/sys-devel/clang-common/clang-common-15.0.6.ebuild b/sys-devel/clang-common/clang-common-15.0.6.ebuild
31 new file mode 100644
32 index 000000000000..f7293fd3cb2b
33 --- /dev/null
34 +++ b/sys-devel/clang-common/clang-common-15.0.6.ebuild
35 @@ -0,0 +1,126 @@
36 +# Copyright 1999-2022 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=8
40 +
41 +inherit bash-completion-r1 llvm.org
42 +
43 +DESCRIPTION="Common files shared between multiple slots of clang"
44 +HOMEPAGE="https://llvm.org/"
45 +
46 +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
49 +IUSE="
50 + default-compiler-rt default-libcxx default-lld llvm-libunwind
51 + stricter
52 +"
53 +
54 +PDEPEND="
55 + sys-devel/clang:*
56 + default-compiler-rt? (
57 + sys-devel/clang-runtime[compiler-rt]
58 + llvm-libunwind? ( sys-libs/llvm-libunwind )
59 + !llvm-libunwind? ( sys-libs/libunwind )
60 + )
61 + !default-compiler-rt? ( sys-devel/gcc )
62 + default-libcxx? ( >=sys-libs/libcxx-${PV} )
63 + !default-libcxx? ( sys-devel/gcc )
64 + default-lld? ( sys-devel/lld )
65 + !default-lld? ( sys-devel/binutils )
66 +"
67 +IDEPEND="
68 + !default-compiler-rt? ( sys-devel/gcc-config )
69 + !default-libcxx? ( sys-devel/gcc-config )
70 +"
71 +
72 +LLVM_COMPONENTS=( clang/utils )
73 +llvm.org_set_globals
74 +
75 +pkg_pretend() {
76 + [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return
77 +
78 + local flag missing_flags=()
79 + for flag in default-{compiler-rt,libcxx,lld}; do
80 + if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then
81 + missing_flags+=( "${flag}" )
82 + fi
83 + done
84 +
85 + if [[ ${missing_flags[@]} ]]; then
86 + eerror "It seems that you have the following flags set on sys-devel/clang:"
87 + eerror
88 + eerror " ${missing_flags[*]}"
89 + eerror
90 + eerror "The default runtimes are now set via flags on sys-devel/clang-common."
91 + eerror "The build is being aborted to prevent breakage. Please either set"
92 + eerror "the respective flags on this ebuild, e.g.:"
93 + eerror
94 + eerror " sys-devel/clang-common ${missing_flags[*]}"
95 + eerror
96 + eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1."
97 + die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common"
98 + fi
99 +}
100 +
101 +src_install() {
102 + newbashcomp bash-autocomplete.sh clang
103 +
104 + insinto /etc/clang
105 + newins - gentoo-runtimes.cfg <<-EOF
106 + # This file is initially generated by sys-devel/clang-runtime.
107 + # It is used to control the default runtimes using by clang.
108 +
109 + --rtlib=$(usex default-compiler-rt compiler-rt libgcc)
110 + --unwindlib=$(usex default-compiler-rt libunwind libgcc)
111 + --stdlib=$(usex default-libcxx libc++ libstdc++)
112 + -fuse-ld=$(usex default-lld lld bfd)
113 + EOF
114 +
115 + newins - gentoo-gcc-install.cfg <<-EOF
116 + # This file is maintained by gcc-config.
117 + # It is used to specify the selected GCC installation.
118 + EOF
119 +
120 + newins - gentoo-common.cfg <<-EOF
121 + # This file contains flags common to clang, clang++ and clang-cpp.
122 + @gentoo-runtimes.cfg
123 + @gentoo-gcc-install.cfg
124 + EOF
125 +
126 + if use stricter; then
127 + newins - gentoo-stricter.cfg <<-EOF
128 + # This file increases the strictness of older clang versions
129 + # to match the newest upstream version.
130 +
131 + # clang-16 defaults
132 + -Werror=implicit-function-declaration
133 + -Werror=implicit-int
134 + -Werror=incompatible-function-pointer-types
135 + EOF
136 +
137 + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die
138 + @gentoo-stricter.cfg
139 + EOF
140 + fi
141 +
142 + local tool
143 + for tool in clang{,++,-cpp}; do
144 + newins - "${tool}.cfg" <<-EOF
145 + # This configuration file is used by ${tool} driver.
146 + @gentoo-common.cfg
147 + EOF
148 + done
149 +}
150 +
151 +pkg_preinst() {
152 + if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
153 + then
154 + local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
155 + if [[ -n ${gcc_path} ]]; then
156 + cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF
157 + --gcc-install-dir="${gcc_path%%:*}"
158 + EOF
159 + fi
160 + fi
161 +}