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

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: was: bad datatypes time and timestamp - wrong gcc option
Дата
Msg-id 398ED73B.A73DABB8@alumni.caltech.edu
обсуждение исходный текст
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Mark Hollomon"
Дата:
Сообщение: 'GROUP BY' / 'DISTINCT' interaction bug?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Trouble with float4 after upgrading from 6.5.3 to 7.0.2