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

[PATCH] build: fix exporting for make 3.82


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 14 Jun 2022 17:40:27 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5rPrl1eBGcU7xfrrmUE+53DCIfx8v3Nqjcf5+80E71Q=; b=K9FeqAxjxVzfiY96Vax5PdD07ycbB183RKmoRZydyRiqA/VsZGCwQmrxlPykedc2gOaOnVALfWkNt2KtLDXYUOHwdVw+BoveglmgqYHPjfeyHBQk/GhrYqP7ZNdMbtdR6NR3O2u1Ji6r3VPkBAusMaj9mbZYZrpBXOJnStLhAr14jVXMta4x2YP1BkdZfZrBkwAsv+w1kXPHi0N3HKXNcg4V4BwNvY161A6AD1elebFgsTyGd+IlpjJsw/AxEP7hKnr/UThLPRgRRjm3hHEt/BE3gWSB20VditiQmSYjcle6iMwKsYH4Wg64qOsPc8nNtKB060Kc56z9WtU0vElz6g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oWwyGwcuL+wCJ6bbRq+lDvbH9TnOgvfV13rH1Rc8vUX77OlK72oTOoPjdp3gtqzMCeuQVOg6Tqhkjo1eUPl30LPpCW8++SUtuZqXWlCp1ba3/msGJANngmHBc8W52DmDO0lm+UHr+G0FNRmOEki/MnqAeQWoOlJsFZ/y6WUBfNjPSu2Q+6iehpevMFGhj2x7hb24q/NaDmhDnCLdIo0AESohgz9H4N7Zapx7rXZpfi98qIYFHAeM3FxaZrsEBnY4MAiLkN/SrOGLO42XWEdlgPnBkSv88e/T6Fbk9DygES3NDO9pyZJMaQJsV2fkFH+ZdcKdeQwM6j9cULQe9j2bug==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Tue, 14 Jun 2022 15:40:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

GNU make 3.82 apparently has a quirk where exporting an undefined
variable prevents its value from subsequently being updated. This
situation can arise due to our adding of -rR to MAKEFLAGS, which takes
effect also on make simply re-invoking itself. Once these flags are in
effect, CC (in particular) is empty (undefined), and would be defined
only via Config.mk including StdGNU.mk or alike. With the quirk, CC
remains empty, yet with an empty CC the compiler minimum version check
fails, breaking the build.

Move the exporting of the various tool stack component variables past
where they gain their (final) values.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
There may be further factors playing into the described quirk, as I've
also observed that simply running make as 2nd time would lead to
successful building of xen/.

While this wasn't a problem until several weeks back, I've not been able
to identify which exact commit would have caused the breakage. Hence no
Fixes: tag.

--- a/xen/Makefile
+++ b/xen/Makefile
@@ -44,8 +44,6 @@ export ARCH SRCARCH
 # Allow someone to change their config file
 export KCONFIG_CONFIG ?= .config
 
-export CC CXX LD NM OBJCOPY OBJDUMP ADDR2LINE
-
 export TARGET := xen
 
 .PHONY: dist
@@ -244,6 +242,7 @@ export TARGET_ARCH     := $(shell echo $
                                 -e s'/riscv.*/riscv/g')
 
 export CONFIG_SHELL := $(SHELL)
+export CC CXX LD NM OBJCOPY OBJDUMP ADDR2LINE
 export YACC = $(if $(BISON),$(BISON),bison)
 export LEX = $(if $(FLEX),$(FLEX),flex)
 



 


Rackspace

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