Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C885BC433E0 for ; Mon, 29 Jun 2020 16:31:07 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 924952558B for ; Mon, 29 Jun 2020 16:31:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 924952558B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jpwg0-0006kx-T3; Mon, 29 Jun 2020 16:30:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jpwfz-0006ks-Ay for xen-devel@lists.xenproject.org; Mon, 29 Jun 2020 16:30:35 +0000 X-Inumbo-ID: dac22ff8-ba25-11ea-8496-bc764e2007e4 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id dac22ff8-ba25-11ea-8496-bc764e2007e4; Mon, 29 Jun 2020 16:30:34 +0000 (UTC) Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: +ca87G5nQzXjBgntDua5wuz/qXSNgB2xWerTUwT5wd9htlNDZKzCaCpXkpW+nwvfdt8z2ZXe6W 8obzO21ykElma7LwgMf8A8BGT1aS/8yARGIgQL+PlQnh424gQKS2AhC96reOZkr0SLbgoOVtM4 j2UCIEmaHCmu1iJE3dwdpYoiys9TuPZgaHW0pv3Yt/NNXVN7cZTJNdoAO428R7WDS7rmH/N5tW efYn23cwUb3HuW/I1uytI+/KCa6WgbC17YnEmUGFrvQ4RX4ziMhHeqXPDbBD9NyzT4ehu6r4Qm Coo= X-SBRS: 2.7 X-MesageID: 21504044 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.75,295,1589256000"; d="scan'208";a="21504044" Date: Mon, 29 Jun 2020 17:30:27 +0100 From: Anthony PERARD To: Jan Beulich Subject: Re: [PATCH] build: tweak variable exporting for make 3.82 Message-ID: <20200629163027.GA2030@perard.uk.xensource.com> References: <0677fe2a-9ea1-7b3c-e212-4a2478537459@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <0677fe2a-9ea1-7b3c-e212-4a2478537459@suse.com> X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Paul Durrant , George Dunlap , Andrew Cooper , Ian Jackson , "xen-devel@lists.xenproject.org" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Fri, Jun 26, 2020 at 05:02:30PM +0200, Jan Beulich wrote: > While I've been running into an issue here only because of an additional > local change I'm carrying, to be able to override just the compiler in > $(XEN_ROOT)/.config (rather than the whole tool chain), in > config/StdGNU.mk: > > ifeq ($(filter-out default undefined,$(origin CC)),) > > I'd like to propose to nevertheless correct the underlying issue: > Exporting an unset variable changes its origin from "undefined" to > "file". This comes into effect because of our adding of -rR to > MAKEFLAGS, which make 3.82 wrongly applies also upon re-invoking itself > after having updated auto.conf{,.cmd}. > > Move the export statement past $(XEN_ROOT)/config/$(XEN_OS).mk inclusion > such that the variables already have their designated values at that > point, while retaining their initial origin up to the point they get > defined. > > Signed-off-by: Jan Beulich > > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -17,8 +17,6 @@ export XEN_BUILD_HOST ?= $(shell hostnam > PYTHON_INTERPRETER := $(word 1,$(shell which python3 python python2 2>/dev/null) python) > export PYTHON ?= $(PYTHON_INTERPRETER) > > -export CC CXX LD > - > export BASEDIR := $(CURDIR) > export XEN_ROOT := $(BASEDIR)/.. > > @@ -42,6 +40,8 @@ export TARGET_ARCH := $(shell echo $ > # Allow someone to change their config file > export KCONFIG_CONFIG ?= .config > > +export CC CXX LD > + > .PHONY: default > default: build That patch is fine and it is probably better to export a variable that has a value rather than before the variable is set. Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD