aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2018-10-02 16:46:57 -0400
committerAndrew Dunstan <andrew@dunslane.net>2018-10-02 16:46:57 -0400
commita33245a8537f8ecbd2cd50c67b2b234f65e8fe14 (patch)
tree528d1edfdb35851c90472781d1746afb059520ee /src
parent6e35939febf83069430fedda6f89ab1fbe0f9e10 (diff)
downloadpostgresql-a33245a8537f8ecbd2cd50c67b2b234f65e8fe14.tar.gz
postgresql-a33245a8537f8ecbd2cd50c67b2b234f65e8fe14.zip
Don't build static libraries on Cygwin
Cygwin has been building and linking against static libraries. Although a bug this has been relatively harmless until now, when this has caused errors due to changes in the way we build certain libraries. So this patch makes things work the way we always intended, namely that we would link against the dynamic libraries (cygpq.dll etc.) and just not build the static libraries. The downstream packagers have been doing this for some time, so this just aligns with their practice. Extracted from a patch by Marco Atzeri, with a suggestion from Tom Lane. Discussion: https://postgr.es/m/1056.1538235347@sss.pgh.pa.us
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.shlib9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 63d5d9e8ee4..f20ffac375d 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -353,12 +353,11 @@ ifeq ($(PORTNAME), cygwin)
# Cygwin case
$(shlib): $(OBJS) | $(SHLIB_PREREQS)
- $(CC) $(CFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)
+ $(CC) $(CFLAGS) -shared -o $@ -Wl,--out-implib=$(stlib) $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)
-$(stlib): $(OBJS) | $(SHLIB_PREREQS)
- rm -f $@
- $(LINK.static) $@ $^
- $(RANLIB) $@
+# see notes in src/backend/parser/Makefile about use of this type of rule
+$(stlib): $(shlib)
+ touch $@
else