From patchwork Fri Jun 26 15:02:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11627725 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D27A92A for ; Fri, 26 Jun 2020 15:04:13 +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 60AAE206E9 for ; Fri, 26 Jun 2020 15:04:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60AAE206E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.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 1jops8-0003fP-ED; Fri, 26 Jun 2020 15:02:32 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jops6-0003fK-Tj for xen-devel@lists.xenproject.org; Fri, 26 Jun 2020 15:02:30 +0000 X-Inumbo-ID: 0dea3da4-b7be-11ea-82ce-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 0dea3da4-b7be-11ea-82ce-12813bfff9fa; Fri, 26 Jun 2020 15:02:29 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A5F91AC46; Fri, 26 Jun 2020 15:02:28 +0000 (UTC) To: "xen-devel@lists.xenproject.org" From: Jan Beulich Subject: [PATCH] build: tweak variable exporting for make 3.82 Message-ID: <0677fe2a-9ea1-7b3c-e212-4a2478537459@suse.com> Date: Fri, 26 Jun 2020 17:02:30 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 Content-Language: en-US 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 , Anthony Perard , Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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 Tested-by: Bertrand Marquis Reviewed-by: Anthony PERARD --- 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