kbuild: fix CROSS_COMPILE settings in config.mk
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Fri, 28 Feb 2014 05:33:30 +0000 (14:33 +0900)
committerTom Rini <trini@ti.com>
Tue, 4 Mar 2014 17:15:30 +0000 (12:15 -0500)
commit9b6e2c363f2686d6f7bf61fbe58b7591b71d3e8b
treeaba046ec8f727fe744034100c5916af4186d4fd8
parenta86cf89c765d99c39b397abe3d9926ab3593f57a
kbuild: fix CROSS_COMPILE settings in config.mk

The syntax
  CROSS_COMIPLE ?= <cross_compiler_prefix>
does not work because config.mk is parsed after
exporting CROSS_COMPILE.

Like Linux Kernel's arch/$(ARCH)/Makefile,
we must write as follows:

  ifeq ($(CROSS_COMPILE),)
  CROSS_COMPILE := <cross_compiler_prefix>
  endif

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
13 files changed:
arch/arc/config.mk
arch/arm/config.mk
arch/avr32/config.mk
arch/blackfin/config.mk
arch/m68k/config.mk
arch/microblaze/config.mk
arch/mips/config.mk
arch/nds32/config.mk
arch/nios2/config.mk
arch/openrisc/config.mk
arch/powerpc/config.mk
arch/sh/config.mk
arch/sparc/config.mk