Re: RPM building (was regression on RedHat)

From: Thomas Swan <tswan-lst(at)ics(dot)olemiss(dot)edu>
To: lockhart(at)fourpalms(dot)org, Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Cc: lockhart(at)fourpalms(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: RPM building (was regression on RedHat)
Date: 2001-03-21 04:15:22
Message-ID: 5.0.2.1.0.20010320220453.024d2a90@tangent.ics.olemiss.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-03-21 05:20:45 Re: pg_inherits: not found, but visible [IT GETS WORSE]
Previous Message Dominic J. Eidson 2001-03-21 03:59:36 Re: Re: Final Call: RC1 about to go out the door ...