From patchwork Thu Sep 26 02:17:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 278085 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 6EAAF2C00A4 for ; Thu, 26 Sep 2013 12:18:23 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1C2A24A05E; Thu, 26 Sep 2013 04:18:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JB9Ir96k+Dns; Thu, 26 Sep 2013 04:18:19 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 690844A090; Thu, 26 Sep 2013 04:18:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 592754A05E for ; Thu, 26 Sep 2013 04:18:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1OnbIFWaoHmP for ; Thu, 26 Sep 2013 04:18:02 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 7FA444A090 for ; Thu, 26 Sep 2013 04:17:54 +0200 (CEST) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile11) with ESMTP id r8Q2HoZJ014373; Thu, 26 Sep 2013 11:17:50 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili16) with ESMTP id r8Q2HoL16718; Thu, 26 Sep 2013 11:17:50 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi16) id r8Q2HoGN012967; Thu, 26 Sep 2013 11:17:50 +0900 Received: from poodle by lomi16.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id r8Q2HoiY012938; Thu, 26 Sep 2013 11:17:50 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 77B0F2743A5C; Thu, 26 Sep 2013 11:17:50 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 26 Sep 2013 11:17:46 +0900 Message-Id: <1380161866-12232-1-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.1.2 Cc: Tom Rini Subject: [U-Boot] [PATCH] config.mk: enable -fstack-usage only when it is desired X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de As far as I know, gcc does not support -fstack-usage for some targets such as blackfin, m68k, microblaze, etc. If -fstack-usage option is given for those targets, gcc displays a warning message as follows: warning: -fstack-usage not supported for this target [enabled by default] But it still exits with status 0. So, # Report stack usage if supported CFLAGS_STACK := $(call cc-option,-fstack-usage) CFLAGS += $(CFLAGS_STACK) does not work as we expect because cc-option sees exit status to judge whether the given option is supported or not. To suppress warnings for such targets that -fstack-usage is not supported, this commit surrounds the concerned lines with ifdef CONFIG_CC_STACKUSAGE .. endif. Signed-off-by: Masahiro Yamada Cc: Tom Rini --- config.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.mk b/config.mk index 48913f6..d405ab4 100644 --- a/config.mk +++ b/config.mk @@ -278,9 +278,9 @@ CFLAGS_WARN := $(call cc-option,-Wno-format-nonliteral) \ $(call cc-option,-Wno-format-security) CFLAGS += $(CFLAGS_WARN) -# Report stack usage if supported -CFLAGS_STACK := $(call cc-option,-fstack-usage) -CFLAGS += $(CFLAGS_STACK) +ifdef CONFIG_CC_STACKUSAGE +CFLAGS += $(call cc-option,-fstack-usage) +endif BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%))