linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
@ 2012-05-12 20:39 Geert Uytterhoeven
  2012-05-12 20:39 ` [PATCH 2/4] m68k: Setup CROSS_COMPILE at the top Geert Uytterhoeven
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2012-05-12 20:39 UTC (permalink / raw)
  To: linux-kernel, linux-arch
  Cc: Geert Uytterhoeven, Andi Kleen, H. Peter Anvin, Michal Marek,
	linux-kbuild

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>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d17a616..77355ba 100644
--- 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
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-09-10 20:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-12 20:39 [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile Geert Uytterhoeven
2012-05-12 20:39 ` [PATCH 2/4] m68k: Setup CROSS_COMPILE at the top Geert Uytterhoeven
2012-05-13 11:38   ` Greg Ungerer
2012-05-12 20:39 ` [PATCH 3/4] sh: " Geert Uytterhoeven
2012-05-12 20:39 ` [PATCH 4/4] xtensa: " Geert Uytterhoeven
2012-09-09  8:20   ` Geert Uytterhoeven
2012-09-10 20:33     ` czankel
2012-05-13  1:01 ` [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile Andi Kleen
2012-05-20  9:27 ` Sam Ravnborg
2012-05-25 12:29   ` Michal Marek
2012-05-25 20:29     ` Sam Ravnborg
2012-06-06  9:49       ` Ingo Molnar
2012-06-15 15:10         ` Michal Marek
2012-05-25 20:32     ` H. Peter Anvin
2012-05-26 10:41       ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).