From: Felipe Contreras Date: Mon, 28 Apr 2014 17:37:42 GMT Subject: RE: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable Message-ID: <535e91e6c69eb_4565148331047@nysa.notmuch> In-Reply-To: <1398693097-24651-5-git-send-email-marat@slonopotamus.org> Marat Radchenko wrote: > diff --git a/Makefile b/Makefile > index 74a929b..24befc2 100644 > --- a/Makefile > +++ b/Makefile > @@ -401,8 +404,11 @@ htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir)) > > export prefix bindir sharedir sysconfdir gitwebdir localedir > > -CC = cc > -AR = ar > +AR = $(CROSS_COMPILE)ar > +CC = $(CROSS_COMPILE)cc > +GCOV = $(CROSS_COMPILE)gcov > +STRIP = $(CROSS_COMPILE)strip Nice. > diff --git a/config.mak.uname b/config.mak.uname > index 5d301da..6c2e6df 100644 > --- a/config.mak.uname > +++ b/config.mak.uname > @@ -511,7 +511,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) > EXTLIBS += -lws2_32 > GITLIBS += git.res > PTHREAD_LIBS = > - RC = windres -O coff > + RC = $(CROSS_COMPILE)windres -O coff I don't think this is the best. We should probably have this in the Makefile: RC = $(CROSS_COMPILE)windres And then config.mak.uname should have RCFLAGS += -O coff > NATIVE_CRLF = YesPlease > X = .exe > SPARSE_FLAGS = -Wno-one-bit-signed-bitfield -- Felipe Contreras