From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven 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 Message-ID: <1336855148-18817-1-git-send-email-geert@linux-m68k.org> Return-path: Sender: linux-kbuild-owner@vger.kernel.org To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Geert Uytterhoeven , Andi Kleen , "H. Peter Anvin" , Michal Marek , linux-kbuild@vger.kernel.org List-Id: linux-arch.vger.kernel.org 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 Cc: Andi Kleen Cc: H. Peter Anvin Cc: Michal Marek 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gerard.telenet-ops.be ([195.130.132.48]:50581 "EHLO gerard.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756018Ab2ELUjR (ORCPT ); Sat, 12 May 2012 16:39:17 -0400 From: Geert Uytterhoeven 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 Message-ID: <1336855148-18817-1-git-send-email-geert@linux-m68k.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Geert Uytterhoeven , Andi Kleen , "H. Peter Anvin" , Michal Marek , linux-kbuild@vger.kernel.org Message-ID: <20120512203905.fQ48NkKnO7Rvo7y4Pk3xMaMfSu7RmbAgqhwXDGa2vl0@z> 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 Cc: Andi Kleen Cc: H. Peter Anvin Cc: Michal Marek 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