From patchwork Mon Oct 16 17:12:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10009373 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 E7531601E7 for ; Mon, 16 Oct 2017 17:13:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE44E28668 for ; Mon, 16 Oct 2017 17:13:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C18892866B; Mon, 16 Oct 2017 17:13:51 +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=-4.7 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID, URIBL_SBL 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 48FCF28668 for ; Mon, 16 Oct 2017 17:13:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754924AbdJPRNu (ORCPT ); Mon, 16 Oct 2017 13:13:50 -0400 Received: from mail-it0-f43.google.com ([209.85.214.43]:52032 "EHLO mail-it0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754565AbdJPRNq (ORCPT ); Mon, 16 Oct 2017 13:13:46 -0400 Received: by mail-it0-f43.google.com with SMTP id o135so2012513itb.0 for ; Mon, 16 Oct 2017 10:13:45 -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=n4fD5EKKv86PDFpuOkvn8otKSvbynOn1NEsYbxTy48c=; b=iu+ajAMJyfjdMcBNlMch3pQk39ejwx7+ORYcaKIa+NyTG7+f+f+8/CPHYvUmKGwsSk dy6+1jwIWIyN37NuL8QAy2WyZ9Y72Pr/lcZH+gdVChze57ddQKU9Wiy4yd9nyqDJhJ3n 7cqILlntt29kSBAy2P6wGDuZpORZxLXlzAhak= 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=n4fD5EKKv86PDFpuOkvn8otKSvbynOn1NEsYbxTy48c=; b=sXeglgJsz/EAM6xoljW4y4PHgXSMFPPsLNbA8mt3WBXe4p7/VMQs82IjPzVvWCogR8 IVM3ja7IqSXO7JeF59QG5BCFSVR+TGSma5Fd4HrTAEi+qwEm5cmZv34yRiwbt3Qgv6GD 27B9qRE7EsRndiZUyrKAKOFRJ4XK7mOz5+kqUT7HCyn2ONanrHFQRxkfMWacHMQmU1lx lNmnfvdTtHNaLcf/L4FKIR7pDnYRfOrF66/jTn68BEPTK1vNE7QLgIQ5A9LcIrltDV/c vByC8j51vshmfqentTFU9ZR/XISpL0i/3eDNBjUebDELFYCyOj2sCOtwkSk4/dfZ9Mbk 56gg== X-Gm-Message-State: AMCzsaX3917zDhZF2Dz4+fG+6a6tCjH59Hp2kEGsGZWSeAHgEv7OowQ9 qpeDWkDsQoL86VYIDiq9npQbhg== X-Google-Smtp-Source: ABhQp+QmUE4oo6nTnxgtacpZmfirIdjLkqjt3yhc54Cm9qw8C7+qZRo2yIYi+7hc6pSvmklTx3olzQ== X-Received: by 10.36.70.76 with SMTP id j73mr1932497itb.32.1508174025444; Mon, 16 Oct 2017 10:13:45 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.112.154]) by smtp.gmail.com with ESMTPSA id h95sm3848849ioi.36.2017.10.16.10.13.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Oct 2017 10:13:44 -0700 (PDT) From: Douglas Anderson To: yamada.masahiro@socionext.com Cc: groeck@chromium.org, sjg@chromium.org, briannorris@chromium.org, mingo@kernel.org, Douglas Anderson , Michal Marek , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH v4 2/2] kbuild: Cache a few more calls to the compiler Date: Mon, 16 Oct 2017 10:12:46 -0700 Message-Id: <20171016171246.15712-3-dianders@chromium.org> X-Mailer: git-send-email 2.15.0.rc0.271.g36b669edcc-goog In-Reply-To: <20171016171246.15712-1-dianders@chromium.org> References: <20171016171246.15712-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 Tested-by: Ingo Molnar Tested-by: Guenter Roeck --- Changes in v4: None Changes in v3: - Add Tested-by for Ingo and Guenter since v2 and v3 are very similar 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 a2d715d7a327..5c82cca84d29 100644 --- a/Makefile +++ b/Makefile @@ -638,7 +638,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 @@ -774,7 +774,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