Skip to content

Commit

Permalink
win32/GNUmakefile: Get CPU arch from target triplet
Browse files Browse the repository at this point in the history
MinGW-w64 target triplet is different in GCC and Clang/llvm
  • Loading branch information
Biswa96 committed Jun 11, 2021
1 parent 817a8f4 commit 422ec89
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions win32/GNUmakefile
Expand Up @@ -408,12 +408,16 @@ CCHOME := $(VCINSTALLDIR)
endif
endif

# Check processor architecture from target triplet
# possible values:
# gcc: i686-w64-mingw32, x86_64-w64-mingw32
# clang: i686-w64-windows-gnu, x86_64-w64-windows-gnu
ifeq ($(CCTYPE),GCC)
ifeq ($(GCCTARGET),x86_64-w64-mingw32)
ifeq (x86_64, $(findstring x86_64, $(GCCTARGET)))
WIN64 := define
PROCESSOR_ARCHITECTURE := x64
endif
ifeq ($(GCCTARGET),i686-w64-mingw32)
ifeq (i686, $(findstring i686, $(GCCTARGET)))
WIN64 := undef
PROCESSOR_ARCHITECTURE := x86
endif
Expand Down

0 comments on commit 422ec89

Please sign in to comment.