summaryrefslogtreecommitdiff
path: root/src/makefiles/Makefile.win32
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2014-10-21 22:55:47 -0400
committerNoah Misch <noah@leadboat.com>2014-10-21 22:55:47 -0400
commit284590e416b72f541c5fe54f36a95e38d80835c3 (patch)
tree0b5474945342fea9d8d66b1c220173b329f6ba85 /src/makefiles/Makefile.win32
parent53566fc0940cf557416b13252df57350a4511ce4 (diff)
downloadpostgresql-284590e416b72f541c5fe54f36a95e38d80835c3.tar.gz
MinGW: Use -static-libgcc when linking a DLL.
When commit 846e91e0223cf9f2821c3ad4dfffffbb929cb027 switched the linker driver from dlltool/dllwrap to gcc, it became possible for linking to choose shared libgcc. Backends having loaded a module dynamically linked to libgcc can exit abnormally, which the postmaster treats like a crash. Resume use of static libgcc exclusively, like 9.3 and earlier. Back-patch to 9.4.
Diffstat (limited to 'src/makefiles/Makefile.win32')
-rw-r--r--src/makefiles/Makefile.win322
1 files changed, 1 insertions, 1 deletions
diff --git a/src/makefiles/Makefile.win32 b/src/makefiles/Makefile.win32
index 73f0767229..b93f78067f 100644
--- a/src/makefiles/Makefile.win32
+++ b/src/makefiles/Makefile.win32
@@ -76,4 +76,4 @@ win32ver.o: win32ver.rc
# Rule for building a shared library from a single .o file
%.dll: %.o $(WIN32RES)
- $(CC) $(CFLAGS) -shared -o $@ $^ -Wl,--export-all-symbols $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
+ $(CC) $(CFLAGS) -shared -static-libgcc -o $@ $^ -Wl,--export-all-symbols $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)