Enforce static linking of libgcc on Windows.

This is part of issue #205.
This commit is contained in:
Yamagi Burmeister 2017-06-10 09:59:06 +02:00
parent 36c880e105
commit 4c8d504cf7
2 changed files with 2 additions and 2 deletions

View file

@ -132,7 +132,7 @@ if(${OPENAL_SUPPORT})
endif() endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
list(APPEND yquake2LinkerFlags "-lm") list(APPEND yquake2LinkerFlags "-lm -static-libgcc")
else() else()
list(APPEND yquake2LinkerFlags "-lm -rdynamic") list(APPEND yquake2LinkerFlags "-lm -rdynamic")
endif() endif()

View file

@ -243,7 +243,7 @@ LDFLAGS := -L/usr/local/lib -lm
else ifeq ($(YQ2_OSTYPE),OpenBSD) else ifeq ($(YQ2_OSTYPE),OpenBSD)
LDFLAGS := -L/usr/local/lib -lm LDFLAGS := -L/usr/local/lib -lm
else ifeq ($(YQ2_OSTYPE),Windows) else ifeq ($(YQ2_OSTYPE),Windows)
LDFLAGS := -L/usr/lib -lws2_32 -lwinmm LDFLAGS := -L/usr/lib -lws2_32 -lwinmm -static-libgcc
else ifeq ($(YQ2_OSTYPE), Darwin) else ifeq ($(YQ2_OSTYPE), Darwin)
LDFLAGS := $(OSX_ARCH) -lm LDFLAGS := $(OSX_ARCH) -lm
endif endif