Skip to content

Commit

Permalink
Fix compiling of 32 bit binary on 64-bit Windows
Browse files Browse the repository at this point in the history
Two versions of mingw-w64 (targeting Win64 and Win32)
can be installed on Windows too.

No functional change

Resolves official-stockfish#532
  • Loading branch information
braich authored and zamar committed Dec 22, 2015
1 parent e3c85c3 commit 1e8836d
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -160,22 +160,18 @@ endif
ifeq ($(COMP),mingw)
comp=mingw

ifeq ($(UNAME),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),)
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),)
CXX=i686-w64-mingw32-c++
else
CXX=i686-w64-mingw32-c++-posix
endif
endif

CXXFLAGS += -Wextra -Wshadow
Expand Down

0 comments on commit 1e8836d

Please sign in to comment.