]> git.sesse.net Git - stockfish/commitdiff
Improve logic on mingw
authorproukornew <proukornevv@gmail.com>
Thu, 16 Dec 2021 22:30:23 +0000 (01:30 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Mon, 17 Jan 2022 18:47:32 +0000 (19:47 +0100)
There is no need to point g++, if we explicitly choose mingw.

Now for cygwin:

make COMP=mingw ARCH=x86-64-modern build

closes https://github.com/official-stockfish/Stockfish/pull/3860

No functional change

src/Makefile

index 0e889888549853abfac6b233e3ca8ba63f4872ee..90e596afe921d63ac20a81b348ec10d5c2e4998b 100644 (file)
@@ -368,22 +368,18 @@ endif
 ifeq ($(COMP),mingw)
        comp=mingw
 
-       ifeq ($(KERNEL),Linux)
-               ifeq ($(bits),64)
-                       ifeq ($(shell which x86_64-w64-mingw32-c++-posix),)
-                               CXX=x86_64-w64-mingw32-c++
-                       else
-                               CXX=x86_64-w64-mingw32-c++-posix
-                       endif
+       ifeq ($(bits),64)
+               ifeq ($(shell which x86_64-w64-mingw32-c++-posix 2> /dev/null),)
+                       CXX=x86_64-w64-mingw32-c++
                else
-                       ifeq ($(shell which i686-w64-mingw32-c++-posix),)
-                               CXX=i686-w64-mingw32-c++
-                       else
-                               CXX=i686-w64-mingw32-c++-posix
-                       endif
+                       CXX=x86_64-w64-mingw32-c++-posix
                endif
        else
-               CXX=g++
+               ifeq ($(shell which i686-w64-mingw32-c++-posix 2> /dev/null),)
+                       CXX=i686-w64-mingw32-c++
+               else
+                       CXX=i686-w64-mingw32-c++-posix
+               endif
        endif
 
        CXXFLAGS += -pedantic -Wextra -Wshadow