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

[xen master] build: tweak variable exporting for make 3.82



commit be63d9d47f571a60d70f8fb630c03871312d9655
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jul 2 11:11:40 2020 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jul 2 11:11:40 2020 +0200

    build: tweak variable exporting for make 3.82
    
    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
    (which happens through $(XEN_ROOT)/Config.mk) 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 <jbeulich@xxxxxxxx>
    Tested-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
    Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
    Release-acked-by: Paul Durrant <paul@xxxxxxx>
---
 xen/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 0ade7f9517..2f3f8b9deb 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -17,8 +17,6 @@ export XEN_BUILD_HOST ?= $(shell hostname)
 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 $(XEN_TARGET_ARCH) | \
 # Allow someone to change their config file
 export KCONFIG_CONFIG ?= .config
 
+export CC CXX LD
+
 .PHONY: default
 default: build
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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