[PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Marat Radchenko
To ease cross-compilation process, introduce a single variable with the prefix to all compiler-related executables. Signed-off-by: Marat Radchenko ma...@slonopotamus.org --- Makefile | 13 + config.mak.uname | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Jonathan Nieder
Hi, Marat Radchenko wrote: +# Define CROSS_COMPILE to specify the prefix used for all executables used +# during compilation. Only gcc and related bin-utils executables +# are prefixed with $(CROSS_COMPILE). Please include an example. # Define CROSS_COMPILE=foo- if your compiler and

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Felipe Contreras
Marat Radchenko wrote: On Mon, Apr 28, 2014 at 12:37:42PM -0500, Felipe Contreras wrote: +CC = $(CROSS_COMPILE)cc Nice. Actually, not. You still have to override CC because it is $(CROSS_COMPILE)*g*cc. Any thoughts how to handle this? Tell mingw to fix this? My distribution (Arch

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Marat Radchenko
On Mon, Apr 28, 2014 at 12:37:42PM -0500, Felipe Contreras wrote: +CC = $(CROSS_COMPILE)cc Nice. Actually, not. You still have to override CC because it is $(CROSS_COMPILE)*g*cc. Any thoughts how to handle this? - RC = windres -O coff + RC = $(CROSS_COMPILE)windres -O coff I

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Felipe Contreras
Jonathan Nieder wrote: Marat Radchenko wrote: Does the effect of this setting depend on whether CC=gcc (i.e., is the Makefile checking the value of CC and ignoring CROSS_COMPILE when it is e.g. the Intel compiler)? If the user is doing 'make CC=gcc', the CROSS_COMPILE setting shouldn't be

RE: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Felipe Contreras
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 =

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Marat Radchenko
On Mon, Apr 28, 2014 at 01:45:04PM -0700, Jonathan Nieder wrote: I'm not really sure what in particular you're pointing to in that page. If you have a more specific question about what '?=' means, could you say it? Woops. I guess I need some sleep. Confused '?=' with ':='. -- To unsubscribe

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Jonathan Nieder
Hi, Marat Radchenko wrote: On Mon, Apr 28, 2014 at 09:25:36AM -0700, Jonathan Nieder wrote: -STRIP ?= strip +STRIP = $(CROSS_COMPILE)strip Before, STRIP from the environment took precedence over STRIP from the makefile. Switching to the more usual 'environment can't be trusted'

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Jonathan Nieder
Marat Radchenko wrote: On Mon, Apr 28, 2014 at 12:37:42PM -0500, Felipe Contreras wrote: +CC = $(CROSS_COMPILE)cc Nice. Actually, not. You still have to override CC because it is $(CROSS_COMPILE)*g*cc. Any thoughts how to handle this? One possibility would be something like ifdef

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Felipe Contreras
Jonathan Nieder wrote: Marat Radchenko wrote: On Mon, Apr 28, 2014 at 12:37:42PM -0500, Felipe Contreras wrote: +CC = $(CROSS_COMPILE)cc Nice. Actually, not. You still have to override CC because it is $(CROSS_COMPILE)*g*cc. Any thoughts how to handle this? One possibility