Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@×××××××××××××.uk>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Replacing cpu-feature USE flags
Date: Thu, 06 Jul 2006 18:34:20
Message-Id: 20060706192932.23ec087a@snowdrop.home
In Reply to: Re: [gentoo-dev] Replacing cpu-feature USE flags by "Diego 'Flameeyes' Pettenò"
1 On Thu, 6 Jul 2006 20:07:00 +0200 "Diego 'Flameeyes' Pettenò"
2 <flameeyes@g.o> wrote:
3 | On Thursday 06 July 2006 19:51, Ciaran McCreesh wrote:
4 | > And for a single compile?
5 |
6 | I always leave the two of them in sync, even C++ apps might have
7 | parts building CFLAGS. In case you know you're going to use only C++
8 | is not difficult to use
9 |
10 | CFLAGS=${CXXFLAGS} has_cpuset 3dnow
11 |
12 | don't you think?
13
14 Ah yes, yet more added complexity that's going to be forgotten and that
15 will lead to weird breakages.
16
17 Incidentally, syncing CFLAGS and CXXFLAGS really isn't a good idea if
18 you want your C compiler to work and produce vaguely sane code.
19
20 | > And your assumption would be wrong. I can assure you that relying
21 | > upon -march doing anything sensible with __MAGIC__ is entirely
22 | > unsafe. Go and look at the VIS handling if you want a perfect
23 | > example.
24 |
25 | Okay, maybe VIS handling is broken. But we can rely pretty safely on
26 | x86, amd64 and PPC gcc to know the table of arches and extensions
27 | supported. Remember that I asked to talk with SPARC team for VIS just
28 | because I only know about the other three arches.
29
30 Not really. The __MAGIC__ is subject to change whenever any GCC person
31 feels like it. It also doesn't work in cases where people have one of
32 those nasty corner case CPUs (such as the 4m, which is not an m and not
33 really a 4 either, or the USIV, or the r8k) that's best off with a weird
34 march.
35
36 | > No no. Where "regain control" means the user has to screw around
37 | > with nasty hacks and pray, rather than setting a well defined,
38 | > specific variable.
39 |
40 | Find me a reason to do that, a part for broken MMX code that should
41 | be disabled on the ebuild itself already.
42
43 Well that's kinda the point. Since ebuild developers don't have access
44 to every kind of CPU, relying upon the ebuilds getting it right isn't a
45 very good idea.
46
47 | > Uh. USE flags are available at DEPEND time.
48 |
49 | If you talk about the nasm dependency, then it is rare, most of the
50 | MMX support is inline in C sources anyway.
51
52 'most'?
53
54 | > And at the metadata phase?
55 |
56 | Should be already transparent or something is strange. nasm is
57 | simpler to add the dependency for x86, there is really few people not
58 | enabling mmx already. Yes it is a bit of regression, but for a small
59 | percentage of users, while there's more safety for many other people.
60
61 Since when was Gentoo about covering up for idiots who can't get their
62 ricing correct at the expense of those who know what they're doing?
63
64 | > Er. No. Not at all. The __MAGIC__ isn't guaranteed. Quite the
65 | > contrary.
66 |
67 | This ain't no magic. The magic is in the _CODE_ that GCC creates, but
68 | not in the _DEFINES_ that GCC emits.
69
70 Sure it's magic. The __DEFINES__ aren't reliable. The GCC people change
71 them around now and again for compatibility with other compilers.
72
73 | > You're trying to guess what the user wants based upon hairy magic,
74 | No, about their chosen architecture.
75 |
76 | > rather than doing what the user says (aren't you always yelling at
77 | > upstreams for doing that?)
78 |
79 | The user asks for athlon64 support? They get athlon64 (mmx, 3dnow,
80 | 3dnowex, sse, sse2)
81 | The user asks for G3 support? They get G3 (nothing)
82 | The user asks for Pentium4 support? They get what they want (mmx,
83 | sse, sse2, sse3 in case)
84
85 Setting CFLAGS and praying is not asking for something. Setting a
86 MY_X86_CPU_DOES_THIS_MKAY variable is asking for something.
87
88 --
89 Ciaran McCreesh
90 Mail : ciaran dot mccreesh at blueyonder.co.uk
91
92
93 --
94 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Replacing cpu-feature USE flags "Diego 'Flameeyes' Pettenò" <flameeyes@g.o>