Gentoo Archives: gentoo-dev

From: James Le Cuirot <chewi@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] Profile-enforced big-endian USE flag
Date: Thu, 29 Jun 2017 21:20:21
Message-Id: 20170629221958.06c68bae@symphony.aura-online.co.uk
In Reply to: Re: [gentoo-dev] Profile-enforced big-endian USE flag by James Le Cuirot
1 On Wed, 28 Jun 2017 23:29:03 +0100
2 James Le Cuirot <chewi@g.o> wrote:
3
4 > > On Tue, Jun 27, 2017 at 6:44 PM, James Le Cuirot <chewi@g.o> wrote:
5 > > > I am therefore proposing a new global big-endian flag. This could be
6 > > > masked by default and unmasked + forced in the relevant profiles under
7 > > > arch. I will apply this according to the mapping defined in tc-endian of
8 > > > toolchain-funcs.eclass.
9 >
10 > I've just been putting the patch together. I made it slightly simpler
11 > by masking *and* forcing it by default so that it only needs to be
12 > unmasked were necessary.
13
14 Feedback seems positive so here is the patch. I'll apply it late next
15 week as I don't need it immediately and I will be away until then.
16
17 ---
18
19 From e6aaee518b5e7eab735116a2ea57d538a8e26c19 Mon Sep 17 00:00:00 2001
20 From: James Le Cuirot <chewi@g.o>
21 Date: Thu, 29 Jun 2017 22:11:49 +0100
22 Subject: [PATCH] profiles: Add profile-enforced global big-endian USE flag
23
24 The flag is forced and masked by default and then unmasked where
25 necessary. Note that there are some big endian host values listed in
26 tc-endian() that we do not have profiles for.
27 ---
28 profiles/arch/alpha/use.mask | 4 ++++
29 profiles/arch/arm64/big-endian/use.mask | 6 ++++++
30 profiles/arch/base/use.force | 6 ++++++
31 profiles/arch/base/use.mask | 4 ++++
32 profiles/arch/hppa/use.mask | 4 ++++
33 profiles/arch/m68k/use.mask | 7 +++++++
34 profiles/arch/mips/mipsel/use.mask | 6 ++++++
35 profiles/arch/mips/use.mask | 4 ++++
36 profiles/arch/powerpc/ppc64/64le/use.mask | 4 ++++
37 profiles/arch/powerpc/use.mask | 7 +++++++
38 profiles/arch/s390/use.mask | 7 +++++++
39 profiles/arch/sparc/use.mask | 4 ++++
40 profiles/use.desc | 3 ++-
41 13 files changed, 65 insertions(+), 1 deletion(-)
42 create mode 100644 profiles/arch/arm64/big-endian/use.mask
43 create mode 100644 profiles/arch/base/use.force
44 create mode 100644 profiles/arch/mips/mipsel/use.mask
45
46 diff --git a/profiles/arch/alpha/use.mask b/profiles/arch/alpha/use.mask
47 index d488fe8a09f4..b17afe9d9d4d 100644
48 --- a/profiles/arch/alpha/use.mask
49 +++ b/profiles/arch/alpha/use.mask
50 @@ -1,6 +1,10 @@
51 # Copyright 1999-2017 Gentoo Foundation.
52 # Distributed under the terms of the GNU General Public License, v2
53
54 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
55 +# Unmask as this profile is big endian.
56 +-big-endian
57 +
58 # Tobias Klausmann <klausman@g.o> (03 March 2017)
59 # There is no luajit support on alpha. Bugs #554376, #608322.
60 luajit
61 diff --git a/profiles/arch/arm64/big-endian/use.mask b/profiles/arch/arm64/big-endian/use.mask
62 new file mode 100644
63 index 000000000000..0a4af0711f5c
64 --- /dev/null
65 +++ b/profiles/arch/arm64/big-endian/use.mask
66 @@ -0,0 +1,6 @@
67 +# Copyright 1999-2017 Gentoo Foundation.
68 +# Distributed under the terms of the GNU General Public License, v2
69 +
70 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
71 +# Unmask as this profile is big endian.
72 +-big-endian
73 diff --git a/profiles/arch/base/use.force b/profiles/arch/base/use.force
74 new file mode 100644
75 index 000000000000..7f213b9dd017
76 --- /dev/null
77 +++ b/profiles/arch/base/use.force
78 @@ -0,0 +1,6 @@
79 +# Copyright 1999-2017 Gentoo Foundation
80 +# Distributed under the terms of the GNU General Public License v2
81 +
82 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
83 +# Forced and masked by default. Unmask where necessary.
84 +big-endian
85 diff --git a/profiles/arch/base/use.mask b/profiles/arch/base/use.mask
86 index 1a4a39cefc13..2ea1fb3d89fa 100644
87 --- a/profiles/arch/base/use.mask
88 +++ b/profiles/arch/base/use.mask
89 @@ -1,6 +1,10 @@
90 # Copyright 1999-2017 Gentoo Foundation
91 # Distributed under the terms of the GNU General Public License v2
92
93 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
94 +# Forced and masked by default. Unmask where necessary.
95 +big-endian
96 +
97 # Sven Wegener <swegener@g.o> (31 May 2017)
98 # libvirt is only supported on specific architectures
99 libvirt
100 diff --git a/profiles/arch/hppa/use.mask b/profiles/arch/hppa/use.mask
101 index 7361e2c52af2..bd158162a449 100644
102 --- a/profiles/arch/hppa/use.mask
103 +++ b/profiles/arch/hppa/use.mask
104 @@ -3,6 +3,10 @@
105 # NOTE: When masking a USE flag due to missing keywords, please file a keyword
106 # request bug for the hppa arch.
107
108 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
109 +# Unmask as this profile is big endian.
110 +-big-endian
111 +
112 # Andreas Sturmlechner <asturm@g.o> (25 Feb 2017)
113 # kwallet integration split from kde to distinct flag
114 kwallet
115 diff --git a/profiles/arch/m68k/use.mask b/profiles/arch/m68k/use.mask
116 index aac0e46e97c2..646567111d56 100644
117 --- a/profiles/arch/m68k/use.mask
118 +++ b/profiles/arch/m68k/use.mask
119 @@ -1,6 +1,13 @@
120 +# Copyright 1999-2017 Gentoo Foundation.
121 +# Distributed under the terms of the GNU General Public License, v2
122 +
123 # Unmask the flag which corresponds to ARCH.
124 -m68k
125
126 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
127 +# Unmask as this profile is big endian.
128 +-big-endian
129 +
130 hardened
131
132 # Paul de Vrieze <pauldv@g.o>
133 diff --git a/profiles/arch/mips/mipsel/use.mask b/profiles/arch/mips/mipsel/use.mask
134 new file mode 100644
135 index 000000000000..2a8cc7b0c76a
136 --- /dev/null
137 +++ b/profiles/arch/mips/mipsel/use.mask
138 @@ -0,0 +1,6 @@
139 +# Copyright 1999-2017 Gentoo Foundation
140 +# Distributed under the terms of the GNU General Public License v2
141 +
142 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
143 +# Remask as this profile is little endian.
144 +big-endian
145 diff --git a/profiles/arch/mips/use.mask b/profiles/arch/mips/use.mask
146 index 09ac8ca4b2cc..6caff81617cb 100644
147 --- a/profiles/arch/mips/use.mask
148 +++ b/profiles/arch/mips/use.mask
149 @@ -4,6 +4,10 @@
150 # Unmask the flag which corresponds to ARCH.
151 -mips
152
153 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
154 +# Unmask as this profile is big endian.
155 +-big-endian
156 +
157 # Mart Raudsepp <leio@g.o> (27 May 2017)
158 # media-libs/libmtp not tested
159 mtp
160 diff --git a/profiles/arch/powerpc/ppc64/64le/use.mask b/profiles/arch/powerpc/ppc64/64le/use.mask
161 index 2419ed9b6428..b8ad07b24a5a 100644
162 --- a/profiles/arch/powerpc/ppc64/64le/use.mask
163 +++ b/profiles/arch/powerpc/ppc64/64le/use.mask
164 @@ -1,6 +1,10 @@
165 # Copyright 1999-2017 Gentoo Foundation
166 # Distributed under the terms of the GNU General Public License v2
167
168 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
169 +# Remask as this profile is little endian.
170 +big-endian
171 +
172 # 2008/02/13 - Chris Gianelloni <wolf31o2@g.o>
173 # Mask multilib, since we cannot use it.
174 multilib
175 diff --git a/profiles/arch/powerpc/use.mask b/profiles/arch/powerpc/use.mask
176 index 6f993c6628c0..02e97b16f06d 100644
177 --- a/profiles/arch/powerpc/use.mask
178 +++ b/profiles/arch/powerpc/use.mask
179 @@ -1,6 +1,13 @@
180 +# Copyright 1999-2017 Gentoo Foundation
181 +# Distributed under the terms of the GNU General Public License v2
182 +
183 # PPC Specific use flags
184 #
185
186 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
187 +# Forced and masked by default. Unmask where necessary.
188 +big-endian
189 +
190 # Matt Turner <mattst88@g.o> (24 Mar 2017)
191 # virtual/opencl is not keyworded
192 opencl
193 diff --git a/profiles/arch/s390/use.mask b/profiles/arch/s390/use.mask
194 index 91dda10d0408..18637daa1445 100644
195 --- a/profiles/arch/s390/use.mask
196 +++ b/profiles/arch/s390/use.mask
197 @@ -1,9 +1,16 @@
198 +# Copyright 1999-2017 Gentoo Foundation
199 +# Distributed under the terms of the GNU General Public License v2
200 +
201 # Unmask the flag which corresponds to ARCH.
202 -s390
203
204 # Unmask ABI flags for this arch.
205 -abi_s390_32
206
207 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
208 +# Unmask as this profile is big endian.
209 +-big-endian
210 +
211 # Stuff we don't want/not tested
212 pbins
213 R
214 diff --git a/profiles/arch/sparc/use.mask b/profiles/arch/sparc/use.mask
215 index be19f2f7ed54..0d3e7049cf28 100644
216 --- a/profiles/arch/sparc/use.mask
217 +++ b/profiles/arch/sparc/use.mask
218 @@ -6,6 +6,10 @@
219
220 # This file contains a list of useflags that cannot be used on sparc.
221
222 +# James Le Cuirot <chewi@g.o> (29 Jun 2017)
223 +# Unmask as this profile is big endian.
224 +-big-endian
225 +
226 # Andreas Sturmlechner <asturm@g.o> (25 Feb 2017)
227 # kwallet integration split from kde to distinct flag
228 kwallet
229 diff --git a/profiles/use.desc b/profiles/use.desc
230 index 127c9935fa2a..9501b38fe33d 100644
231 --- a/profiles/use.desc
232 +++ b/profiles/use.desc
233 @@ -1,4 +1,4 @@
234 -# Copyright 1999-2015 Gentoo Foundation
235 +# Copyright 1999-2017 Gentoo Foundation
236 # Distributed under the terms of the GNU General Public License v2
237
238 # Keep them sorted
239 @@ -30,6 +30,7 @@ bash-completion - Enable bash-completion support
240 bcmath - Add support for libbcmath
241 berkdb - Add support for sys-libs/db (Berkeley DB for MySQL)
242 bidi - Enable bidirectional language support
243 +big-endian - Big-endian toolchain support
244 bindist - Flag to enable or disable options for prebuilt (GRP) packages (eg. due to licensing issues)
245 blas - Add support for the virtual/blas numerical library
246 bluetooth - Enable Bluetooth Support
247 --
248 2.13.1

Replies