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 <geert@linux-m68k.org>
Cc: Andreas Schwab <schwab@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Geert Uytterhoeven 2008-02-04 22:30:17 -08:00 committed by Linus Torvalds
parent 3506e0c49a
commit 6f7127db31
1 changed files with 5 additions and 6 deletions

View File

@ -13,16 +13,15 @@
# Copyright (C) 1994 by Hamish Macdonald # Copyright (C) 1994 by Hamish Macdonald
# #
# test for cross compiling
COMPILE_ARCH = $(shell uname -m)
# override top level makefile # override top level makefile
AS += -m68020 AS += -m68020
LDFLAGS := -m m68kelf LDFLAGS := -m m68kelf
LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
ifneq ($(COMPILE_ARCH),$(ARCH)) ifneq ($(SUBARCH),$(ARCH))
# prefix for cross-compiling binaries ifeq ($(CROSS_COMPILE),)
CROSS_COMPILE = m68k-linux-gnu- CROSS_COMPILE := $(call cc-cross-prefix, \
m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
endif
endif endif
ifdef CONFIG_SUN3 ifdef CONFIG_SUN3