From patchwork Mon Jul 9 08:20:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 10513849 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 727ED6032A for ; Mon, 9 Jul 2018 08:20:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 618D328A5F for ; Mon, 9 Jul 2018 08:20:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FDC828A72; Mon, 9 Jul 2018 08:20:46 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 E030228A5F for ; Mon, 9 Jul 2018 08:20:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932597AbeGIIUp (ORCPT ); Mon, 9 Jul 2018 04:20:45 -0400 Received: from s3.sipsolutions.net ([144.76.63.242]:55016 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932231AbeGIIUp (ORCPT ); Mon, 9 Jul 2018 04:20:45 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1fcRPW-000817-UD; Mon, 09 Jul 2018 10:20:43 +0200 From: Johannes Berg To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , Johannes Berg Subject: [PATCH] build: avoid evaluating cc-ifversion for ever objtool invocation Date: Mon, 9 Jul 2018 10:20:36 +0200 Message-Id: <20180709082036.11190-1-johannes@sipsolutions.net> X-Mailer: git-send-email 2.14.4 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 From: Johannes Berg To speed up the build a little bit, avoid evaluating cc-ifversion for every objtool invocation. The variable needs to be evaluated every time it's used because of the $(if $(part-of-module)...) in it, but we don't need to call out to the compiler to get its version every time. Signed-off-by: Johannes Berg --- scripts/Makefile.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index e7889f486ca1..4f4557bc96f0 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -257,7 +257,8 @@ endif ifdef CONFIG_GCOV_KERNEL objtool_args += --no-unreachable else -objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable) +_no_unreachable_lt_0405 := $(call cc-ifversion, -lt, 0405, --no-unreachable) +objtool_args += $(_no_unreachable_lt_0405) endif ifdef CONFIG_RETPOLINE ifneq ($(RETPOLINE_CFLAGS),)