Skip to content

Commit

Permalink
m68k: Setup CROSS_COMPILE at the top
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven committed May 16, 2012
1 parent c663600 commit f25e918
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions arch/m68k/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@

KBUILD_DEFCONFIG := multi_defconfig

ifneq ($(SUBARCH),$(ARCH))
ifeq ($(CROSS_COMPILE),)
CROSS_COMPILE := $(call cc-cross-prefix, \
m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
endif
endif

#
# Enable processor type. Ordering of these is important - we want to
# use the minimum processor type of the range we support. The logic
Expand Down Expand Up @@ -62,12 +69,6 @@ endif

LDFLAGS := -m m68kelf
KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
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
LDFLAGS_vmlinux = -N
Expand Down

0 comments on commit f25e918

Please sign in to comment.