pgsql: Error out for clang on x86-32 without SSE2 support,no -fexcess-

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Error out for clang on x86-32 without SSE2 support,no -fexcess-
Дата
Msg-id E1g3AGF-0002u8-DS@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Error out for clang on x86-32 without SSE2 support, no -fexcess-precision.

As clang currently doesn't support -fexcess-precision=standard,
compiling x86-32 code with SSE2 disabled, can lead to problems with
floating point overflow checks and the like.

This issue was noticed because clang, on at least some BSDs, defaults
to i386 compatibility, whereas it defaults to pentium4 on Linux.  Our
forced usage of __builtin_isinf() lead to some overflow checks not
triggering when compiling for i386, e.g. when the result of the
calculation didn't overflow in 80bit registers, but did so in 64bit.

While we could just fall back to a non-builtin isinf, it seems likely
that the use of 80bit registers leads to other problems (which is why
we force the flag for GCC already).  Therefore error out when
detecting clang in that situation.

Reported-By: Victor Wagner
Analyzed-By: Andrew Gierth and Andres Freund
Author: Andres Freund
Discussion: https://postgr.es/m/20180905005130.ewk4xcs5dgyzcy45@alap3.anarazel.de
Backpatch: 9.3-, all supported versions are affected

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/dbbc98a9ef67b350caf1bf02ad549f238853faed

Modified Files
--------------
configure    | 33 +++++++++++++++++++++++++++++++++
configure.in | 18 ++++++++++++++++++
2 files changed, 51 insertions(+)


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Error out for clang on x86-32 without SSE2 support,no -fexcess-
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Error out for clang on x86-32 without SSE2 support,no -fexcess-