]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use CXXFLAGS instead of CFLAGS for linking C++ code
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 26 Feb 2026 17:06:58 +0000 (12:06 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 26 Feb 2026 17:06:58 +0000 (12:06 -0500)
commitb9f7ceabd820369280d4ca6bfaab43cf8345f1bd
tree69e9ffcba94b3b38c31bd1e152eb3def18f7d22e
parent25501fe995fc6b851bf282974fe8c4a8b6d91f4c
Use CXXFLAGS instead of CFLAGS for linking C++ code

Otherwise, this would break if using C and C++ compilers from
different families and they understand different options.  It already
used the right flags for compiling, this is only for linking.  Also,
the meson setup already did this correctly.

Back-patch of v18 commit 365b5a345 into older supported branches.
At the time we were only aware of trouble in v18, but as shown
by buildfarm member siren, older branches can hit the problem too.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Author: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/228700.1722717983@sss.pgh.pa.us
Discussion: https://postgr.es/m/3109540.1771698685@sss.pgh.pa.us
Backpatch-through: 14-17
src/backend/jit/llvm/Makefile