]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Link with -static in mingw
[stockfish] / src / Makefile
index 16eb9c5535404e7e8217ea02d95853e1d1c682cd..efca3947ee95aaf762f495fc470ec7d5221f11a4 100644 (file)
@@ -162,7 +162,7 @@ ifeq ($(COMP),mingw)
        comp=mingw
        CXX=g++
        CXXFLAGS += -Wextra -Wshadow
-       LDFLAGS += -static-libstdc++ -static-libgcc
+       LDFLAGS += -static
 endif
 
 ifeq ($(COMP),icc)
@@ -308,12 +308,8 @@ endif
 ifeq ($(comp),gcc)
        ifeq ($(optimize),yes)
        ifeq ($(debug),no)
-               GCC_MAJOR := `$(CXX) -dumpversion | cut -f1 -d.`
-               GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.`
-               ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \)))
-                       CXXFLAGS += -flto
-                       LDFLAGS += $(CXXFLAGS)
-               endif
+               CXXFLAGS += -flto
+               LDFLAGS += $(CXXFLAGS)
        endif
        endif
 endif