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