Cross-compiling using mingw should only pick one gcc executable

If multiple mingw toolchains are installed, the Makefile set CC to all
present gcc executables. Pick only the first one instead of passing the
others as arguments.

"CC: /usr/bin/i686-w64-mingw32-gcc /usr/bin/i686-pc-mingw32-gcc"
This commit is contained in:
Zack Middleton 2016-05-08 20:08:07 -05:00
parent 1f6703821f
commit d8afce6805

View file

@ -514,13 +514,13 @@ ifdef MINGW
endif endif
ifndef CC ifndef CC
CC=$(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \ CC=$(firstword $(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
$(call bin_path, $(MINGW_PREFIX)-gcc))) $(call bin_path, $(MINGW_PREFIX)-gcc))))
endif endif
ifndef WINDRES ifndef WINDRES
WINDRES=$(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \ WINDRES=$(firstword $(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
$(call bin_path, $(MINGW_PREFIX)-windres))) $(call bin_path, $(MINGW_PREFIX)-windres))))
endif endif
else else
# Some MinGW installations define CC to cc, but don't actually provide cc, # Some MinGW installations define CC to cc, but don't actually provide cc,