Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/arch/riscv/, profiles/arch/riscv/rv64gc/, ...
Date: Fri, 03 May 2019 21:49:48
Message-Id: 1556919836.ce55dceabc5387634829f8b124626246725b6c1c.dilfridge@gentoo
1 commit: ce55dceabc5387634829f8b124626246725b6c1c
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 1 19:46:23 2019 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Fri May 3 21:43:56 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce55dcea
7
8 profiles: Add arch/riscv directory and subdirectories
9
10 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
11
12 profiles/arch/riscv/eapi | 1 +
13 profiles/arch/riscv/make.defaults | 25 ++++++++++++++
14 profiles/arch/riscv/package.accept_keywords | 10 ++++++
15 profiles/arch/riscv/package.use.mask | 7 ++++
16 profiles/arch/riscv/packages.build | 7 ++++
17 profiles/arch/riscv/parent | 1 +
18 profiles/arch/riscv/rv64gc/eapi | 1 +
19 profiles/arch/riscv/rv64gc/lp64/eapi | 1 +
20 profiles/arch/riscv/rv64gc/lp64/make.defaults | 15 ++++++++
21 profiles/arch/riscv/rv64gc/lp64/package.use.force | 5 +++
22 profiles/arch/riscv/rv64gc/lp64/use.mask | 8 +++++
23 profiles/arch/riscv/rv64gc/lp64d/eapi | 1 +
24 profiles/arch/riscv/rv64gc/lp64d/make.defaults | 15 ++++++++
25 profiles/arch/riscv/rv64gc/lp64d/package.use.force | 5 +++
26 profiles/arch/riscv/rv64gc/lp64d/use.mask | 8 +++++
27 profiles/arch/riscv/rv64gc/make.defaults | 40 ++++++++++++++++++++++
28 profiles/arch/riscv/rv64gc/package.mask | 5 +++
29 profiles/arch/riscv/rv64gc/parent | 2 ++
30 profiles/arch/riscv/rv64gc/use.force | 9 +++++
31 profiles/arch/riscv/rv64gc/use.mask | 14 ++++++++
32 profiles/arch/riscv/use.force | 5 +++
33 profiles/arch/riscv/use.mask | 8 +++++
34 22 files changed, 193 insertions(+)
35
36 diff --git a/profiles/arch/riscv/eapi b/profiles/arch/riscv/eapi
37 new file mode 100644
38 index 00000000000..7ed6ff82de6
39 --- /dev/null
40 +++ b/profiles/arch/riscv/eapi
41 @@ -0,0 +1 @@
42 +5
43
44 diff --git a/profiles/arch/riscv/make.defaults b/profiles/arch/riscv/make.defaults
45 new file mode 100644
46 index 00000000000..bae66d7316c
47 --- /dev/null
48 +++ b/profiles/arch/riscv/make.defaults
49 @@ -0,0 +1,25 @@
50 +# Copyright 2019 Gentoo Authors
51 +# Distributed under the terms of the GNU General Public License v2
52 +
53 +# Main RISC-V profile directory.
54 +
55 +# This is not a complete profile. Use the subdirectories!
56 +
57 +ARCH="riscv"
58 +ACCEPT_KEYWORDS="riscv ~riscv"
59 +
60 +CHOST="riscv64-unknown-linux-gnu"
61 +
62 +# Since many people will want to test this in qemu...
63 +FEATURES="-pid-sandbox -network-sandbox -ipc-sandbox"
64 +
65 +# The following stuff is, e.g., defined in subdirs:
66 +# CFLAGS
67 +# CXXFLAGS
68 +# FFLAGS
69 +# FCFLAGS
70 +# ABI
71 +# DEFAULT_ABI
72 +# MULTILIB_ABIS
73 +# CHOST_riscv
74 +# LIBDIR_riscv
75
76 diff --git a/profiles/arch/riscv/package.accept_keywords b/profiles/arch/riscv/package.accept_keywords
77 new file mode 100644
78 index 00000000000..ba134491c30
79 --- /dev/null
80 +++ b/profiles/arch/riscv/package.accept_keywords
81 @@ -0,0 +1,10 @@
82 +# Copyright 2019 Gentoo Authors
83 +# Distributed under the terms of the GNU General Public License v2
84 +
85 +# Even if someone makes Portage accept other keywords, here
86 +# we need specific versions / patches for riscv!
87 +sys-devel/gcc -amd64 -~amd64
88 +sys-libs/glibc -amd64 -~amd64
89 +
90 +# For the stages and qemu, we need static qemu *from* ~amd64
91 +app-emulation/qemu-riscv64-bin ~amd64
92
93 diff --git a/profiles/arch/riscv/package.use.mask b/profiles/arch/riscv/package.use.mask
94 new file mode 100644
95 index 00000000000..4d9a2d4184b
96 --- /dev/null
97 +++ b/profiles/arch/riscv/package.use.mask
98 @@ -0,0 +1,7 @@
99 +# Copyright 2019 Gentoo Authors
100 +# Distributed under the terms of the GNU General Public License v2
101 +
102 +# This doesn't work for (any) riscv yet.
103 +dev-libs/libpcre2 jit
104 +dev-libs/libpcre jit
105 +dev-vcs/git pcre-jit
106
107 diff --git a/profiles/arch/riscv/packages.build b/profiles/arch/riscv/packages.build
108 new file mode 100644
109 index 00000000000..c85897cb6ca
110 --- /dev/null
111 +++ b/profiles/arch/riscv/packages.build
112 @@ -0,0 +1,7 @@
113 +# Copyright 2019 Gentoo Authors
114 +# Distributed under the terms of the GNU General Public License v2
115 +
116 +# For now we add the x86-64 qemu-riscv64 static binary to all
117 +# stages. This makes life somewhat simpler when working without
118 +# real hardware.
119 +app-emulation/qemu-riscv64-bin
120
121 diff --git a/profiles/arch/riscv/parent b/profiles/arch/riscv/parent
122 new file mode 100644
123 index 00000000000..eb001c6e8ab
124 --- /dev/null
125 +++ b/profiles/arch/riscv/parent
126 @@ -0,0 +1 @@
127 +../base
128
129 diff --git a/profiles/arch/riscv/rv64gc/eapi b/profiles/arch/riscv/rv64gc/eapi
130 new file mode 100644
131 index 00000000000..7ed6ff82de6
132 --- /dev/null
133 +++ b/profiles/arch/riscv/rv64gc/eapi
134 @@ -0,0 +1 @@
135 +5
136
137 diff --git a/profiles/arch/riscv/rv64gc/lp64/eapi b/profiles/arch/riscv/rv64gc/lp64/eapi
138 new file mode 100644
139 index 00000000000..7ed6ff82de6
140 --- /dev/null
141 +++ b/profiles/arch/riscv/rv64gc/lp64/eapi
142 @@ -0,0 +1 @@
143 +5
144
145 diff --git a/profiles/arch/riscv/rv64gc/lp64/make.defaults b/profiles/arch/riscv/rv64gc/lp64/make.defaults
146 new file mode 100644
147 index 00000000000..8c6534c6999
148 --- /dev/null
149 +++ b/profiles/arch/riscv/rv64gc/lp64/make.defaults
150 @@ -0,0 +1,15 @@
151 +# Copyright 2019 Gentoo Authors
152 +# Distributed under the terms of the GNU General Public License v2
153 +
154 +# RISC-V rv64gc/lp64 no-multilib profile
155 +
156 +CFLAGS="-O2 -pipe -march=rv64gc -mabi=lp64"
157 +CXXFLAGS="${CFLAGS}"
158 +FFLAGS="${CFLAGS}"
159 +FCFLAGS="${CFLAGS}"
160 +
161 +# We have only one ABI
162 +MULTILIB_ABIS="lp64"
163 +
164 +# We hide the useflags for the ABIs
165 +USE_EXPAND_HIDDEN="ABI_RISCV"
166
167 diff --git a/profiles/arch/riscv/rv64gc/lp64/package.use.force b/profiles/arch/riscv/rv64gc/lp64/package.use.force
168 new file mode 100644
169 index 00000000000..e25bb13182b
170 --- /dev/null
171 +++ b/profiles/arch/riscv/rv64gc/lp64/package.use.force
172 @@ -0,0 +1,5 @@
173 +# Copyright 2019 Gentoo Authors
174 +# Distributed under the terms of the GNU General Public License v2
175 +
176 +# Undo multilib forcing.
177 +sys-apps/sandbox -abi_riscv_lp64d
178
179 diff --git a/profiles/arch/riscv/rv64gc/lp64/use.mask b/profiles/arch/riscv/rv64gc/lp64/use.mask
180 new file mode 100644
181 index 00000000000..9f26ae637a8
182 --- /dev/null
183 +++ b/profiles/arch/riscv/rv64gc/lp64/use.mask
184 @@ -0,0 +1,8 @@
185 +# Copyright 2019 Gentoo Authors
186 +# Distributed under the terms of the GNU General Public License v2
187 +
188 +# Mask multilib, since we do not want to use it.
189 +multilib
190 +
191 +# Mask the other multilib flags back for non-multilib profile.
192 +abi_riscv_lp64d
193
194 diff --git a/profiles/arch/riscv/rv64gc/lp64d/eapi b/profiles/arch/riscv/rv64gc/lp64d/eapi
195 new file mode 100644
196 index 00000000000..7ed6ff82de6
197 --- /dev/null
198 +++ b/profiles/arch/riscv/rv64gc/lp64d/eapi
199 @@ -0,0 +1 @@
200 +5
201
202 diff --git a/profiles/arch/riscv/rv64gc/lp64d/make.defaults b/profiles/arch/riscv/rv64gc/lp64d/make.defaults
203 new file mode 100644
204 index 00000000000..85372ab5928
205 --- /dev/null
206 +++ b/profiles/arch/riscv/rv64gc/lp64d/make.defaults
207 @@ -0,0 +1,15 @@
208 +# Copyright 2019 Gentoo Authors
209 +# Distributed under the terms of the GNU General Public License v2
210 +
211 +# RISC-V rv64gc/lp64d no-multilib profile
212 +
213 +CFLAGS="-O2 -pipe -march=rv64gc -mabi=lp64d"
214 +CXXFLAGS="${CFLAGS}"
215 +FFLAGS="${CFLAGS}"
216 +FCFLAGS="${CFLAGS}"
217 +
218 +# We have only one ABI
219 +MULTILIB_ABIS="lp64d"
220 +
221 +# We hide the useflags for the ABIs
222 +USE_EXPAND_HIDDEN="ABI_RISCV"
223
224 diff --git a/profiles/arch/riscv/rv64gc/lp64d/package.use.force b/profiles/arch/riscv/rv64gc/lp64d/package.use.force
225 new file mode 100644
226 index 00000000000..73fe93666cc
227 --- /dev/null
228 +++ b/profiles/arch/riscv/rv64gc/lp64d/package.use.force
229 @@ -0,0 +1,5 @@
230 +# Copyright 2019 Gentoo Authors
231 +# Distributed under the terms of the GNU General Public License v2
232 +
233 +# Undo multilib forcing.
234 +sys-apps/sandbox -abi_riscv_lp64
235
236 diff --git a/profiles/arch/riscv/rv64gc/lp64d/use.mask b/profiles/arch/riscv/rv64gc/lp64d/use.mask
237 new file mode 100644
238 index 00000000000..fd1d1445c96
239 --- /dev/null
240 +++ b/profiles/arch/riscv/rv64gc/lp64d/use.mask
241 @@ -0,0 +1,8 @@
242 +# Copyright 2019 Gentoo Authors
243 +# Distributed under the terms of the GNU General Public License v2
244 +
245 +# Mask multilib, since we do not want to use it.
246 +multilib
247 +
248 +# Mask the other multilib flags back for non-multilib profile.
249 +abi_riscv_lp64
250
251 diff --git a/profiles/arch/riscv/rv64gc/make.defaults b/profiles/arch/riscv/rv64gc/make.defaults
252 new file mode 100644
253 index 00000000000..a98e8e97dd6
254 --- /dev/null
255 +++ b/profiles/arch/riscv/rv64gc/make.defaults
256 @@ -0,0 +1,40 @@
257 +# Copyright 2019 Gentoo Authors
258 +# Distributed under the terms of the GNU General Public License v2
259 +
260 +# RISC-V profile for rv64gc multilib
261 +
262 +CFLAGS="-O2 -pipe -march=rv64gc"
263 +CXXFLAGS="${CFLAGS}"
264 +FFLAGS="${CFLAGS}"
265 +FCFLAGS="${CFLAGS}"
266 +
267 +# Multilib ABIs
268 +MULTILIB_ABIS="lp64d lp64"
269 +DEFAULT_ABI="lp64d"
270 +ABI="lp64d"
271 +
272 +# Library directories
273 +LIBDIR_lp64d="lib64/lp64d"
274 +LIBDIR_lp64="lib64/lp64"
275 +SYMLINK_LIB="no"
276 +
277 +# Flags for lp64d
278 +CFLAGS_lp64d="-mabi=lp64d"
279 +# LDFLAGS_lp64d
280 +
281 +# Flags for lp64
282 +CFLAGS_lp64="-mabi=lp64"
283 +# LDFLAGS_lp64
284 +
285 +# Enable lp64d by default
286 +ABI_RISCV="lp64d"
287 +
288 +# Unhide the riscv/rv64gc-specific USE_EXPANDs
289 +USE_EXPAND_HIDDEN="-ABI_RISCV"
290 +
291 +# Implicitly enable lp64d in ebuilds without multilib support
292 +IUSE_IMPLICIT="abi_riscv_lp64d"
293 +
294 +# Enable Python 3.7 since we can't use earlier versions
295 +PYTHON_TARGETS="python3_7"
296 +PYTHON_SINGLE_TARGET="python3_7"
297
298 diff --git a/profiles/arch/riscv/rv64gc/package.mask b/profiles/arch/riscv/rv64gc/package.mask
299 new file mode 100644
300 index 00000000000..43580b7b49a
301 --- /dev/null
302 +++ b/profiles/arch/riscv/rv64gc/package.mask
303 @@ -0,0 +1,5 @@
304 +# Copyright 2019 Gentoo Authors
305 +# Distributed under the terms of the GNU General Public License v2
306 +
307 +# Doesnt work properly with the two-level libdirs
308 +<dev-lang/python-3.7
309
310 diff --git a/profiles/arch/riscv/rv64gc/parent b/profiles/arch/riscv/rv64gc/parent
311 new file mode 100644
312 index 00000000000..6ee1b9eff10
313 --- /dev/null
314 +++ b/profiles/arch/riscv/rv64gc/parent
315 @@ -0,0 +1,2 @@
316 +..
317 +../../../features/multilib
318
319 diff --git a/profiles/arch/riscv/rv64gc/use.force b/profiles/arch/riscv/rv64gc/use.force
320 new file mode 100644
321 index 00000000000..7ce55a8948e
322 --- /dev/null
323 +++ b/profiles/arch/riscv/rv64gc/use.force
324 @@ -0,0 +1,9 @@
325 +# Copyright 2019 Gentoo Authors
326 +# Distributed under the terms of the GNU General Public License v2
327 +
328 +# Force the flag corresponding to the default ABI.
329 +abi_riscv_lp64d
330 +
331 +# Right now we have only one Python available, so we must use it
332 +python_targets_python3_7
333 +python_single_target_python3_7
334
335 diff --git a/profiles/arch/riscv/rv64gc/use.mask b/profiles/arch/riscv/rv64gc/use.mask
336 new file mode 100644
337 index 00000000000..529c1d54634
338 --- /dev/null
339 +++ b/profiles/arch/riscv/rv64gc/use.mask
340 @@ -0,0 +1,14 @@
341 +# Copyright 2019 Gentoo Authors
342 +# Distributed under the terms of the GNU General Public License v2
343 +
344 +# Unmask the multilib flags for this arch.
345 +-abi_riscv_lp64d
346 +-abi_riscv_lp64
347 +
348 +# Our Python has a lot of trouble with the two-level libdir.
349 +python_targets_python2_7
350 +python_targets_python3_5
351 +python_targets_python3_6
352 +python_single_target_python2_7
353 +python_single_target_python3_5
354 +python_single_target_python3_6
355
356 diff --git a/profiles/arch/riscv/use.force b/profiles/arch/riscv/use.force
357 new file mode 100644
358 index 00000000000..5e5e335685c
359 --- /dev/null
360 +++ b/profiles/arch/riscv/use.force
361 @@ -0,0 +1,5 @@
362 +# Copyright 2019 Gentoo Authors
363 +# Distributed under the terms of the GNU General Public License v2
364 +
365 +# Force the flag which corresponds to ARCH.
366 +riscv
367
368 diff --git a/profiles/arch/riscv/use.mask b/profiles/arch/riscv/use.mask
369 new file mode 100644
370 index 00000000000..7e3b4541191
371 --- /dev/null
372 +++ b/profiles/arch/riscv/use.mask
373 @@ -0,0 +1,8 @@
374 +# Copyright 2019 Gentoo Authors
375 +# Distributed under the terms of the GNU General Public License v2
376 +
377 +# Unmask the flag which corresponds to ARCH.
378 +-riscv
379 +
380 +# The required library has not been ported to riscv yet.
381 +seccomp