sh: Hook up cc-cross-prefix support.
This implements a simple case that just iterates through the common
cases, looking at UTS_MACHINE for hints.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index c1bbae1..a47fbd2 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -101,6 +101,12 @@
-e phys_stext_shmedia
endif
+ifneq ($(SUBARCH),$(ARCH))
+ ifeq ($(CROSS_COMPILE),)
+ CROSS_COMPILE := $(call cc-cross-prefix, $(UTS_MACHINE)-linux- $(UTS_MACHINE)-linux-gnu- $(UTS_MACHINE)-unknown-linux-gnu-)
+ endif
+endif
+
ifdef CONFIG_CPU_LITTLE_ENDIAN
ld-bfd := elf32-$(UTS_MACHINE)-linux
LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64' --oformat $(ld-bfd)