[MPlayer-dev-eng] [PATCH] Enable FTZ and DAZ w/ -ffast-math
Piotr Kaczuba
pepe at attika.ath.cx
Fri Feb 13 14:08:23 CET 2009
W dniu 2009-02-10 14:31, Diego Biurrun pisze:
> On Tue, Feb 10, 2009 at 08:10:06PM +0800, Zuxy Meng wrote:
>> 2009/2/10 Diego Biurrun <diego at biurrun.de>:
>>> On Tue, Feb 10, 2009 at 12:12:23AM +0800, Zuxy Meng wrote:
>>>> 2009/2/10 Diego Biurrun <diego at biurrun.de>:
>>>>> On Sun, Feb 08, 2009 at 02:02:20PM +0800, Zuxy Meng wrote:
>>>>>> 2009/2/8 Diego Biurrun <diego at biurrun.de>:
>>>>>>> On Mon, Feb 02, 2009 at 09:33:08PM +0800, Zuxy Meng wrote:
>>>>>>>> GCC does a trick to enable FTZ (flush to zero) and DAZ (denormals are
>>>>>>>> zeroes) when either -ffast-math or -funsafe-math-optimizations is used
>>>>>>>> by linking crtfastmath.o into the executive. It requires the presence
>>>>>>>> of one of the options in the final linking stage.
>>>>>>> I don't like CFLAGS being used during the linking stage. Add those
>>>>>>> options to the linker flags instead.
>>>>>> Something like COMMON_LDFLAGS += $(findstr, -ffast-math, $CFLAGS)?
>>>>> No, add it to LDFLAGS in configure in the same place where fast-math is
>>>>> added to CFLAGS.
>>>> Do we check user specified CFLAGS?
>>> Somewhat. But IMO users have to make sure they add it to LDFLAGS as
>>> well then.
>> Actually gcc may pay attention to other CFLAGS during linking. For
>> example, if one wants to generate coverage info s/he must pass "-pg"
>> to gcc both during compilation and linking. IMHO it's cleaner to just
>> pass the whole CFLAGS in makefile. Anyway it doesn't do anything bad.
>
> I don't like it and still think that those flags should then appear in
> both CFLAGS and LDFLAGS.
What about the following patch then?
Piotr
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fast-math.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090213/4b394db1/attachment.asc>
More information about the MPlayer-dev-eng
mailing list