[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] build: tweak variable exporting for make 3.82


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Fri, 26 Jun 2020 15:32:44 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0mj838u9ouUx0Gl/m9ATFQDzRi6gcd/SQw8RLH6xw2U=; b=U+00w6qcfyqms4uXPoOWzWcy1aj0GIN8DAQrAkYwtHWgz/pqwcmBP4I4NpX+5rkC4eFS/SN1Eo3jzJ0N7B5bd4ruaHtQh08pDz+BNY1HjZ7bVWjF40tD614s284YAIiNK+h1fcjR7BO6Ml1BtRii8GKl8dxbcKilCAFPzQguDd/GpI9M2nu4xdymXMVTu7HDaekw7c4m4MBRACt+pI+zstRm39aQ2n0/2/NBOexmLXRDZToZDJ+OVh7ZKKoImqyaNjaoGsp0YcDB0AidrXzLVhrAVcMWCsEgS9oQjWF9SU8Eu8EPxhi+2d+HzRu7Is5BUaiVw9YGVMwojEw8XGJ47g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+AyDN8GdwN8/e2yb0KntjUfxJkjzn7tl00eeIrkPK/EJn48IdcUO6oooMWLL+YBT+77jp5M/IJMxVTXEBuUd4ZMSu1e+5o50HStmhG8YNuDmBVGmz2rgN1Jq95xB5IjLt6vVatno8vEqk8g83LQ2aer1Hy/2Xrh7oIxIKFIfWYxOLNmV3fYXGKmKNgtMpaHp2u62pMAyO//2sD5f3a+0me7ez0DCZM2LL1so39Qmad1OLaGI6DTFr6n2zwIZMJ7Bjfpk0LsbC5hy4Xn0Fwr8zulVdgjtG0RIbX4yznL+x8XEavJG7Z6IN3Wc6CoW1ncFChIYq2bIhYh/kXsZ8up3g==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, nd <nd@xxxxxxx>
  • Delivery-date: Fri, 26 Jun 2020 15:33:06 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWS8ssTlAGR1rYpUSLc7qQddQ2bajrBnwA
  • Thread-topic: [PATCH] build: tweak variable exporting for make 3.82

Hi Jan,

> On 26 Jun 2020, at 16:02, Jan Beulich <jbeulich@xxxxxxxx> 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.

If I understand correctly you actually need this to be after 
include $(XEN_ROOT)/Config.mk

Which actually includes the .config and the StdGNU.mk
Maybe you could say this as $(XEN_ROOT)/config/$(XEN_OS).mk is not actually 
included directly in the Makefile itself ?

I tested the patch and it works on arm and x86 on my side.

> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Tested-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

> 
> --- 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
> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.