mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Make PGAC_C_BUILTIN_OP_OVERFLOW link instead of just compiling.
Otherwise the detection can spuriously detect symbol as available, because the compiler may just emits reference to non-existant symbol.
This commit is contained in:
@ -305,10 +305,11 @@ fi])# PGAC_C_BUILTIN_CONSTANT_P
|
||||
# and define HAVE__BUILTIN_OP_OVERFLOW if so.
|
||||
#
|
||||
# Check for the most complicated case, 64 bit multiplication, as a
|
||||
# proxy for all of the operations.
|
||||
# proxy for all of the operations. Have to link to be sure to
|
||||
# recognize a missing __builtin_mul_overflow.
|
||||
AC_DEFUN([PGAC_C_BUILTIN_OP_OVERFLOW],
|
||||
[AC_CACHE_CHECK(for __builtin_mul_overflow, pgac_cv__builtin_op_overflow,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
|
||||
[PG_INT64_TYPE result;
|
||||
__builtin_mul_overflow((PG_INT64_TYPE) 1, (PG_INT64_TYPE) 2, &result);]
|
||||
)],
|
||||
|
Reference in New Issue
Block a user