From patchwork Wed Oct 11 16:19:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10000005 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 544D560216 for ; Wed, 11 Oct 2017 16:20:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 399F228AC9 for ; Wed, 11 Oct 2017 16:20:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DBB028AD2; Wed, 11 Oct 2017 16:20:50 +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 ABA5128AAC for ; Wed, 11 Oct 2017 16:20:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757111AbdJKQTr (ORCPT ); Wed, 11 Oct 2017 12:19:47 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:50432 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756716AbdJKQTo (ORCPT ); Wed, 11 Oct 2017 12:19:44 -0400 Received: by mail-pf0-f171.google.com with SMTP id m63so1345757pfk.7 for ; Wed, 11 Oct 2017 09:19:44 -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=KQBCkRWB0cQlWhuJjYQu+FUDP+g0HnmgNTW57zG7Jhs=; b=HklujXfiQEzvkrU8TyO5xRlWaX5YuqBKu/zVb3zcyGTOtrw+tEJb8jcsAbqAAtluUX caIoaPMnFVEBaZxgssV89QSG0Yzb2QrMHpsbQj4zT8hVkjjqKMLrihs/Xb/1T6pgHJXs L0fY5Qbq7HTwonxLIpHRUOp2+Pd9O6Xoh8ZxA= 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=KQBCkRWB0cQlWhuJjYQu+FUDP+g0HnmgNTW57zG7Jhs=; b=PTkWUWKFFjDKppf0VA2Y4A7VjAjDkfAAxdr205Ad0NTcRm7lVkNgEQSw1/wLa6GT0b 4/iDM3I6FqumsYRNUpZGryyHmkYcUxncAVjLeEUIOzNtY02RwjXsbI15zcDTO9eWEmrS nC/+SbiWg6rqhslKqK8JH+x5c6by/ZEYZE14iHpV1LmX2KuP9zbVLlCzDwvGyd4y07Vv rIVX8QuMGS5CI2LFbV9NGjwujp0v/7SUyRvh0SC4ZiHZ95l7hCArtOFhmspIm4pYidXJ mUB9HUOEtgfmV9cPBRL1CKeVDZgl20IR0Bxhlu7rbuue06rPQMjVaucEFSOE3aBnKHy0 JZ7w== X-Gm-Message-State: AMCzsaUK7JDwjPzLwTzE5Dap0VHwK5ZWgudBb19KHMYbnA6ko5G+u80Y 5gjofnqHgkjcmdvaUxHW01AGFw== X-Google-Smtp-Source: AOwi7QCF8Blvlbkv+X4SVuNNbJAhRvh4lYNBTarTWzSrpnJzgHR0QQVkReZCMGJ4g4PQe1NGbc2NRA== X-Received: by 10.84.233.66 with SMTP id k2mr90358plt.45.1507738783998; Wed, 11 Oct 2017 09:19:43 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.112.154]) by smtp.gmail.com with ESMTPSA id c127sm28365403pga.34.2017.10.11.09.19.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Oct 2017 09:19:43 -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 v3 2/2] kbuild: Cache a few more calls to the compiler Date: Wed, 11 Oct 2017 09:19:24 -0700 Message-Id: <20171011161924.11386-3-dianders@chromium.org> X-Mailer: git-send-email 2.15.0.rc0.271.g36b669edcc-goog In-Reply-To: <20171011161924.11386-1-dianders@chromium.org> References: <20171011161924.11386-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 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 29c06eacf491..517d69cf30f8 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