diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2008-02-05 01:30:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:23 -0500 |
commit | 6f7127db311fe3e0ea6a2a332833f85abab6cb4b (patch) | |
tree | 3e87df2a1c0d0cf4fb9bc569bea79daf40802a7d /arch/m68k/Makefile | |
parent | 3506e0c49a5ceba72c0405d1a470184c2d6705f7 (diff) |
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>
Diffstat (limited to 'arch/m68k/Makefile')
-rw-r--r-- | arch/m68k/Makefile | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index 4a1bd44ff162..2cba605cb59d 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile | |||
@@ -13,16 +13,15 @@ | |||
13 | # Copyright (C) 1994 by Hamish Macdonald | 13 | # Copyright (C) 1994 by Hamish Macdonald |
14 | # | 14 | # |
15 | 15 | ||
16 | # test for cross compiling | ||
17 | COMPILE_ARCH = $(shell uname -m) | ||
18 | |||
19 | # override top level makefile | 16 | # override top level makefile |
20 | AS += -m68020 | 17 | AS += -m68020 |
21 | LDFLAGS := -m m68kelf | 18 | LDFLAGS := -m m68kelf |
22 | LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds | 19 | LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds |
23 | ifneq ($(COMPILE_ARCH),$(ARCH)) | 20 | ifneq ($(SUBARCH),$(ARCH)) |
24 | # prefix for cross-compiling binaries | 21 | ifeq ($(CROSS_COMPILE),) |
25 | CROSS_COMPILE = m68k-linux-gnu- | 22 | CROSS_COMPILE := $(call cc-cross-prefix, \ |
23 | m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) | ||
24 | endif | ||
26 | endif | 25 | endif |
27 | 26 | ||
28 | ifdef CONFIG_SUN3 | 27 | ifdef CONFIG_SUN3 |