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

[for-4.19][PATCH] build: Allow setting KBUILD_DEFCONFIG in the environment


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 25 Oct 2023 10:28:34 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=sAZHBNJKUQYFM4Jm7+3mJwKq70OpgNRzmyQQPMz3Fiw=; b=ahUAP9I3lgzs6NsTUsvx0VjzMEsWNaij65Ug2qo8eVTSxgz6ZlImDu+JAisay5IQZCErd3+EsrWynPFzuMXyKjD4YklEK4mJL17g8eNCuj6tpl1oFCmYSsKnH8O12WBSvxds7DBDJp4mKIt32SnvplpdtvHZZY4arau4Z//cSWjt30zgpmN2B4c/3BR2s5YmpZduliDuetaNPLDHO6cxr8Lx/9HYfa04oTwKsDi82iX0khlnQK9IEq99n4ps8j8JsT90g+SRIqe9QKBtNp0XE0L9v9mab5zJ517JK2kUS/dEvaUeVoDU4NezWwRRzLDdv09o33EIKpuZVe9AN1NUaQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Io/UcMPegHpM/ql8BAEI6mKqKtkMGAEg/sV/my/BTv+WH/BvhfbODz1/KdxWW77Yzi3akTdXI6xB+kG4Hh2GvME2HNrnPiNalwNJFjyJZCmu5YbAjM6KmQVJ9RLkfnJaROppRijBIbD7CZkjyioVlEEH46IGrzwAvozJv8METOMyGk93xNlBo5YX82WzgRYSA0jpAbmUCaLcSRQVMTIXbM3/H4To2XTh9h6bG29+V+4Hlv9YfwSPJiqcUIVcyxR529rjgm3YWqPt6cceyif2ipkZUpXCf1h5B84VREbGFBVkmJIpmDjvfQBOFoeQOkq+uLpprOhVqIyeT0zDdCF0qA==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 25 Oct 2023 08:29:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

At the moment, in order to use a different defconfig target than default,
one needs to specify KBUILD_DEFCONFIG=<target> on the command line.
Switch to weak assignment, so that it can be also obtained from
environment similar to other KCONFIG/KBUILD variables.

This change will activate the use of KBUILD_DEFCONFIG variable in CI
build jobs that so far had no effect.

Note, that we will deviate from Linux in this regard.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
In case of reluctance to this approach, we can always do:
 make -C xen defconfig KBUILD_DEFCONFIG=${KBUILD_DEFCONFIG}
in automation/scripts/build.

Also, Linux defers setting the variable to arch specific Makefile, so it is not
sth mandated by the top level Makefile or documentation.
---
 xen/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/Makefile b/xen/Makefile
index fd0e63d29efb..40feefff4ab5 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -256,7 +256,8 @@ export YACC = $(if $(BISON),$(BISON),bison)
 export LEX = $(if $(FLEX),$(FLEX),flex)
 
 # Default file for 'make defconfig'.
-export KBUILD_DEFCONFIG := $(ARCH)_defconfig
+# May be overruled on the command line or set in the environment.
+export KBUILD_DEFCONFIG ?= $(ARCH)_defconfig
 
 # Copy CFLAGS generated by "Config.mk" so they can be reused later without
 # reparsing Config.mk by e.g. arch/x86/boot/.
-- 
2.25.1




 


Rackspace

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