From patchwork Wed Oct 4 22:37:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 9985793 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 F20F2602B8 for ; Wed, 4 Oct 2017 22:38:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E45D128C2E for ; Wed, 4 Oct 2017 22:38:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D947B28C39; Wed, 4 Oct 2017 22:38:44 +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 63E3628C2E for ; Wed, 4 Oct 2017 22:38:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751171AbdJDWib (ORCPT ); Wed, 4 Oct 2017 18:38:31 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:49398 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbdJDWiU (ORCPT ); Wed, 4 Oct 2017 18:38:20 -0400 Received: by mail-pf0-f176.google.com with SMTP id l188so6981355pfc.6 for ; Wed, 04 Oct 2017 15:38:20 -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=rlY5bmS7AAg89eP+yKcQ+VL7CKLTvVqOmGw0u7Lynvg=; b=dL/Bi0dZpsArhiu3k4WlMWB2PMnrSZDdRGf3ezldUhpscFuR4Fde1btISJZgWq76+h kgvS8BkmkykMI+ay7yvlWNnL7jFiim0hsgiQLB+uRC+CL4bNCVksR1x5YkNR31gAYetb MTxJ9BfXtJSmWikv1vjj0aR/HkIk/bKxr8x8U= 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=rlY5bmS7AAg89eP+yKcQ+VL7CKLTvVqOmGw0u7Lynvg=; b=i+jc7wKUuWTWR/xGb5n8p2jelmksdWgjOfTnhfDHMggYktI0i5Yv2DNtXPlx/achmB iVi7gdbo8FwTkZCzh91ugjW1Qf2Q/TI/0BEiDnJ7uJ2aqRJE9sewHuWm7vO+cjRGXr2k eUHjfScIbqCQjzZ9T3fFYldOmqcIJ5gfwjnpP6otLFiW/tixIVQU06luthsNlZIEtG1E XT+y+4Q7NzdutZkshPhUrzjHV1dFQeylfcS7UTLn+TXD8qsPSg5DUQppV9l6Jx29qJiq PNEB++0o2SKE/FjMkRYdq28S+J8BFfgqg25J0PJev+0mD6WXim5q0kfViKzKWw6s9pst JeIA== X-Gm-Message-State: AHPjjUj/1RQLTbV1bY5r8+noprAjdZ99JFbIwGM4f0c31NCeNg4ajc+v mbj+THmZgZGOIAm4WmRlTp+wXA== X-Google-Smtp-Source: AOwi7QAxKWsRVT1Z2h9Jv+2AftSzlbkhh7VXqGaVosClnSPb8nwI+jZSK6I5FQXkw7vAqf4PcUHIng== X-Received: by 10.99.179.66 with SMTP id x2mr19391713pgt.336.1507156699473; Wed, 04 Oct 2017 15:38:19 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.112.154]) by smtp.gmail.com with ESMTPSA id h1sm24248175pgp.37.2017.10.04.15.38.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Oct 2017 15:38:18 -0700 (PDT) From: Douglas Anderson To: yamada.masahiro@socionext.com, mmarek@suse.com Cc: groeck@chromium.org, sjg@chromium.org, briannorris@chromium.org, Douglas Anderson , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH v2 2/2] kbuild: Cache a few more calls to the compiler Date: Wed, 4 Oct 2017 15:37:17 -0700 Message-Id: <20171004223717.3010-3-dianders@chromium.org> X-Mailer: git-send-email 2.14.2.920.gcf0c67979c-goog In-Reply-To: <20171004223717.3010-1-dianders@chromium.org> References: <20171004223717.3010-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 --- Changes in v2: - Abstract at a different level (like shell-cached) per Masahiro Yamada Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d1119941261c..d366bdc3da04 100644 --- a/Makefile +++ b/Makefile @@ -652,7 +652,7 @@ 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) +ifeq ($(call shell-cached,$(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y) KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO endif @@ -788,7 +788,7 @@ 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 shell-cached,$(CC) -print-file-name=include) CHECKFLAGS += $(NOSTDINC_FLAGS) # warn about C99 declaration after statement