From patchwork Tue Sep 26 17:55:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 9972419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 08E09602BD for ; Tue, 26 Sep 2017 17:56:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9BFD28C33 for ; Tue, 26 Sep 2017 17:56:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE9F828D42; Tue, 26 Sep 2017 17:56:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90CF228C33 for ; Tue, 26 Sep 2017 17:56:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966396AbdIZRzy (ORCPT ); Tue, 26 Sep 2017 13:55:54 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:56143 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967636AbdIZRzt (ORCPT ); Tue, 26 Sep 2017 13:55:49 -0400 Received: by mail-pf0-f169.google.com with SMTP id r71so5896868pfe.12 for ; Tue, 26 Sep 2017 10:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1HNh3NoXOc8DMIXuF4hLi6ERdTSIoMtOkM6TPx3h32o=; b=AHh+Odz2sZJXrTETifD8cBCPCpUo7VrbGsVM3yvO4cOIc4HBYj5WbLJBYMEUXeJ/bu wrhkl3QdUP6qWKYsvKIRBHW3UvY71XD/0Gq1b+UhLe+F8uCU4qRYie+eMpGatAt2PHc/ MqNHd7e96MRD+PytB2h1zrlXEcBGHOzCcQc6U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1HNh3NoXOc8DMIXuF4hLi6ERdTSIoMtOkM6TPx3h32o=; b=FwlIn6dnkpXuukBT1MyzKg+0Oc1fP9ux26s46rLJwAp8mYeyBEpNiCOpn8jxsw3wt/ /rJ24H1c5m63+WM94QbUdkZuLlsOHdonJ/2H7Soh5Jhw6i2HfprAvV0nyV0XYr4Pa4nl dsSbmNAuNSzl672Mc01kl6fjQzKvXpWu8biNFjBbR4gC+gfiuBaZoaFFeqhDAeiRW7S/ Lc7hqYeugLqbrTt1jkn4JYGSsOMh9ZwRcdaF6v8eSMxxkV2Ge7c7041QcmSPesU1nT7M OQBf9b0bdgH+p+FRfwRBjwmrqRZG8Ft0vFp7BAmW2UIkG4Ia9wugzJIy0NVQAiT/hBYp uv/A== X-Gm-Message-State: AHPjjUiOL4yFmNzSr+/8JzH8c+rHIdl1l/Fk4PM3kvGizsp+7P0tXvfg Ti090kOOdX2ghaKTqWTzdzbEBA== X-Google-Smtp-Source: AOwi7QBok+v1c5ksVESP502puk544grS2L1wH5VuONw1uIummpOGHTBXUZG5e9BJMt6f9kvNO+05rg== X-Received: by 10.101.81.10 with SMTP id f10mr11473712pgq.82.1506448548421; Tue, 26 Sep 2017 10:55:48 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.112.154]) by smtp.gmail.com with ESMTPSA id z89sm17038200pff.13.2017.09.26.10.55.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Sep 2017 10:55:47 -0700 (PDT) From: Douglas Anderson To: yamada.masahiro@socionext.com, mmarek@suse.com Cc: groeck@chromium.org, briannorris@chromium.org, Douglas Anderson , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [RFC PATCH 2/2] kbuild: Cache a few more calls to the compiler Date: Tue, 26 Sep 2017 10:55:08 -0700 Message-Id: <20170926175508.29950-3-dianders@chromium.org> X-Mailer: git-send-email 2.14.1.821.g8fa685d3b7-goog In-Reply-To: <20170926175508.29950-1-dianders@chromium.org> References: <20170926175508.29950-1-dianders@chromium.org> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Douglas Anderson --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d1119941261c..7b7342d79771 100644 --- a/Makefile +++ b/Makefile @@ -652,7 +652,10 @@ KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0409, \ KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0) # check for 'asm goto' -ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y) +ASM_GOTO = $(call cached-val,$(call __sanitize-opt,asm_goto_$(CC)),\ + $$(shell $(CONFIG_SHELL) \ + $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS))) +ifeq ($(ASM_GOTO), y) KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO endif @@ -788,7 +791,9 @@ KBUILD_CFLAGS += $(call cc-option,-fdata-sections,) endif # arch Makefile may override CC so keep this after arch Makefile is included -NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) +NOSTDINC_FLAGS += -nostdinc -isystem \ + $(call cached-val,$(call __sanitize-opt,cc_include_$(CC)),\ + $$(shell $(CC) -print-file-name=include)) CHECKFLAGS += $(NOSTDINC_FLAGS) # warn about C99 declaration after statement