Gentoo Archives: gentoo-dev

From: Paul de Vrieze <gentoo-user@××××××××.net>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Automatic cflag downgrade from pentium4 to pentium3?
Date: Thu, 06 Mar 2003 12:35:08
Message-Id: 200303061335.06100.gentoo-user@devrieze.net
In Reply to: [gentoo-dev] Automatic cflag downgrade from pentium4 to pentium3? by Dhruba Bandopadhyay
1 On Thursday 06 March 2003 13:19, Dhruba Bandopadhyay wrote:
2 > Hello
3 >
4 > Today I saw in a gentoo cvs server email the following.
5 >
6 > 2003-03-05 Wednesday 11:01 method
7 >
8 > * sys-devel/gcc/: ChangeLog, gcc-3.2.2-r4.ebuild,
9 > files/digest-gcc-3.2.2-r4: replace-flags "-march=pentium4"
10 > "-march=pentium3" to fix bug #16867
11 >
12 > Now, I realise that the pentium4 is prone to errors but I hope this does
13 > not begin a spree of changes where -march=pentium4 flags will
14 > automatically downgraded to -march=pentium3 by the ebuild or otherwise.
15 >
16 > I have used pentium4 for some time now with no problems whatsoever and
17 > would like the raise the issue of whether downgrading of flags should be
18 > manual and left to the user rather than being automatically modified. A
19 > choice would be nice too.
20 >
21 > Also, what exactly is responsible for pentium4 bugs? Is it gcc and is
22 > there hope of this being resolved with future versions? And will using
23 > pentium3 result in a noticeable decline in performance?
24
25 The problem with the pentium4 bugs is entirely in gcc. The packages which
26 "downgrade" the pentium4 options do that because either:
27 - the program does not compile with pentium4
28 - the program does not run with pentium4
29 - the program is instable with pentium4
30
31 In summary the pentium4 flag makes the specific program instable. The loss in
32 speed should be minimal provided that -mcpu=pentium4 is still provided.
33 Downgrading flags per ebuild I believe is not an option for most users, as it
34 makes automatic merging impossible. For this reason the ebuilds that are
35 instable with pentium4 edit the cflags so that the generated code is still
36 optimized up to the best stable level.
37
38 The only other option would be to have all those ebuilds warn the user about
39 the problem with march=pentium4, and exit requesting the user to set his/her
40 C(XX)FLAGS better. The thing is that most programs actually do work with
41 -march=pentium4 so that people might want to use that.
42
43 Paul
44
45 ps. This flag downgrading concerns only gcc compilation. Not the code
46 generated by this gcc. So other programs are still using -march=pentium4
47 where it is not filtered too.
48
49 --
50 Paul de Vrieze
51 Researcher
52 Mail: pauldv@××××××.nl
53 Homepage: http://www.cs.kun.nl/~pauldv