diff --git a/Makefile b/Makefile index d65d9bf6..799780bf 100644 --- a/Makefile +++ b/Makefile @@ -514,13 +514,13 @@ ifdef MINGW endif ifndef CC - CC=$(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \ - $(call bin_path, $(MINGW_PREFIX)-gcc))) + CC=$(firstword $(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \ + $(call bin_path, $(MINGW_PREFIX)-gcc)))) endif ifndef WINDRES - WINDRES=$(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \ - $(call bin_path, $(MINGW_PREFIX)-windres))) + WINDRES=$(firstword $(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \ + $(call bin_path, $(MINGW_PREFIX)-windres)))) endif else # Some MinGW installations define CC to cc, but don't actually provide cc,