postgres.git / summary / log / commit / refs
commit 231570d33581e34cdfbacfa0f89a3d6fff790ef3
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu Feb 26 17:06:58 2026 +0000
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/jit/llvm/Makefile b/src/backend/jit/llvm/Makefile
index 1c3022b6274..13d9d7c6256 100644
--- a/src/backend/jit/llvm/Makefile
+++ b/src/backend/jit/llvm/Makefile
@@ -39,7 +39,7 @@ SHLIB_LINK += $(LLVM_LIBS)
# Because this module includes C++ files, we need to use a C++
# compiler for linking. Makefile.shlib uses $(COMPILER) to build
# loadable modules.
-override COMPILER = $(CXX) $(CFLAGS)
+override COMPILER = $(CXX) $(CXXFLAGS)
OBJS = \
$(WIN32RES)
[parent: e0565630665f]