Gentoo Archives: gentoo-dev

From: Christopher Head <chead@×××××.ca>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Moving CPU flags into USE_EXPAND
Date: Tue, 20 Jan 2015 07:43:30
Message-Id: 20150119234319.2c9e305a@kruskal.home.chead.ca
In Reply to: Re: [gentoo-dev] Moving CPU flags into USE_EXPAND by Zac Medico
1 On Wed, 14 Jan 2015 11:01:16 -0800
2 Zac Medico <zmedico@g.o> wrote:
3
4 > Why should we have to foresee the future? We can easily add support
5 > for new flags in CPU_FLAGS_* variables at any time.
6
7 Ah, what I meant was that whoever maintains this flag list only needs
8 to forsee the present—when AMD or Intel adds a new instruction set
9 extension, you add a flag for it to the variable immediately, whether
10 or not any package actually uses it yet. Why? Here’s why:
11
12 Case 1: flags are added only as packages need them. This is pretty much
13 what we have today, only without the USE-expand feature. Every time a
14 package adds support for a new CPU feature, it gets a new USE flag, and
15 I see it in my emerge output. Now I have to go and look up what the
16 feature is, what it would be called in cpuinfo, and whether I have it.
17 Maybe I already looked up the same CPU feature two or three times, many
18 months ago, and forgot about it, for some other package. Lots of wasted
19 work. But I can’t just ignore it, because maybe this is the first time
20 that flag showed up, because no package ever used that feature before,
21 but my CPU *does* have it, so I really want to turn it on!
22
23 Case 2: flags are all added immediately as the CPU features are
24 announced. When I install Gentoo, all the possible flags for my CPU are
25 already listed in the variable. I immediately turn all those I have on
26 and all those I don’t have off. Done. Now I can completely stop paying
27 attention to the flags. As packages gain support, they gain new flags,
28 and I can ignore them, secure in the knowledge that the flags for those
29 features I have will all be turned on, while those I don’t have will be
30 turned off, with no further input from me. Nice and easy.
31
32 I’m not saying add flags for feature sets that haven’t been announced
33 yet. I’m just saying, add flags for feature sets that *are* announced
34 but that no package actually uses yet.
35 --
36 Christopher Head

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Moving CPU flags into USE_EXPAND Alexis Ballier <aballier@g.o>