From 4c8d504cf793f23ea4048fbf22f0412a50559893 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Sat, 10 Jun 2017 09:59:06 +0200 Subject: [PATCH] Enforce static linking of libgcc on Windows. This is part of issue #205. --- CMakeLists.txt | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e4a1b34..3181c739 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,7 +132,7 @@ if(${OPENAL_SUPPORT}) endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - list(APPEND yquake2LinkerFlags "-lm") + list(APPEND yquake2LinkerFlags "-lm -static-libgcc") else() list(APPEND yquake2LinkerFlags "-lm -rdynamic") endif() diff --git a/Makefile b/Makefile index 6d654bb8..501d38f4 100755 --- a/Makefile +++ b/Makefile @@ -243,7 +243,7 @@ LDFLAGS := -L/usr/local/lib -lm else ifeq ($(YQ2_OSTYPE),OpenBSD) LDFLAGS := -L/usr/local/lib -lm 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) LDFLAGS := $(OSX_ARCH) -lm endif