From d8afce680510ab664f4e575d019fe045b99228c1 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 8 May 2016 20:08:07 -0500 Subject: [PATCH] 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" --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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,