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

Ping: [PATCH RFC] build: respect top-level .config also for out-of-tree hypervisor builds


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 3 May 2023 12:36:45 +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=4hFX+X1sh+3XqbisDaZVyq/2N10sj1zXa+mjFkM1wa4=; b=NaFrp9Qe6qajzY7JOnA6XMU0Upv5Zz32xhKZF3vJz8TH+OeSzQdeqtR/Yrex3RQUFtC05hKMVJ81We3FVhmGiCu3dPI7sOrGoDK0VNRX9eU3N3KfevRGu+37BIScd8tZEEPjddiMxGu52o/2iO0yo5U28LuL0ynk18wmsiGIiaAwBBxse9NfS3frwxQUAaA9IMX/A+0BTJ8FAzVK8gOvQ5JADp2BQfH8BcT30cFMirnHpcx9lXXPkbG4AC6jCG9h6lxqgpnFSQoH1CEzszb53++vaB6FwIQ4Zp/XT2OWKkjzi7IfhKqMsTE+KmAU7DJt7Or+sN+x/c3LGZNFtYXDUg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cl5p12lIMh/AmyDfA2AnyabYzMVMLVngMTmR1PluzZT51IO9gh0e6tOaxQtHpu/Ln5FeQfIhupw8UUUAcd2ocXPFpcJKICd3/OpJkOxKgw+EajqslZ6B85EjLbfKDi0qxhlESdy9ZNvh379AwDw3Ev1+QGHc5jXx6F0tkRdWQM0brl5Xsyi4mE5w8hPOeGn0lY9IIf3OQBnH+2mWobljYEIxYGn8XSLIMEHEzvyBQZ0HS4x2r7lLWdnf04idUO1CdnjNtFnh/nUmZNHqpXi2uRuG3yUhTCwaS5rHI3yEKehlLrNWWp0FQKsHEDl2r0OexICJMqjvKWk3TzIKpwGBGg==
  • 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: Wed, 03 May 2023 10:37:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.03.2023 15:58, Jan Beulich wrote:
> With in-tree builds Config.mk includes a .config file (if present) from
> the top-level directory. Similar functionality is wanted with out-of-
> tree builds. Yet the concept of "top-level directory" becomes fuzzy in
> that case, because there is not really a requirement to have identical
> top-level directory structure in the output tree; in fact there's no
> need for anything top-level-ish there. Look for such a .config, but only
> if the tree layout matches (read: if the directory we're building in is
> named "xen").
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> RFC: The directory name based heuristic of course isn't nice. But I
>      couldn't think of anything better. Suggestions?
> 
> RFC: There also being a .config in the top-level source dir would be a
>      little problematic: It would be included _after_ the one in the
>      object tree. Yet if such a scenario is to be expected/supported at
>      all, it makes more sense the other way around.

Anyone? I'm certainly okay for my approach to be rejected, but I'd like
to see out-of-tree builds to reach functional parity with in-tree ones.

Jan

> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -236,8 +236,17 @@ endif
>  
>  include scripts/Kbuild.include
>  
> -# Don't break if the build process wasn't called from the top level
> -# we need XEN_TARGET_ARCH to generate the proper config
> +# Don't break if the build process wasn't called from the top level.  We need
> +# XEN_TARGET_ARCH to generate the proper config.  If building outside of the
> +# source tree also check whether we need to include a "top-level" .config:
> +# Config.mk, using $(XEN_ROOT)/.config, would look only in the source tree.
> +ifeq ($(building_out_of_srctree),1)
> +# Try to avoid including a random unrelated .config: Assume our parent dir
> +# is a "top-level" one only when the objtree is .../xen.
> +ifeq ($(patsubst %/xen,,$(abs_objtree)),)
> +-include ../.config
> +endif
> +endif
>  include $(XEN_ROOT)/Config.mk
>  
>  # Set ARCH/SUBARCH appropriately.
> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -17,6 +17,13 @@ __build:
>  
>  -include $(objtree)/include/config/auto.conf
>  
> +# See commentary around the similar contruct in Makefile.
> +ifneq ($(abs_objtree),$(abs_srctree))
> +ifeq ($(patsubst %/xen,,$(abs_objtree)),)
> +../.config: ;
> +-include ../.config
> +endif
> +endif
>  include $(XEN_ROOT)/Config.mk
>  include $(srctree)/scripts/Kbuild.include
>  
> 




 


Rackspace

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