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

Re: [XEN PATCH 02/15] build: rework asm-offsets.* build step to use kbuild


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 24 May 2023 16:09:39 +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=uAeBHMFs+GjiCVZ8B+czgLLU3xN46DLXZkoDfOs5V1c=; b=MYvb4i2xhygdQ42Y/8b5V5IQxS9ODJ2K8g/OJgoDunepZaUmeXgZCqp7ix96cQawY6xHt/ZppEOHg4fciS9UDC+8xiMLwIaMFClNyxkVMAX/LJOuh50YsFvk2JETvgIWNMg3CMBfsqz6LzHqaI53r/05scB6sePcl8GG460uqcnAASI4iNmFYK52yWTcvEbdAkQM5Tc8pbxGBY2d1Zg6t6pmnOjO8WhcSy5ADRrnHI7IxchMRJdV+JqKExJmhXmb7Os4aCky/l8sogp24Jc0n3JygincuayXgEQADQkBHWRtW/gk7yniURMKZKsW6NRg4EWc6vJMxcrOELhgW28JbQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C55b8NMvaDIGjFXBshyxWprU71e5uP2EJc5d33VOr2KxPWpp/8Bmb+/fErZIsxwlBS8QU1mXeOQbirdnzER5a2f0ZMKJADirZ4tge5cA5A5ExUB01k91WWyP7//IajZAxj2sTtp9n7PXII9ywTI55zV2gZfcUYyYwNX5qxJiV8mMqFrzQ8LyTpXCdKYkJmA8MTsBux+75xzbX59hQJfeGRuz9G/glDYE6bwqZVpvDyUWhoY2OCpaYhbSSF5lMB3iAWGI/bLsACiRslaFmZgSdJkIBfZUAuuizTI9LvSFTZHGpg8XEulj9YRBlnr3wgoEHNEW68IVk/Nq0s1l2QPokw==
  • 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>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 24 May 2023 14:09:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.05.2023 18:37, Anthony PERARD wrote:
> Use $(if_changed_dep, ) macro to generate "asm-offsets.s" and remove
> the use of $(move-if-changes,). That mean that "asm-offset.s" will be
> changed even when the output doesn't change.
> 
> But "asm-offsets.s" is only used to generated "asm-offsets.h". So
> instead of regenerating "asm-offsets.h" every time "asm-offsets.s"
> change, we will use "$(filechk, )" to only update the ".h" when the
> output change. Also, with "$(filechk, )", the file does get
> regenerated when the rule change in the makefile.
> 
> This changes also result in a cleaner build log.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
> 
> Instead of having a special $(cmd_asm-offsets.s) command, we could
> probably reuse $(cmd_cc_s_c) from Rules.mk, but that would mean that
> an hypothetical additional flags "-flto" in CFLAGS would not be
> removed anymore, not sure if that matter here.

There's no real code being generated there, and what we're after are
merely the special .ascii directives. So the presence of -flto should
have no effect there, and hence it would even look more consistent to
me if we didn't use different options (and even rules) for .c -> .s
transformations.

> But then we could write this:
> 
> targets += arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.s
> arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.s: CFLAGS-y += -g0
> arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: 
> arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.s FORCE
> 
> instead of having to write a rule for asm-offsets.s

Ftaod, I'd be happy to ack the patch as it is, but I would favor if
you could do the rework / simplification as outlined.

Jan



 


Rackspace

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