Re: was: bad datatypes time and timestamp - wrong gcc option

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: "Habel, Ulrich 6575 EXT SFA-35" <Ulrich(dot)Habel(dot)EXTERN(at)de(dot)heidelberg(dot)com>
Cc: "'espero7757(at)gmx(dot)net'" <espero7757(at)gmx(dot)net>, Hackers List <pgsql-hackers(at)postgresql(dot)org>, Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Subject: Re: was: bad datatypes time and timestamp - wrong gcc option
Date: 2000-08-07 15:35:23
Message-ID: 398ED73B.A73DABB8@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(copied to -hackers)

> you were right about the wrong compiler-options: it was not the -O3 but
> the -ffast-math option that made the wrong rounding (and other stuff) ;-)
> I compiled a ManDrake source RPM that used the default rpmrc in
> /usr/lib/rpm/rpmrc, in which the optflags are set incorrectly:
>
> ... -O3 ... -ffast-math ...
>
> But this behaviour may be found in any distribution based onto the RedHat
> system, at least when utilizing the RPM-utility unchanged. My RPM is
> version 3.0.3 here.
> The manpage of gcc does not suggest to use the -ffast-math with any of the
> -O options.
> When I removed the -ffast-math option, your time and timestamp datatypes
> worked perfectly.
> A hot fix for the SPEC-file would be, to eliminate that option by
> RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e "s/-ffast-math//"`
> after the %build line. On the long term there should be a discussion, if
> that option is realy OK for doing all the packages...
> BTW: I'm using ManDrake 7.0 and took a postgresql-7.0.2-2mdk.src.rpm from a
> server and compiled it for a target i586-pc-linux-gnu on an i686.

Thanks for tracking this down. I'll look at my RPM setup for
Mandrake-7.1 to confirm the behavior, and then perhaps Lamar can
introduce an appropriate fix to the canonical spec file.

- Thomas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-08-07 15:35:54 Re: Trouble with float4 after upgrading from 6.5.3 to 7.0.2
Previous Message Mark Hollomon 2000-08-07 15:07:03 'GROUP BY' / 'DISTINCT' interaction bug?