The following patch allows to build using CROSS_COMPILE from the environment.
I have an automated system which works like this, but it chokes on MIPS when
I use it with (albeit non-standard-named) cross-compiler tools. An easy
workaround I'm using is to put CROSS_COMPILE on the make command line, but it
be nice to use the definition already in the environment when I work
manually in the system.
For past discussion of this see:
I'm not sure why the change didn't make it in back in 2003, but
if the complaint was about the use of "?=", that seems to be in use
other places, and fairly standard now.
For example, from the top level kernel Makefile:
ARCH ?= $(SUBARCH)
Signed-off-by: Tim Bird <firstname.lastname@example.org>
--- alp-linux.orig/arch/mips/Makefile 2006-05-04 12:22:17.000000000 -0700
+++ alp-linux/arch/mips/Makefile 2006-05-04 12:10:22.000000000 -0700
@@ -49,7 +49,7 @@ UTS_MACHINE := mips64
-CROSS_COMPILE = $(tool-prefix)
+CROSS_COMPILE ?= $(tool-prefix)
CHECKFLAGS-y += -D__linux__ -D__mips__ \