From 90f5937373974adf4ae7216feedf5abc4d62debd Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 23 Dec 2015 09:37:59 +0100 Subject: [PATCH 1/1] Revert "Fix compiling of 32 bit binary on 64-bit Windows" This reverts commit 1e8836d921b3 Broken compile on mingw under Windows: Config: debug: 'yes' optimize: 'yes' arch: 'i386' bits: '32' prefetch: 'yes' bsfq: 'no' popcnt: 'no' sse: 'yes' pext: 'no' Flags: CXX: i686-w64-mingw32-c++ CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 -Wextra -Wshadow -g -O3 -msse LDFLAGS: -static Testing config sanity. If this fails, try 'make help' ... mingw32-make[1]: Leaving directory 'C:/stockfish/src' c:/MinGw/bin/mingw32-make ARCH=x86-32 COMP=mingw all mingw32-make[1]: Entering directory 'C:/stockfish/src' sh: C:\Program: No such file or directory i686-w64-mingw32-c++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 -Wextra -Wshadow -g -O3 -msse -c -o benchmark.o benchmark.cpp : recipe for target 'benchmark.o' failed process_begin: CreateProcess(NULL, i686-w64-mingw32-c++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 -Wextra -Wshadow -g -O3 -msse -c -o benchmark.o benchmark.cpp, ...) failed. make (e=2): Impossibile trovare il file specificato. mingw32-make[1]: *** [benchmark.o] Error 2 mingw32-make[1]: Leaving directory 'C:/stockfish/src' makefile:401: recipe for target 'build' failed mingw32-make: *** [build] Error 2 No functional change. --- src/Makefile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Makefile b/src/Makefile index ee09dc7b..4e4d3d91 100644 --- a/src/Makefile +++ b/src/Makefile @@ -160,18 +160,22 @@ endif ifeq ($(COMP),mingw) comp=mingw - ifeq ($(bits),64) - ifeq ($(shell which x86_64-w64-mingw32-c++-posix),) - CXX=x86_64-w64-mingw32-c++ + 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 else - CXX=x86_64-w64-mingw32-c++-posix + ifeq ($(shell which i686-w64-mingw32-c++-posix),) + CXX=i686-w64-mingw32-c++ + else + CXX=i686-w64-mingw32-c++-posix + endif endif else - ifeq ($(shell which i686-w64-mingw32-c++-posix),) - CXX=i686-w64-mingw32-c++ - else - CXX=i686-w64-mingw32-c++-posix - endif + CXX=g++ endif CXXFLAGS += -Wextra -Wshadow -- 2.39.2