Skip to content

Commit d11101e

Browse files
proukornewvondele
authored andcommitted
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 #3860 No functional change
1 parent 7678d63 commit d11101e

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/Makefile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -368,22 +368,18 @@ endif
368368
ifeq ($(COMP),mingw)
369369
comp=mingw
370370

371-
ifeq ($(KERNEL),Linux)
372-
ifeq ($(bits),64)
373-
ifeq ($(shell which x86_64-w64-mingw32-c++-posix),)
374-
CXX=x86_64-w64-mingw32-c++
375-
else
376-
CXX=x86_64-w64-mingw32-c++-posix
377-
endif
371+
ifeq ($(bits),64)
372+
ifeq ($(shell which x86_64-w64-mingw32-c++-posix 2> /dev/null),)
373+
CXX=x86_64-w64-mingw32-c++
378374
else
379-
ifeq ($(shell which i686-w64-mingw32-c++-posix),)
380-
CXX=i686-w64-mingw32-c++
381-
else
382-
CXX=i686-w64-mingw32-c++-posix
383-
endif
375+
CXX=x86_64-w64-mingw32-c++-posix
384376
endif
385377
else
386-
CXX=g++
378+
ifeq ($(shell which i686-w64-mingw32-c++-posix 2> /dev/null),)
379+
CXX=i686-w64-mingw32-c++
380+
else
381+
CXX=i686-w64-mingw32-c++-posix
382+
endif
387383
endif
388384

389385
CXXFLAGS += -pedantic -Wextra -Wshadow

0 commit comments

Comments
 (0)