From: Geert Uytterhoeven Date: Tue, 5 Feb 2008 06:30:17 +0000 (-0800) Subject: m68k: Use cc-cross-prefix X-Git-Tag: v2.6.25-rc1~885 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f7127db311fe3e0ea6a2a332833f85abab6cb4b;p=platform%2Fkernel%2Flinux-3.10.git m68k: Use cc-cross-prefix The cc-cross-prefix is new and developed on request from Geert Uytterhoeven. With cc-cross-prefix it is now much easier to have a few default cross compile prefixes and defaulting to none - if none of them were present. ARCH maintainers are expected to pick up this feature soon. Signed-off-by: Geert Uytterhoeven Cc: Andreas Schwab Cc: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index 4a1bd44..2cba605 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile @@ -13,16 +13,15 @@ # Copyright (C) 1994 by Hamish Macdonald # -# test for cross compiling -COMPILE_ARCH = $(shell uname -m) - # override top level makefile AS += -m68020 LDFLAGS := -m m68kelf LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds -ifneq ($(COMPILE_ARCH),$(ARCH)) - # prefix for cross-compiling binaries - CROSS_COMPILE = m68k-linux-gnu- +ifneq ($(SUBARCH),$(ARCH)) + ifeq ($(CROSS_COMPILE),) + CROSS_COMPILE := $(call cc-cross-prefix, \ + m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) + endif endif ifdef CONFIG_SUN3