include $(obj)include/config.mk
export ARCH CPU BOARD VENDOR SOC
-ifndef CROSS_COMPILE
+# set default to nothing for native builds
ifeq ($(HOSTARCH),$(ARCH))
-CROSS_COMPILE =
-else
-ifeq ($(ARCH),ppc)
-CROSS_COMPILE = ppc_8xx-
-endif
-ifeq ($(ARCH),arm)
-CROSS_COMPILE = arm-linux-
-endif
-ifeq ($(ARCH),i386)
-CROSS_COMPILE = i386-linux-
-endif
-ifeq ($(ARCH),mips)
-CROSS_COMPILE = mips_4KC-
-endif
-ifeq ($(ARCH),nios)
-CROSS_COMPILE = nios-elf-
-endif
-ifeq ($(ARCH),nios2)
-CROSS_COMPILE = nios2-elf-
+CROSS_COMPILE ?=
endif
-ifeq ($(ARCH),m68k)
-CROSS_COMPILE = m68k-elf-
-endif
-ifeq ($(ARCH),microblaze)
-CROSS_COMPILE = mb-
-endif
-ifeq ($(ARCH),blackfin)
-CROSS_COMPILE = bfin-uclinux-
-endif
-ifeq ($(ARCH),avr32)
-CROSS_COMPILE = avr32-linux-
-endif
-ifeq ($(ARCH),sh)
-CROSS_COMPILE = sh4-linux-
-endif
-ifeq ($(ARCH),sparc)
-CROSS_COMPILE = sparc-elf-
-endif # sparc
-endif # HOSTARCH,ARCH
-endif # CROSS_COMPILE
-
-export CROSS_COMPILE
# load other configuration
include $(TOPDIR)/config.mk
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= arm-linux-
+
PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
LDSCRIPT := $(SRCTREE)/cpu/$(CPU)/u-boot.lds
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= avr32-linux-
+
PLATFORM_RELFLAGS += -ffixed-r5 -fPIC -mno-init-got -mrelax
PLATFORM_LDFLAGS += --relax
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= bfin-uclinux-
+
CONFIG_BFIN_CPU := $(strip $(subst ",,$(CONFIG_BFIN_CPU)))
CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE)))
CONFIG_ENV_OFFSET := $(strip $(subst ",,$(CONFIG_ENV_OFFSET)))
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= i386-linux-
+
PLATFORM_CPPFLAGS += -DCONFIG_I386 -D__I386__
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= m68k-elf-
+
PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__
PLATFORM_LDFLAGS += -n
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= mb-
+
PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= mips_4KC-
+
PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
#
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= nios2-elf-
+
PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__
PLATFORM_CPPFLAGS += -ffixed-r15 -G0
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= nios-elf-
+
PLATFORM_CPPFLAGS += -m32 -DCONFIG_NIOS -D__NIOS__ -ffixed-g7 -gstabs
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= ppc_8xx-
+
PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
PLATFORM_LDFLAGS += -n
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= sh4-linux-
+
PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
PLATFORM_LDFLAGS += -e $(TEXT_BASE) --defsym reloc_dst=$(TEXT_BASE)
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= sparc-elf-
+
PLATFORM_CPPFLAGS += -DCONFIG_SPARC -D__sparc__