Gentoo Archives: gentoo-amd64

From: "Hemmann
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] gcc 4.1 + CFLAGS
Date: Fri, 09 Jun 2006 18:53:21
Message-Id: 200606092050.14377.volker.armin.hemmann@tu-clausthal.de
In Reply to: Re: [gentoo-amd64] gcc 4.1 + CFLAGS by "Vladimir G. Ivanovic"
1 On Friday 09 June 2006 19:11, Vladimir G. Ivanovic wrote:
2 > On Fri, 2006-06-09 at 15:36 +0200, Hemmann, Volker Armin wrote:
3 > > > Haven't noticed any problems on my laptop or a workstation.
4 > >
5 > > because they were filtered out.
6 > >
7 > > DO NEVER USE FFAST-MATH!
8 > >
9 > > Apps that can use it safely, usually set it in their makefile.
10 > >
11 > > Everything else is prone to break.
12 > >
13 > > And that is the reason, that almost all ebuilds have 'filter-flags'
14 > > and 'strip-flags'.
15 > >
16 > > Again: NEVER USE IT.
17 > >
18 > > And: NEVER TELL ANYBODY TO USE IT.
19 >
20 > If -ffast-math is filtered or stripped out, there is no harm in leaving
21 > it in CFLAGS, right?
22
23 no, because a lot of other flags are filtered too!
24 Some ebuilds filter ALL flags, only because some ricers had to use ffast-math
25 and other 'controversial' flags.
26
27 And some day, you will hit a package, that will built a damaged binary doing
28 the wrong stuff, that does not filter out, because nobody knew about it. And
29 then you are f*.
30
31 >
32 > But, on my system, only 14 packages filter out -ffast-math: gnubg
33 > postgresql pgcluster libpq zoom mpfr gmp octave openoffice gsl goffice
34 > rrdtool xv gimp. None strip it out. So, the huge majority of the
35 > packages on my system are compiled with -ffast-math, unless I've made a
36 > mistake in grepping for "fast-math" in ebuilds that contain
37 > "filter-flags".
38
39 and look for 'strip-flags'
40
41
42 > http://gcc.gnu.org/ml/gcc/2004-03/msg01511.html
43 > For me, it's very simple: If -ffast-math leads to answers that are
44 > less accurate (in the verification-against-observation-sense) or unphysical
45 > (against theoretical limit analysis), then I'll inspect my Fortran code and
46 > repair the formulation (either a single expression or the layout of loop
47 > code) that is responsible for the mayhem.
48 >
49 > Under no circumstances I will give up using -ffast-math.
50 >
51 >
52 > http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/320
53 >35.pdf -ffast-math is recommended by AMD.
54
55 FOR SPECIAL APPS. AND THIS DOCUMENT IS MEANT FOR PROGRAMMERS! PEOPLE WHO KNOW
56 THEIR CODE!
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 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] gcc 4.1 + CFLAGS "Vladimir G. Ivanovic" <vgivanovic@×××××××.net>