summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2020-03-31 22:26:11 -0400
committerBruce Momjian <bruce@momjian.us>2020-03-31 22:26:11 -0400
commitf1e8362aefc866a6f75b6b41edccd03d51235d17 (patch)
tree5f2290a138b17cd7750c3c8ca4c8b2a9ae3a3d5b
parent67427a159b0b5d9091ace90990950a926e46cc89 (diff)
makefile: use proper linker flags for C++ compiles
Add CFLAGS_SL flags for C++ compiles, which adds needed -fPIC linker flag. Reported-by: Oleksii Kliukin Discussion: https://postgr.es/m/E4A49A6B-621B-4830-A374-970EBB7D1328@hintbits.com Backpatch-through: 10 only
-rw-r--r--src/Makefile.shlib1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index eb45daedc88..342496eecd0 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -101,6 +101,7 @@ endif
# Try to keep the sections in some kind of order, folks...
override CFLAGS += $(CFLAGS_SL)
+override CXXFLAGS += $(CFLAGS_SL)
ifdef SO_MAJOR_VERSION
# libraries ought to use this to refer to versioned gettext domain names
override CPPFLAGS += -DSO_MAJOR_VERSION=$(SO_MAJOR_VERSION)