diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-05-12 16:14:36 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-05-16 08:02:04 -0400 |
commit | f25e918e3546477948be999c3a7d56b316d74e4b (patch) | |
tree | ea26c596f98814d983f65ab3d91d3facac738f4d /arch/m68k/Makefile | |
parent | c663600584a596b5e66258cc10716fb781a5c2c9 (diff) |
m68k: Setup CROSS_COMPILE at the top
CROSS_COMPILE must be setup before using e.g. cc-option (and a few other
as-*, cc-*, ld-* macros), else they will check against the wrong compiler
when cross-compiling, and may invoke the cross compiler with wrong or
suboptimal compiler options.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer<gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/Makefile')
-rw-r--r-- | arch/m68k/Makefile | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index cf318f20c64d..41b3bc926bb1 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile | |||
@@ -16,6 +16,13 @@ | |||
16 | 16 | ||
17 | KBUILD_DEFCONFIG := multi_defconfig | 17 | KBUILD_DEFCONFIG := multi_defconfig |
18 | 18 | ||
19 | ifneq ($(SUBARCH),$(ARCH)) | ||
20 | ifeq ($(CROSS_COMPILE),) | ||
21 | CROSS_COMPILE := $(call cc-cross-prefix, \ | ||
22 | m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) | ||
23 | endif | ||
24 | endif | ||
25 | |||
19 | # | 26 | # |
20 | # Enable processor type. Ordering of these is important - we want to | 27 | # Enable processor type. Ordering of these is important - we want to |
21 | # use the minimum processor type of the range we support. The logic | 28 | # use the minimum processor type of the range we support. The logic |
@@ -62,12 +69,6 @@ endif | |||
62 | 69 | ||
63 | LDFLAGS := -m m68kelf | 70 | LDFLAGS := -m m68kelf |
64 | KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds | 71 | KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds |
65 | ifneq ($(SUBARCH),$(ARCH)) | ||
66 | ifeq ($(CROSS_COMPILE),) | ||
67 | CROSS_COMPILE := $(call cc-cross-prefix, \ | ||
68 | m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) | ||
69 | endif | ||
70 | endif | ||
71 | 72 | ||
72 | ifdef CONFIG_SUN3 | 73 | ifdef CONFIG_SUN3 |
73 | LDFLAGS_vmlinux = -N | 74 | LDFLAGS_vmlinux = -N |