]> granicus.if.org Git - postgresql/commit
Try to detect runtime unavailability of __builtin_mul_overflow(int64).
authorAndres Freund <andres@anarazel.de>
Sat, 16 Dec 2017 20:49:41 +0000 (12:49 -0800)
committerAndres Freund <andres@anarazel.de>
Sat, 16 Dec 2017 20:49:41 +0000 (12:49 -0800)
commitc04d35f442a8c4fd5a20103b31839ec52fce3046
tree7b39615fb8aac2b41fe17c02f91f95981d717341
parentc757a3da0af0e5eb636eeee2af6602d279162b0a
Try to detect runtime unavailability of __builtin_mul_overflow(int64).

On some systems the results of 64 bit __builtin_mul_overflow()
operations can be computed at compile time, but not at runtime. The
known cases are arm buildfar animals using clang where the runtime
operation is implemented in a unavailable function.

Try to avoid compile-time computation by using volatile arguments to
__builtin_mul_overflow(). In that case we hopefully will get a link
error when unavailable, similar to what buildfarm animals dangomushi
and gull are reporting.

Author: Andres Freund
Discussion: https://postgr.es/m/20171213213754.pydkyjs6bt2hvsdb@alap3.anarazel.de
config/c-compiler.m4
configure