]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Makefile: Do not call cc-option before including the arch's Makefile
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sat, 12 May 2012 20:39:05 +0000 (22:39 +0200)
committerMichal Marek <mmarek@suse.cz>
Fri, 15 Jun 2012 14:41:53 +0000 (16:41 +0200)
On architectures that setup CROSS_COMPILE in their arch/*/Makefile
(blackfin, h8300, m68k, mips, parisc, score, sh, tile, unicore32, xtensa),
cc-option may check against the wrong compiler, causing errors like

cc1: error: unrecognized command line option "-fno-ipa-cp-clone"

if the host gcc supports -fno-ipa-cp-clone, while the cross compiler
doesn't support that option.

Move the CONFIG_READABLE_ASM section below the inclusion of the arch's
Makefile to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Makefile

index 0d718ede9ea53949227b5beb56dcef17cb756a98..161ad0e4c1f2e47c586ebc97f32fa7220b4da9fd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -561,6 +561,8 @@ else
 KBUILD_CFLAGS  += -O2
 endif
 
+include $(srctree)/arch/$(SRCARCH)/Makefile
+
 ifdef CONFIG_READABLE_ASM
 # Disable optimizations that make assembler listings hard to read.
 # reorder blocks reorders the control in the function
@@ -571,8 +573,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
                  $(call cc-option,-fno-partial-inlining)
 endif
 
-include $(srctree)/arch/$(SRCARCH)/Makefile
-
 ifneq ($(CONFIG_FRAME_WARN),0)
 KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
 endif