diff options
| author | Andrew Dunstan <andrew@dunslane.net> | 2014-02-01 16:08:33 -0500 |
|---|---|---|
| committer | Andrew Dunstan <andrew@dunslane.net> | 2014-02-01 16:08:33 -0500 |
| commit | 7e1531a4504248d9df5deae8c4aa9340adaa7ef5 (patch) | |
| tree | 1afaeb8f591fa2860431784001640e1608a4798d /src/Makefile.shlib | |
| parent | d587298b80e14afdbf2a6b0980f4902280af980e (diff) | |
| download | postgresql-7e1531a4504248d9df5deae8c4aa9340adaa7ef5.tar.gz | |
Don't use deprecated dllwrap on Cygwin.
The preferred method is to use "cc -shared", and this allows binaries
to be rebased if required, unlike dllwrap.
Backpatch to 9.0 where we have buildfarm coverage.
There are still some issues with Cygwin, especially modern Cygwin, but
this helps us get closer to good support.
Marco Atzeri.
Diffstat (limited to 'src/Makefile.shlib')
| -rw-r--r-- | src/Makefile.shlib | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib index 4e476c3036..4693565e32 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -271,6 +271,7 @@ ifeq ($(PORTNAME), unixware) endif ifeq ($(PORTNAME), cygwin) + LINK.shared = $(CC) -shared ifdef SO_MAJOR_VERSION shlib = cyg$(NAME)$(DLSUFFIX) endif @@ -361,6 +362,16 @@ else # PORTNAME == cygwin || PORTNAME == win32 # If SHLIB_EXPORTS is set, the rules below will build a .def file from # that. Else we build a temporary one here. +ifeq ($(PORTNAME), cygwin) +$(shlib): $(OBJS) | $(SHLIB_PREREQS) + $(CC) $(CFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE) + +$(stlib): $(OBJS) | $(SHLIB_PREREQS) + $(LINK.static) $@ $^ + $(RANLIB) $@ + + +else ifeq (,$(SHLIB_EXPORTS)) DLL_DEFFILE = lib$(NAME)dll.def exports_file = $(DLL_DEFFILE) @@ -377,6 +388,7 @@ $(shlib): $(OBJS) $(DLL_DEFFILE) | $(SHLIB_PREREQS) $(stlib): $(shlib) $(DLL_DEFFILE) | $(SHLIB_PREREQS) $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE) --output-lib $@ +endif # PORTNAME == cygwin endif # PORTNAME == cygwin || PORTNAME == win32 |
