[01/14] m68k: Use cc-cross-prefix
diff mbox series

Message ID 20080127123355.557539057@mail.of.borg
State New, archived
Headers show
Series
  • M68k patches for 2.6.25
Related show

Commit Message

Geert Uytterhoeven Jan. 27, 2008, 12:32 p.m. UTC
From: Geert Uytterhoeven <geert@linux-m68k.org>

m68k: Use cc-cross-prefix

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 arch/m68k/Makefile |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Patch
diff mbox series

--- 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