summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile44
-rw-r--r--arm_config.mk2
-rw-r--r--avr32_config.mk2
-rw-r--r--blackfin_config.mk2
-rw-r--r--i386_config.mk2
-rw-r--r--m68k_config.mk2
-rw-r--r--microblaze_config.mk2
-rw-r--r--mips_config.mk2
-rw-r--r--nios2_config.mk2
-rw-r--r--nios_config.mk2
-rw-r--r--ppc_config.mk2
-rw-r--r--sh_config.mk2
-rw-r--r--sparc_config.mk2
13 files changed, 26 insertions, 42 deletions
diff --git a/Makefile b/Makefile
index 1eb3177..4fe3232 100644
--- a/Makefile
+++ b/Makefile
@@ -151,50 +151,10 @@ ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
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
diff --git a/arm_config.mk b/arm_config.mk
index c4cf99d..a13603e 100644
--- a/arm_config.mk
+++ b/arm_config.mk
@@ -21,6 +21,8 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= arm-linux-
+
PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
LDSCRIPT := $(SRCTREE)/cpu/$(CPU)/u-boot.lds
diff --git a/avr32_config.mk b/avr32_config.mk
index 441caa4..c258b4b 100644
--- a/avr32_config.mk
+++ b/avr32_config.mk
@@ -21,5 +21,7 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= avr32-linux-
+
PLATFORM_RELFLAGS += -ffixed-r5 -fPIC -mno-init-got -mrelax
PLATFORM_LDFLAGS += --relax
diff --git a/blackfin_config.mk b/blackfin_config.mk
index 821f082..0dd2ac6 100644
--- a/blackfin_config.mk
+++ b/blackfin_config.mk
@@ -21,6 +21,8 @@
# 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)))
diff --git a/i386_config.mk b/i386_config.mk
index 9e6d37d..5fe36d5 100644
--- a/i386_config.mk
+++ b/i386_config.mk
@@ -21,4 +21,6 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= i386-linux-
+
PLATFORM_CPPFLAGS += -DCONFIG_I386 -D__I386__
diff --git a/m68k_config.mk b/m68k_config.mk
index 12bd27c..f41d1b3 100644
--- a/m68k_config.mk
+++ b/m68k_config.mk
@@ -21,5 +21,7 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= m68k-elf-
+
PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__
PLATFORM_LDFLAGS += -n
diff --git a/microblaze_config.mk b/microblaze_config.mk
index e44c79e..68e7e21 100644
--- a/microblaze_config.mk
+++ b/microblaze_config.mk
@@ -24,4 +24,6 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= mb-
+
PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
diff --git a/mips_config.mk b/mips_config.mk
index 05eb05d..c785677 100644
--- a/mips_config.mk
+++ b/mips_config.mk
@@ -21,6 +21,8 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= mips_4KC-
+
PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
#
diff --git a/nios2_config.mk b/nios2_config.mk
index 3f23b56..59931c2 100644
--- a/nios2_config.mk
+++ b/nios2_config.mk
@@ -22,5 +22,7 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= nios2-elf-
+
PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__
PLATFORM_CPPFLAGS += -ffixed-r15 -G0
diff --git a/nios_config.mk b/nios_config.mk
index 1cf0f32..3ed7170 100644
--- a/nios_config.mk
+++ b/nios_config.mk
@@ -22,4 +22,6 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= nios-elf-
+
PLATFORM_CPPFLAGS += -m32 -DCONFIG_NIOS -D__NIOS__ -ffixed-g7 -gstabs
diff --git a/ppc_config.mk b/ppc_config.mk
index c95b3b1..d91ef7f 100644
--- a/ppc_config.mk
+++ b/ppc_config.mk
@@ -21,6 +21,8 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= ppc_8xx-
+
PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
PLATFORM_LDFLAGS += -n
diff --git a/sh_config.mk b/sh_config.mk
index 407e076..67d7e9e 100644
--- a/sh_config.mk
+++ b/sh_config.mk
@@ -21,6 +21,8 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= sh4-linux-
+
PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
PLATFORM_LDFLAGS += -e $(TEXT_BASE) --defsym reloc_dst=$(TEXT_BASE)
diff --git a/sparc_config.mk b/sparc_config.mk
index 87f745f..07b528c 100644
--- a/sparc_config.mk
+++ b/sparc_config.mk
@@ -21,4 +21,6 @@
# MA 02111-1307 USA
#
+CROSS_COMPILE ?= sparc-elf-
+
PLATFORM_CPPFLAGS += -DCONFIG_SPARC -D__sparc__