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

[PATCH v2 1/2] build: don't export building_out_of_srctree


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 29 Mar 2023 12:22:16 +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=WP/pn7PcqitYNzksceXHyWQ8WFxxaZJTAXiWHpt903Y=; b=V/xdUZSNQXhLa5UqPESrzT5SwHeZuFrMdCLtGVMj2RDCHAPvfvIEU6UMgeiDG9Td3wRXh/+ywCNJmrzspEE8bNY+CyXAn0ASq35uEwF2+WZbOEGAj9+B8TTN9GvjSSQex1ihp5i/l6O+XMgTsQ8L6VQUEUiTk9iDB1UnLsFqbRI4WZaPj/h3a14vpeHc1ntjC4WU9hPCk0RDhqXBG4cLvpG9oZa1CJaOl9yJ6WmVToa0K7Y15TFhp5Nk5E9AT4V2w0dkOuKSYsrAX1/bP/IVTQMxHUxuvtofOWtaYiKF55GY5rBXSeQuBsrD+RyUiaEltovrhZFCfn92lB2Qd2neBw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A5K+KTgbZKxr5BFROl5peoFRwGa2g277T6soGF8cjDZ8Ih+aVFhU2+Xw9zkpbMWCjyz4Et4Q7cpt4LUhzZhFO98zxeKHoUI+twS0MPHwWDU4WHAIa0zEUbb73lvB6Nhn6XZph7aDjfskLFBFTGj3BNC7+XaoM8aq+d7BfJtYIOxFqZqiemAqcXcDgvbrUFezUbNInmeqDGo+ozNEHuIauXl5L/Qec1eaxyvnObtf+Fzv4nF4hc6RggDpbgpXPdVxSONCxzp+ZlODvUF0xRNMu1iMqtwo1jsNwKpwySBDUJDMuJlNpBppqPxYBZRbmrynn/yZUVVEnlJ7NCCM7htFVw==
  • 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 29 Mar 2023 10:22:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

I don't view a variable of this name as suitable for exporting, the more
that it carries entirely redundant information. The reasons for its
introduction in Linux commit 051f278e9d81 ("kbuild: replace
KBUILD_SRCTREE with boolean building_out_of_srctree") also don't apply
to us. Ditch exporting of the variable, replacing uses suitably.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: New.
---
For further reasons (besides the similar redundancy aspect) exporting
VPATH looks also suspicious: Its name being all uppercase makes it a
"non application private" variable, i.e. it or its (pre-existing) value
may have a purpose/use elsewhere. And exporting it looks to be easily
avoidable: Instead of setting it in xen/Makefile, it looks like it could
be set in xen/scripts/Kbuild.include. Thoughts?

--- a/xen/Makefile
+++ b/xen/Makefile
@@ -208,7 +208,7 @@ endif
 objtree := .
 VPATH := $(srctree)
 
-export building_out_of_srctree srctree objtree VPATH
+export srctree objtree VPATH
 
 export XEN_ROOT := $(abs_srctree)/..
 
--- a/xen/arch/x86/boot/Makefile
+++ b/xen/arch/x86/boot/Makefile
@@ -14,7 +14,7 @@ $(obj)/head.o: $(head-bin-objs:.o=.bin)
 CFLAGS_x86_32 := $(subst -m64,-m32 -march=i686,$(XEN_TREEWIDE_CFLAGS))
 $(call cc-options-add,CFLAGS_x86_32,CC,$(EMBEDDED_EXTRA_CFLAGS))
 CFLAGS_x86_32 += -Werror -fno-builtin -g0 -msoft-float
-ifdef building_out_of_srctree
+ifneq ($(abs_objtree),$(abs_srctree))
 CFLAGS_x86_32 += -I$(objtree)/include
 endif
 CFLAGS_x86_32 += -I$(srctree)/include
--- a/xen/scripts/Makefile.host
+++ b/xen/scripts/Makefile.host
@@ -88,7 +88,7 @@ _hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_
                  $(HOSTCXXFLAGS_$(target-stem).o)
 
 # $(objtree)/$(obj) for including generated headers from checkin source files
-ifdef building_out_of_srctree
+ifneq ($(abs_objtree),$(abs_srctree))
 _hostc_flags   += -I $(objtree)/$(obj)
 _hostcxx_flags += -I $(objtree)/$(obj)
 endif




 


Rackspace

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