From: proukornew Date: Thu, 16 Dec 2021 22:30:23 +0000 (+0300) Subject: Improve logic on mingw X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=d11101e4c6cd6aafca06e07d24e1c7026c92f6e7;p=stockfish Improve logic on mingw 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 --- diff --git a/src/Makefile b/src/Makefile index 0e889888..90e596af 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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