1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

MinGW: Use -static-libgcc when linking a DLL.

When commit 846e91e022 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.
This commit is contained in:
Noah Misch
2014-10-21 22:55:47 -04:00
parent 53566fc094
commit 284590e416
2 changed files with 9 additions and 3 deletions

View File

@ -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)