postgresql/config
Peter Eisentraut 63275ce84d Hardcode override of typeof_unqual for clang-for-bitcode
The fundamental problem is that when we call clang to generate
bitcode, we might be using configure results from a different
compiler, which might not be fully compatible with the clang we are
using.  In practice, clang supports most things other compilers
support, so this has apparently not been a problem in practice.

But commits 4cfce4e62c, 0af05b5dbb, and 59292f7aac have been
struggling to make typeof_unqual work in this situation.  Clang added
support in version 19, GCC in version 14, so if you are using, say,
GCC 14 and Clang 16, the compilation with the latter will fail.  Such
combinations are not very likely in practice, because GCC 14 and Clang
19 were released within a few months of each other, and so Linux
distributions are likely to have suitable combinations.  But some
buildfarm members and some Fedora versions are affected, so this tries
to fix it.

The fully correct solution would be to run a separate set of configure
tests for that clang-for-bitcode, but that would be very difficult to
implement, and probably of limited use in practice.  So the workaround
here is that we hardcodedly override the configure result under clang
based on the version number.  As long as we only have a few of these
cases, this should be manageable.

Also swap the order of the tests of typeof_unqual: Commit 59292f7aac
tested the underscore variant first, but the reasons for that are now
gone.

Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/92f9750f-c7f6-42d8-9a4a-85a3cbe808f3%40eisentraut.org
2026-03-16 19:24:49 +01:00
..
ax_pthread.m4 Update config/ax_pthread.m4 to latest upstream version. 2018-11-19 15:05:33 -05:00
c-compiler.m4 Hardcode override of typeof_unqual for clang-for-bitcode 2026-03-16 19:24:49 +01:00
c-library.m4 Simplify checking for xlocale.h 2024-10-01 07:23:45 -04:00
check_decls.m4 Fix configure's AC_CHECK_DECLS tests to work correctly with clang. 2018-11-19 12:01:47 -05:00
check_modules.pl Update copyright for 2026 2026-01-01 13:24:10 -05:00
config.guess Update config.guess and config.sub 2025-04-09 12:41:54 +02:00
config.sub Update config.guess and config.sub 2025-04-09 12:41:54 +02:00
general.m4 Rename configure.in to configure.ac 2020-07-24 10:42:08 +02:00
install-sh Fix install-strip on Mac OS X 2012-08-21 23:42:43 -04:00
llvm.m4 jit: Drop redundant LLVM configure probes. 2025-12-30 20:24:42 +13:00
Makefile Install our "missing" script where PGXS builds can find it. 2015-12-11 16:15:05 -05:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
missing Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
perl.m4 Remove MSVC scripts 2023-12-20 09:44:37 +09:00
pkg.m4 Fix collection of typos in the code and the documentation 2022-03-15 11:29:35 +09:00
prep_buildtree Improve prep_buildtree 2025-08-04 14:06:58 +02:00
programs.m4 Don't put library-supplied -L/-I switches before user-supplied ones. 2025-07-29 15:17:40 -04:00
python.m4 Restore AIX support. 2026-02-23 13:34:22 -05:00
tcl.m4 configure: More use of AC_ARG_VAR 2019-01-18 08:38:34 +01:00