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:
@ -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)
|
||||
|
Reference in New Issue
Block a user