From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Andi Kleen <ak@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com>,
Michal Marek <mmarek@suse.cz>,
linux-kbuild@vger.kernel.org
Subject: [PATCH 1/4] [-next] Makefile: Do not call cc-option before including the arch's Makefile
Date: Sat, 12 May 2012 22:39:05 +0200 [thread overview]
Message-ID: <1336855148-18817-1-git-send-email-geert@linux-m68k.org> (raw)
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
next reply other threads:[~2012-05-12 20:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-12 20:39 Geert Uytterhoeven [this message]
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-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-05-12 20:39 ` Geert Uytterhoeven
2012-09-09 8:20 ` 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-20 9:27 ` Sam Ravnborg
2012-05-25 12:29 ` Michal Marek
2012-05-25 20:29 ` Sam Ravnborg
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336855148-18817-1-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).