Skip to content

Commit

Permalink
Fix misdetecting 64-bit MinGW
Browse files Browse the repository at this point in the history
`gcc -dumpmachine` returns `x86_64-w64-mingw32` on 64-bit MinGW-w64.
  • Loading branch information
k-takata committed Oct 6, 2015
1 parent b9d63c9 commit b83e97c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions Makefile
Expand Up @@ -2,13 +2,14 @@ ifeq ($(OS),Windows_NT)
# Need to figure out if Cygwin/Mingw is installed
SYS := $(shell gcc -dumpmachine)
ifeq ($(findstring cygwin, $(SYS)),cygwin)
PLATFORM = cygwin
endif
ifeq ($(findstring mingw32, $(SYS)),mingw32)
PLATFORM = mingw32
endif
ifeq ($(findstring mingw64, $(SYS)),mingw64)
PLATFORM = mingw64
PLATFORM = cygwin
endif
ifeq ($(findstring mingw, $(SYS)),mingw)
ifeq ($(findstring x86_64, $(SYS)),x86_64)
PLATFORM = mingw64
else
PLATFORM = mingw32
endif
endif
else
# Grab the output of `uname -s` and switch to set the platform
Expand Down
2 changes: 1 addition & 1 deletion tools/appveyor.bat
Expand Up @@ -71,7 +71,7 @@ bash -lc ""
bash -lc "for i in {1..3}; do update-core && break || sleep 15; done"
bash -lc "for i in {1..3}; do pacman --noconfirm -Su mingw-w64-%MSYS2_ARCH%-{gcc,libiconv} automake autoconf make dos2unix && break || sleep 15; done"

bash -lc "make -f make_mingw%BIT%.mak"
bash -lc "make"

@echo off
goto :eof
Expand Down

0 comments on commit b83e97c

Please sign in to comment.