Gentoo Archives: gentoo-amd64

From: "Vladimir G. Ivanovic" <vgivanovic@×××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] gcc 4.1 + CFLAGS
Date: Fri, 09 Jun 2006 20:51:19
Message-Id: 1149885946.13126.58.camel@scarlatti.leonora.org
In Reply to: Re: [gentoo-amd64] gcc 4.1 + CFLAGS by "Hemmann
1 On Fri, 2006-06-09 at 20:50 +0200, Hemmann, Volker Armin wrote:
2
3 > > If -ffast-math is filtered or stripped out, there is no harm in leaving
4 > > it in CFLAGS, right?
5 >
6 > no, because a lot of other flags are filtered too!
7
8 What??? Whether only -ffast-math is filtered or all flags are filtered,
9 -ffast-math still filtered. I don't see where the harm lies.
10
11 > Some ebuilds filter ALL flags, only because some ricers had to use ffast-math
12 > and other 'controversial' flags.
13 >
14 > And some day, you will hit a package, that will built a damaged binary doing
15 > the wrong stuff, that does not filter out, because nobody knew about it. And
16 > then you are f*.
17
18 >
19 > >
20 > > But, on my system, only 14 packages filter out -ffast-math: gnubg
21 > > postgresql pgcluster libpq zoom mpfr gmp octave openoffice gsl goffice
22 > > rrdtool xv gimp. None strip it out. So, the huge majority of the
23 > > packages on my system are compiled with -ffast-math, unless I've made a
24 > > mistake in grepping for "fast-math" in ebuilds that contain
25 > > "filter-flags".
26 >
27 > and look for 'strip-flags'
28
29 There are only small number of ebuilds that strip out all flags.
30 Certainly less than 30.
31
32 >
33 >
34 > > http://gcc.gnu.org/ml/gcc/2004-03/msg01511.html
35 > > For me, it's very simple: If -ffast-math leads to answers that are
36 > > less accurate (in the verification-against-observation-sense) or unphysical
37 > > (against theoretical limit analysis), then I'll inspect my Fortran code and
38 > > repair the formulation (either a single expression or the layout of loop
39 > > code) that is responsible for the mayhem.
40 > >
41 > > Under no circumstances I will give up using -ffast-math.
42 > >
43 > >
44 > > http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/320
45 > >35.pdf -ffast-math is recommended by AMD.
46 >
47 > FOR SPECIAL APPS. AND THIS DOCUMENT IS MEANT FOR PROGRAMMERS! PEOPLE WHO KNOW
48 > THEIR CODE!
49
50 I didn't see anywhere that the AMD document is for special applications
51 only. Where does it say that?
52
53 What it does say is that applications the rely on exact implementation
54 of IEEE rules or specifications for floating-point behavior shouldn't
55 use -ffast-math.
56
57 >
58 > >
59 > > These opinions seem to contradict your advice. Could you be more
60 > > specific about why -ffast-math should not be used?
61 >
62 > no, they don't contradict me. You did not understand them.
63 >
64 > Nowhere does AMD tells endusers to build their complete system with that flag.
65
66 Chapter 1 Introduction, Section 1.1 Audience says:
67
68 This document is intended for ISVs and end-users of the AMD
69 Athlon 64 processor-based platforms...
70
71 It's clear that you think using -ffast-math is dangerous. I don't, so I
72 plan on continuing to use it. So far, the evidence from my system is in
73 my favor. (I did run across two more instances, just today, where, in
74 addition, to busybox, ebuilds fail with -ffast-math: cdparanoia and
75 pcmciautils.)
76
77 What would make me change my mind is some evidence, or some authority
78 who could convincingly explain why the experiences of those who do use
79 -ffast-math is anomalous. SHOUTING OR MERELY ASSERTING THAT IT'S A
80 PROBLEM is not really convincing.
81
82 How about continuing this discussion offline?
83
84 --- Vladimir
85
86 --
87 Vladimir G. Ivanovic <vgivanovic@×××××××.net>
88 --
89 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] gcc 4.1 + CFLAGS "Hemmann