At 3/20/2001 09:24 PM, Thomas Lockhart wrote:
> > It's a good start to test with for the purposes for which I think you
> want to
> > test for. (and I'm an English teacher by night -- argh).
>
>:)
>
>Mandrake (as of 7.2) still does a brain-dead mix of "-O3" and
>"-ffast-math", which is a risky and unnecessary combination according to
>the gcc folks (and which kills some of our date/time rounding). From the
>man page for gcc:
>
>-ffast-math
> This option should never be turned on by any `-O' option
> since it can result in incorrect output for programs which
> depend on an exact implementation of IEEE or ANSI
> rules/specifications for math functions.
>
>I'd like to get away from having to post a non-brain-dead /root/.rpmrc
>file which omits the -ffast-math flag. Can you suggest mechanisms for
>putting a "-fno-fast-math" into the spec file? Isn't there a mechanism
>to mark things as "distro specific"? Suggestions?
I don't know if it helps. But, a stock install has the environment
MACHTYPE=i586-mandrake-linux.
If you hunt for mandrake in the MACHTYPE variable you could reset those
variables.
Also, I think those are set in the rpmrc file of the distro for the i386
target. If you specify anything else like i486, i686, you don't have that
problem.
It would be in the RPM_OPT_FLAGS or RPM_OPTS part of the build
environment. I don't think there would be a problem overriding it, in
fact, I would recommend the following : RPM_OPTS="$RPM_OPTS
-fno-fast-math". Since gcc will take the last argument as overriding the
first, it would be a nice safeguard.
Even setting CFLAGS="$CFLAGS -fno-fast-math" might be good idea.
Hope this helps,
Thomas