diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2022-03-25 08:44:31 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2022-03-25 08:56:02 +0100 |
commit | 23119d51a14c046dae35ae5e6ad9e35982d044fd (patch) | |
tree | 890a141660b21c60d9f6e2fc8efd7944a55673a9 /src/makefiles | |
parent | 56566835039ac5eed70f188518cef1a7ea0971b2 (diff) | |
download | postgresql-23119d51a14c046dae35ae5e6ad9e35982d044fd.tar.gz postgresql-23119d51a14c046dae35ae5e6ad9e35982d044fd.zip |
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.aix | 1 | ||||
-rw-r--r-- | src/makefiles/Makefile.cygwin | 1 | ||||
-rw-r--r-- | src/makefiles/Makefile.darwin | 2 | ||||
-rw-r--r-- | src/makefiles/Makefile.freebsd | 2 | ||||
-rw-r--r-- | src/makefiles/Makefile.hpux | 6 | ||||
-rw-r--r-- | src/makefiles/Makefile.linux | 2 | ||||
-rw-r--r-- | src/makefiles/Makefile.netbsd | 2 | ||||
-rw-r--r-- | src/makefiles/Makefile.openbsd | 2 | ||||
-rw-r--r-- | src/makefiles/Makefile.solaris | 2 | ||||
-rw-r--r-- | src/makefiles/Makefile.win32 | 1 |
10 files changed, 0 insertions, 21 deletions
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix index ba3695dd570..84f26b49b87 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 81089d6257b..6afa9a06a1b 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 b17598f0586..4fc81c1584a 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 75db21ba145..0e77616b0f9 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 7e18770d896..25e036bd8d5 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 645f73aa2b7..1ffec9d1698 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 6f9cb1d45d1..421b735e407 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 6f9cb1d45d1..421b735e407 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 62a6c01c3a3..5496edcafc1 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 e72cb2db0e5..17d68196442 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))) |