config.mk: use correct (cross) compiler
authorWolfgang Denk <wd@denx.de>
Sat, 3 May 2008 20:25:00 +0000 (22:25 +0200)
committerWolfgang Denk <wd@denx.de>
Sat, 3 May 2008 21:06:59 +0000 (23:06 +0200)
Some config.mk files reference $(CC) to test for specific tool chain
features, so make sure $(CC) gets set before including any such
config files.

This patch replaces commit b7166e05a5 ("ColdFire: Get information from
the correct GCC").

Signed-off-by: Wolfgang Denk <wd@denx.de>
config.mk

index 22d3398ca4f1bd30caafcc60b8060140198068fe..62fc1d5ddbc1bf02a8ce73145fa490c87e67711e 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -69,27 +69,6 @@ PLATFORM_CPPFLAGS+= -D__ARM__
 endif
 endif
 
-# Load generated board configuration
-sinclude $(OBJTREE)/include/autoconf.mk
-
-ifdef  ARCH
-sinclude $(TOPDIR)/$(ARCH)_config.mk   # include architecture dependend rules
-endif
-ifdef  CPU
-sinclude $(TOPDIR)/cpu/$(CPU)/config.mk        # include  CPU  specific rules
-endif
-ifdef  SOC
-sinclude $(TOPDIR)/cpu/$(CPU)/$(SOC)/config.mk # include  SoC  specific rules
-endif
-ifdef  VENDOR
-BOARDDIR = $(VENDOR)/$(BOARD)
-else
-BOARDDIR = $(BOARD)
-endif
-ifdef  BOARD
-sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
-endif
-
 #########################################################################
 
 CONFIG_SHELL   := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -127,6 +106,31 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
 OBJDUMP = $(CROSS_COMPILE)objdump
 RANLIB = $(CROSS_COMPILE)RANLIB
 
+#########################################################################
+
+# Load generated board configuration
+sinclude $(OBJTREE)/include/autoconf.mk
+
+ifdef  ARCH
+sinclude $(TOPDIR)/$(ARCH)_config.mk   # include architecture dependend rules
+endif
+ifdef  CPU
+sinclude $(TOPDIR)/cpu/$(CPU)/config.mk        # include  CPU  specific rules
+endif
+ifdef  SOC
+sinclude $(TOPDIR)/cpu/$(CPU)/$(SOC)/config.mk # include  SoC  specific rules
+endif
+ifdef  VENDOR
+BOARDDIR = $(VENDOR)/$(BOARD)
+else
+BOARDDIR = $(BOARD)
+endif
+ifdef  BOARD
+sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
+endif
+
+#########################################################################
+
 ifneq (,$(findstring s,$(MAKEFLAGS)))
 ARFLAGS = cr
 else