1 |
On Thu, Jun 29, 2017 at 2:19 PM, James Le Cuirot <chewi@g.o> wrote: |
2 |
> On Wed, 28 Jun 2017 23:29:03 +0100 |
3 |
> James Le Cuirot <chewi@g.o> wrote: |
4 |
> |
5 |
>> > On Tue, Jun 27, 2017 at 6:44 PM, James Le Cuirot <chewi@g.o> wrote: |
6 |
>> > > I am therefore proposing a new global big-endian flag. This could be |
7 |
>> > > masked by default and unmasked + forced in the relevant profiles under |
8 |
>> > > arch. I will apply this according to the mapping defined in tc-endian of |
9 |
>> > > toolchain-funcs.eclass. |
10 |
>> |
11 |
>> I've just been putting the patch together. I made it slightly simpler |
12 |
>> by masking *and* forcing it by default so that it only needs to be |
13 |
>> unmasked were necessary. |
14 |
> |
15 |
> Feedback seems positive so here is the patch. I'll apply it late next |
16 |
> week as I don't need it immediately and I will be away until then. |
17 |
> |
18 |
> --- |
19 |
> |
20 |
> From e6aaee518b5e7eab735116a2ea57d538a8e26c19 Mon Sep 17 00:00:00 2001 |
21 |
> From: James Le Cuirot <chewi@g.o> |
22 |
> Date: Thu, 29 Jun 2017 22:11:49 +0100 |
23 |
> Subject: [PATCH] profiles: Add profile-enforced global big-endian USE flag |
24 |
> |
25 |
> The flag is forced and masked by default and then unmasked where |
26 |
> necessary. Note that there are some big endian host values listed in |
27 |
> tc-endian() that we do not have profiles for. |
28 |
> --- |
29 |
> profiles/arch/alpha/use.mask | 4 ++++ |
30 |
> profiles/arch/arm64/big-endian/use.mask | 6 ++++++ |
31 |
> profiles/arch/base/use.force | 6 ++++++ |
32 |
> profiles/arch/base/use.mask | 4 ++++ |
33 |
> profiles/arch/hppa/use.mask | 4 ++++ |
34 |
> profiles/arch/m68k/use.mask | 7 +++++++ |
35 |
> profiles/arch/mips/mipsel/use.mask | 6 ++++++ |
36 |
> profiles/arch/mips/use.mask | 4 ++++ |
37 |
> profiles/arch/powerpc/ppc64/64le/use.mask | 4 ++++ |
38 |
> profiles/arch/powerpc/use.mask | 7 +++++++ |
39 |
> profiles/arch/s390/use.mask | 7 +++++++ |
40 |
> profiles/arch/sparc/use.mask | 4 ++++ |
41 |
> profiles/use.desc | 3 ++- |
42 |
> 13 files changed, 65 insertions(+), 1 deletion(-) |
43 |
> create mode 100644 profiles/arch/arm64/big-endian/use.mask |
44 |
> create mode 100644 profiles/arch/base/use.force |
45 |
> create mode 100644 profiles/arch/mips/mipsel/use.mask |
46 |
> |
47 |
> diff --git a/profiles/arch/alpha/use.mask b/profiles/arch/alpha/use.mask |
48 |
> index d488fe8a09f4..b17afe9d9d4d 100644 |
49 |
> --- a/profiles/arch/alpha/use.mask |
50 |
> +++ b/profiles/arch/alpha/use.mask |
51 |
> @@ -1,6 +1,10 @@ |
52 |
> # Copyright 1999-2017 Gentoo Foundation. |
53 |
> # Distributed under the terms of the GNU General Public License, v2 |
54 |
> |
55 |
> +# James Le Cuirot <chewi@g.o> (29 Jun 2017) |
56 |
> +# Unmask as this profile is big endian. |
57 |
> +-big-endian |
58 |
|
59 |
No. Alpha is little endian. |
60 |
|
61 |
> + |
62 |
> # Tobias Klausmann <klausman@g.o> (03 March 2017) |
63 |
> # There is no luajit support on alpha. Bugs #554376, #608322. |
64 |
> luajit |
65 |
> diff --git a/profiles/arch/arm64/big-endian/use.mask b/profiles/arch/arm64/big-endian/use.mask |
66 |
> new file mode 100644 |
67 |
> index 000000000000..0a4af0711f5c |
68 |
> --- /dev/null |
69 |
> +++ b/profiles/arch/arm64/big-endian/use.mask |
70 |
> @@ -0,0 +1,6 @@ |
71 |
> +# Copyright 1999-2017 Gentoo Foundation. |
72 |
> +# Distributed under the terms of the GNU General Public License, v2 |
73 |
> + |
74 |
> +# James Le Cuirot <chewi@g.o> (29 Jun 2017) |
75 |
> +# Unmask as this profile is big endian. |
76 |
> +-big-endian |
77 |
> diff --git a/profiles/arch/base/use.force b/profiles/arch/base/use.force |
78 |
> new file mode 100644 |
79 |
> index 000000000000..7f213b9dd017 |
80 |
> --- /dev/null |
81 |
> +++ b/profiles/arch/base/use.force |
82 |
> @@ -0,0 +1,6 @@ |
83 |
> +# Copyright 1999-2017 Gentoo Foundation |
84 |
> +# Distributed under the terms of the GNU General Public License v2 |
85 |
> + |
86 |
> +# James Le Cuirot <chewi@g.o> (29 Jun 2017) |
87 |
> +# Forced and masked by default. Unmask where necessary. |
88 |
> +big-endian |
89 |
> diff --git a/profiles/arch/base/use.mask b/profiles/arch/base/use.mask |
90 |
> index 1a4a39cefc13..2ea1fb3d89fa 100644 |
91 |
> --- a/profiles/arch/base/use.mask |
92 |
> +++ b/profiles/arch/base/use.mask |
93 |
> @@ -1,6 +1,10 @@ |
94 |
> # Copyright 1999-2017 Gentoo Foundation |
95 |
> # Distributed under the terms of the GNU General Public License v2 |
96 |
> |
97 |
> +# James Le Cuirot <chewi@g.o> (29 Jun 2017) |
98 |
> +# Forced and masked by default. Unmask where necessary. |
99 |
> +big-endian |
100 |
> + |
101 |
> # Sven Wegener <swegener@g.o> (31 May 2017) |
102 |
> # libvirt is only supported on specific architectures |
103 |
> libvirt |
104 |
> diff --git a/profiles/arch/hppa/use.mask b/profiles/arch/hppa/use.mask |
105 |
> index 7361e2c52af2..bd158162a449 100644 |
106 |
> --- a/profiles/arch/hppa/use.mask |
107 |
> +++ b/profiles/arch/hppa/use.mask |
108 |
> @@ -3,6 +3,10 @@ |
109 |
> # NOTE: When masking a USE flag due to missing keywords, please file a keyword |
110 |
> # request bug for the hppa arch. |
111 |
> |
112 |
> +# James Le Cuirot <chewi@g.o> (29 Jun 2017) |
113 |
> +# Unmask as this profile is big endian. |
114 |
> +-big-endian |
115 |
> + |
116 |
> # Andreas Sturmlechner <asturm@g.o> (25 Feb 2017) |
117 |
> # kwallet integration split from kde to distinct flag |
118 |
> kwallet |
119 |
> diff --git a/profiles/arch/m68k/use.mask b/profiles/arch/m68k/use.mask |
120 |
> index aac0e46e97c2..646567111d56 100644 |
121 |
> --- a/profiles/arch/m68k/use.mask |
122 |
> +++ b/profiles/arch/m68k/use.mask |
123 |
> @@ -1,6 +1,13 @@ |
124 |
> +# Copyright 1999-2017 Gentoo Foundation. |
125 |
> +# Distributed under the terms of the GNU General Public License, v2 |
126 |
> + |
127 |
> # Unmask the flag which corresponds to ARCH. |
128 |
> -m68k |
129 |
> |
130 |
> +# James Le Cuirot <chewi@g.o> (29 Jun 2017) |
131 |
> +# Unmask as this profile is big endian. |
132 |
> +-big-endian |
133 |
> + |
134 |
> hardened |
135 |
> |
136 |
> # Paul de Vrieze <pauldv@g.o> |
137 |
> diff --git a/profiles/arch/mips/mipsel/use.mask b/profiles/arch/mips/mipsel/use.mask |
138 |
> new file mode 100644 |
139 |
> index 000000000000..2a8cc7b0c76a |
140 |
> --- /dev/null |
141 |
> +++ b/profiles/arch/mips/mipsel/use.mask |
142 |
> @@ -0,0 +1,6 @@ |
143 |
> +# Copyright 1999-2017 Gentoo Foundation |
144 |
> +# Distributed under the terms of the GNU General Public License v2 |
145 |
> + |
146 |
> +# James Le Cuirot <chewi@g.o> (29 Jun 2017) |
147 |
> +# Remask as this profile is little endian. |
148 |
> +big-endian |
149 |
> diff --git a/profiles/arch/mips/use.mask b/profiles/arch/mips/use.mask |
150 |
> index 09ac8ca4b2cc..6caff81617cb 100644 |
151 |
> --- a/profiles/arch/mips/use.mask |
152 |
> +++ b/profiles/arch/mips/use.mask |
153 |
> @@ -4,6 +4,10 @@ |
154 |
> # Unmask the flag which corresponds to ARCH. |
155 |
> -mips |
156 |
> |
157 |
> +# James Le Cuirot <chewi@g.o> (29 Jun 2017) |
158 |
> +# Unmask as this profile is big endian. |
159 |
> +-big-endian |
160 |
|
161 |
I'm not sure if this one is correct. arch/mips/mipsel's 'parent' file |
162 |
contains '..' |
163 |
|
164 |
I think if you re-mask big-endian in arch/mips/mipsel it'll work, and |
165 |
that seems like the best way to solve it. |
166 |
|
167 |
Other than that, the rest looks correct. |