From patchwork Fri Sep 27 17:57:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeroen Hofstee X-Patchwork-Id: 278659 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 1B25E2C0339 for ; Sat, 28 Sep 2013 03:57:53 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD80E4A08E; Fri, 27 Sep 2013 19:57:51 +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 ERedVuTUczOr; Fri, 27 Sep 2013 19:57:51 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 12AB64A09B; Fri, 27 Sep 2013 19:57:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C35C4A08E for ; Fri, 27 Sep 2013 19:57:38 +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 uopis4Bws4Rr for ; Fri, 27 Sep 2013 19:57:32 +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 orange.myspectrum.nl (orange.myspectrum.nl [149.210.134.247]) by theia.denx.de (Postfix) with ESMTP id 175234A09B for ; Fri, 27 Sep 2013 19:57:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by orange.myspectrum.nl (Postfix) with ESMTP id 1308081AF2; Fri, 27 Sep 2013 19:57:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at myspectrum.nl Received: from orange.myspectrum.nl ([127.0.0.1]) by localhost (orange.myspectrum.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1yXen7cTp-ua; Fri, 27 Sep 2013 19:57:24 +0200 (CEST) Received: from [10.0.0.107] (ip120-12-208-87.adsl2.static.versatel.nl [87.208.12.120]) (Authenticated sender: jeroen@myspectrum.nl) by orange.myspectrum.nl (Postfix) with ESMTPSA id 2582F81AE6; Fri, 27 Sep 2013 19:57:24 +0200 (CEST) Message-ID: <5245C703.6060907@myspectrum.nl> Date: Fri, 27 Sep 2013 19:57:23 +0200 From: Jeroen Hofstee User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Masahiro Yamada , Tom Rini References: <1380161866-12232-1-git-send-email-yamada.m@jp.panasonic.com> <5244200E.8040109@ti.com> <20130927110901.5405.AA925319@jp.panasonic.com> In-Reply-To: <20130927110901.5405.AA925319@jp.panasonic.com> Cc: u-boot@lists.denx.de Subject: Re: [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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Hello Masahiro, On 09/27/2013 04:09 AM, Masahiro Yamada wrote: > >> The problem here is that except for whatever arches don't support >> - -fstack-usage, we always want to generate this information, to assist in >> debugging stack usage problems (which can be a real problem within SPL >> for example). How about ifneq($(CONFIG_M68K)$(CONFIG_...),y) ... endif >> around it? > OK. This works. > > But I'm kind of afraid ifneq($(CONFIG_M68K)$(CONFIG_...),y) ... endif > might be too arch-specific to be written in the top config.mk. > > Instead, we can add > CONFIG_CC_STACKUSAGE=y > to arch/{arm, powerpc, x86, microblaze ...}/config.mk I guess below patch should work as well. Anyone aware of any side affects it might cause? --- Regards, Jeroen > /dev/null 2>&1; then \ echo 'CC_OPTIONS += $(strip $1)' >> $(CC_OPTIONS_CACHE_FILE); \ echo "$(1)"; fi) diff --git a/config.mk b/config.mk index 48913f6..177f685 100644 --- a/config.mk +++ b/config.mk @@ -117,7 +117,7 @@ CC_TEST_OFILE := $(OBJTREE)/include/generated/cc_test_file.o -include $(CC_OPTIONS_CACHE_FILE) cc-option-sys = $(shell mkdir -p $(dir $(CC_TEST_OFILE)); \ - if $(CC) $(CFLAGS) $(1) -S -xc /dev/null -o $(CC_TEST_OFILE) \ + if $(CC) -Werror $(CFLAGS) $(1) -S -xc /dev/null -o $(CC_TEST_OFILE) \