summaryrefslogtreecommitdiff
path: root/src/makefiles
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-03-25 08:44:31 +0100
committerPeter Eisentraut <peter@eisentraut.org>2022-03-25 08:56:02 +0100
commit23119d51a14c046dae35ae5e6ad9e35982d044fd (patch)
tree890a141660b21c60d9f6e2fc8efd7944a55673a9 /src/makefiles
parent56566835039ac5eed70f188518cef1a7ea0971b2 (diff)
downloadpostgresql-23119d51a14c046dae35ae5e6ad9e35982d044fd.tar.gz
Refactor DLSUFFIX handling
Move DLSUFFIX from makefiles into header files for all platforms. Move the DLSUFFIX assignment from src/makefiles/ to src/templates/, have configure read it, and then substitute it into Makefile.global and pg_config.h. This avoids the need for all makefile rules that need it to locally set CPPFLAGS. It also resolves an inconsistent setup between the two Windows build systems. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/2f9861fb-8969-9005-7518-b8e60f2bead9@enterprisedb.com
Diffstat (limited to 'src/makefiles')
-rw-r--r--src/makefiles/Makefile.aix1
-rw-r--r--src/makefiles/Makefile.cygwin1
-rw-r--r--src/makefiles/Makefile.darwin2
-rw-r--r--src/makefiles/Makefile.freebsd2
-rw-r--r--src/makefiles/Makefile.hpux6
-rw-r--r--src/makefiles/Makefile.linux2
-rw-r--r--src/makefiles/Makefile.netbsd2
-rw-r--r--src/makefiles/Makefile.openbsd2
-rw-r--r--src/makefiles/Makefile.solaris2
-rw-r--r--src/makefiles/Makefile.win321
10 files changed, 0 insertions, 21 deletions
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
index ba3695dd57..84f26b49b8 100644
--- a/src/makefiles/Makefile.aix
+++ b/src/makefiles/Makefile.aix
@@ -14,7 +14,6 @@ else
rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)'
endif
-DLSUFFIX = .so
ifeq ($(host_os), aix3.2.5)
ifneq ($(GCC), yes)
LDFLAGS_SL += -e _nostart -H512 -bM:SRE
diff --git a/src/makefiles/Makefile.cygwin b/src/makefiles/Makefile.cygwin
index 81089d6257..6afa9a06a1 100644
--- a/src/makefiles/Makefile.cygwin
+++ b/src/makefiles/Makefile.cygwin
@@ -11,7 +11,6 @@ endif
LIBS:=$(filter-out -lm -lc, $(LIBS))
AROPT = crs
-DLSUFFIX = .dll
override CPPFLAGS += -DWIN32_STACK_RLIMIT=$(WIN32_STACK_RLIMIT)
diff --git a/src/makefiles/Makefile.darwin b/src/makefiles/Makefile.darwin
index b17598f058..4fc81c1584 100644
--- a/src/makefiles/Makefile.darwin
+++ b/src/makefiles/Makefile.darwin
@@ -1,7 +1,5 @@
AROPT = crs
-DLSUFFIX = .so
-
# env var name to use in place of LD_LIBRARY_PATH
ld_library_path_var = DYLD_LIBRARY_PATH
diff --git a/src/makefiles/Makefile.freebsd b/src/makefiles/Makefile.freebsd
index 75db21ba14..0e77616b0f 100644
--- a/src/makefiles/Makefile.freebsd
+++ b/src/makefiles/Makefile.freebsd
@@ -3,8 +3,6 @@ AROPT = cr
export_dynamic = -Wl,-export-dynamic
rpath = -Wl,-R'$(rpathdir)'
-DLSUFFIX = .so
-
# extra stuff for $(with_temp_install)
# we need this to get LD_LIBRARY_PATH searched ahead of the compiled-in
# rpath, if no DT_RUNPATH is present in the executable. The conditions
diff --git a/src/makefiles/Makefile.hpux b/src/makefiles/Makefile.hpux
index 7e18770d89..25e036bd8d 100644
--- a/src/makefiles/Makefile.hpux
+++ b/src/makefiles/Makefile.hpux
@@ -25,12 +25,6 @@ INSTALL_SHLIB_OPTS = -m 555
AROPT = crs
-ifeq ($(host_cpu), ia64)
- DLSUFFIX = .so
-else
- DLSUFFIX = .sl
-endif
-
# env var name to use in place of LD_LIBRARY_PATH
ld_library_path_var = SHLIB_PATH
diff --git a/src/makefiles/Makefile.linux b/src/makefiles/Makefile.linux
index 645f73aa2b..1ffec9d169 100644
--- a/src/makefiles/Makefile.linux
+++ b/src/makefiles/Makefile.linux
@@ -5,8 +5,6 @@ export_dynamic = -Wl,-E
# This allows LD_LIBRARY_PATH to still work when needed.
rpath = -Wl,-rpath,'$(rpathdir)',--enable-new-dtags
-DLSUFFIX = .so
-
# Rule for building a shared library from a single .o file
%.so: %.o
diff --git a/src/makefiles/Makefile.netbsd b/src/makefiles/Makefile.netbsd
index 6f9cb1d45d..421b735e40 100644
--- a/src/makefiles/Makefile.netbsd
+++ b/src/makefiles/Makefile.netbsd
@@ -3,8 +3,6 @@ AROPT = cr
export_dynamic = -Wl,-E
rpath = -Wl,-R'$(rpathdir)'
-DLSUFFIX = .so
-
# Rule for building a shared library from a single .o file
%.so: %.o
diff --git a/src/makefiles/Makefile.openbsd b/src/makefiles/Makefile.openbsd
index 6f9cb1d45d..421b735e40 100644
--- a/src/makefiles/Makefile.openbsd
+++ b/src/makefiles/Makefile.openbsd
@@ -3,8 +3,6 @@ AROPT = cr
export_dynamic = -Wl,-E
rpath = -Wl,-R'$(rpathdir)'
-DLSUFFIX = .so
-
# Rule for building a shared library from a single .o file
%.so: %.o
diff --git a/src/makefiles/Makefile.solaris b/src/makefiles/Makefile.solaris
index 62a6c01c3a..5496edcafc 100644
--- a/src/makefiles/Makefile.solaris
+++ b/src/makefiles/Makefile.solaris
@@ -9,8 +9,6 @@ else
rpath = -Wl,-R'$(rpathdir)'
endif
-DLSUFFIX = .so
-
# Rule for building a shared library from a single .o file
%.so: %.o
diff --git a/src/makefiles/Makefile.win32 b/src/makefiles/Makefile.win32
index e72cb2db0e..17d6819644 100644
--- a/src/makefiles/Makefile.win32
+++ b/src/makefiles/Makefile.win32
@@ -11,7 +11,6 @@ endif
override CPPFLAGS += -DWIN32_STACK_RLIMIT=$(WIN32_STACK_RLIMIT)
AROPT = crs
-DLSUFFIX = .dll
ifneq (,$(findstring backend,$(subdir)))
ifeq (,$(findstring conversion_procs,$(subdir)))