Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2985613ybt; Mon, 29 Jun 2020 12:09:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3D2cEauN73ywHqFm/17o4NYsGZiRKhhuRCSzML0bLYnnFEKujp0UsB6DvPJ4NqS++4bD1 X-Received: by 2002:aa7:c655:: with SMTP id z21mr19263298edr.330.1593457757232; Mon, 29 Jun 2020 12:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593457757; cv=none; d=google.com; s=arc-20160816; b=F6ogLoSN6CJ5aIICQH6A9RnaX9rfNCg4AjtkbuYD0angP2e/YHcyqupBYl46MLQpXY V8lUKw+JH+WmZ/bAhzfoOtZA53wpqzach48GLX4uPR/GJXvHCxeQXhCGTvk9GKYAqEGw y9TXQbph+V48sfWjgOKDPhe7KbsJ21Wyst2trCfxKU1PqrbrroLV9M7GQFrKbl7m5LFT 8dopMmORNkwkgFq7yRSLOLNz8JpSpnUJBOHE4CpyPR4V8zr9WfuJVDehffrVsdTPN60Y oW/uoA9iNQANQ+wJDcWQldi7pk7h27ZEpASLq+6xaUrkfzmihbeRkKIeLXC7ZXjFoo+6 lhJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=VtcNAtz9+vSdyHLcpRszGSFyFltMjdYop8dTMaOzAHs=; b=ex9gpjYKonpd2uJdFMIIPbO2bVzjxjGTx4bGPAvL1Yi8m6rSIn3OLVE08UfAUWKU5k i7JEy5VpDfuXwvtHe9kUGqdYYlBnvMDjXEge8LGBr+fiUgUp2W5QLPI2dPkIIqWm2JQP Aglg8uEPus/mgcAKvjFx1OT56S5eiGiPvh0lFv2lZVJWjODTLw1MmJk79quw5mt0OC5C 7BL2bePRfVp6Exd705TlT0thcKTiaqwxrr1Bh7NMTMNI+Ei3ChozcnNNJPTvj1JXcqFZ R6jlbQJMz3IDVn0D5fpghBhFD20r8OooIityITGOit2IzkPP70I5dWemQY2HLvx+wkQC /ohQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si205434edy.277.2020.06.29.12.08.53; Mon, 29 Jun 2020 12:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730721AbgF2TIv (ORCPT + 99 others); Mon, 29 Jun 2020 15:08:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730506AbgF2TCm (ORCPT ); Mon, 29 Jun 2020 15:02:42 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91D10C031C64 for ; Mon, 29 Jun 2020 10:47:29 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id j11so12442816oiw.12 for ; Mon, 29 Jun 2020 10:47:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VtcNAtz9+vSdyHLcpRszGSFyFltMjdYop8dTMaOzAHs=; b=JvArKhJFXM+r2mvhzODvCSYzeqaID8bpAiTU/5LKdyUh56erPKDlLlFbUfW6XMbOI6 PKKiKgcseKkVZgcNUWNUAmTkqFAKS8Yt4bzHzxWtKDehhIqOHHoFg+iGTx3pZOtaTtsp SvxhvD08f76y3xcktY64Q1Q8L9tSHrsFi3M01sn37ve8RCxRVxQNrxeOfkSEDF5geMaP 6bEnW9K/J6e26ebljgxQD8qPuJr7SxHDUUV4U1j25Soq3H9W59TkXqVSTPRU0MOGO7k5 7Tf6Cbsw0rLMDLBgoK+2O8JdbMk1Hv3DrEjHufN/Alb02SBIsGEHgzbFpoKuA6xwXRT3 ak3Q== X-Gm-Message-State: AOAM531RiPEKNDgSaiaCSlDtPu3hTeK5MVgZhjK79phZgV1PfcQGn5bR 1D0UZc95ujX/y63tj/+XeZHFlsDWgnRZ8r1mago= X-Received: by 2002:a05:6808:64a:: with SMTP id z10mr12577697oih.54.1593452848981; Mon, 29 Jun 2020 10:47:28 -0700 (PDT) MIME-Version: 1.0 References: <20200526123810.301667-1-masahiroy@kernel.org> <20200526123810.301667-3-masahiroy@kernel.org> In-Reply-To: <20200526123810.301667-3-masahiroy@kernel.org> From: Geert Uytterhoeven Date: Mon, 29 Jun 2020 19:47:17 +0200 Message-ID: Subject: Re: [PATCH 3/4] m68k: optimize cc-option calls for cpuflags-y To: Masahiro Yamada Cc: linux-m68k , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 26, 2020 at 2:38 PM Masahiro Yamada wrote: > arch/m68k/Makefile computes lots of unneeded cc-option calls. > > For example, if CONFIG_M5441x is not defined, there is not point in > evaluating the following compiler flag. > > cpuflags-$(CONFIG_M5441x) := $(call cc-option,-mcpu=54455,-mcfv4e) > > The result is set to cpuflags-, then thrown away. > > The right hand side of ':=' is immediately expanded. Hence, all of the > 16 calls for cc-option are evaluated. This is expensive since cc-option > invokes the compiler. This occurs even if you are not attempting to > build anything, like 'make ARCH=m68k help'. > > Use '=' to expand the value _lazily_. The evaluation for cc-option is > delayed until $(cpuflags-y) is expanded. So, the cc-option test happens > just once at most. > > This commit mimics tune-y of arch/arm/Makefile. > > Signed-off-by: Masahiro Yamada Reviewed-by: Geert Uytterhoeven i.e. will queue in the m68k for-v5.9 branch. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds