Re: Bug fix for glibc broke freebsd build in REL_11_STABLE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug fix for glibc broke freebsd build in REL_11_STABLE
Дата
Msg-id 19045.1543683996@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug fix for glibc broke freebsd build in REL_11_STABLE  (Andres Freund <andres@anarazel.de>)
Ответы Re: Bug fix for glibc broke freebsd build in REL_11_STABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Bug fix for glibc broke freebsd build in REL_11_STABLE  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2018-09-04 17:51:30 -0700, Andres Freund wrote:
>> My current proposal is thus to do add a check that does
>> #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
>> something-that-fails
>> #endif
>> in an autoconf test, and have configure complain if that
>> fails. Something roughly along the lines of
>> "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc."

> Here's a patch along those lines.

I've been having an off-list discussion with the submitter of bug #14913
[1], in which the percentile_disc regression test returned unexpected
results.  The upshot of that is that he's using gcc 3.4.6 on x86 hardware,
and it is doing something that changes the roundoff behavior in this
line in orderedsetaggs.c:

                int64        row = (int64) ceil(p * rowcount);

gcc 3.4.6 is too old to have -fexcess-precision=standard of course, but
adding -msse2 to CFLAGS fixes the problem.  So it now seems to me that
we were too narrow-minded in thinking that only clang has this issue.

Looking at the buildfarm, our only extant member that is on x86, and
is not using clang, and doesn't have -fexcess-precision=standard, is
dromedary which is using Apple's old toolchain.  So the fact that it
isn't showing the problem isn't very good evidence about how widespread
this issue might be with older gcc versions.

I wonder whether we shouldn't remove the clang aspect of the test
you added, ie just make it read "if on x86, you must have either
-fexcess-precision=standard or -msse2".  Or should we go so far
as to have configure add -msse2 automatically?

            regards, tom lane

[1] https://www.postgresql.org/message-id/20171116224401.1466.68649%40wrigleys.postgresql.org


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: pg_stat_ssl additions
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Commitfest 2018-11