[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 25 May 2023 11:36:05 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • 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: Thu, 25 May 2023 10:36:32 +0000
  • Ironport-data: A9a23:F2fOl6+/k5YlxMCft662DrUDTH6TJUtcMsCJ2f8bNWPcYEJGY0x3y jZODW6OO/7cMDehLtF/OoXk8U8G7JHRnd9hT1E+/y88E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKicYXoZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ird7ks31BjOkGlA5AdmOKoX5AO2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDkl33 KEBOChUcSy/jv7n2pWiafJ3wcg8eZyD0IM34hmMzBncBPciB5vCX7/L9ZlT2zJYasJmRKiEI ZBDMHw2MUqGOkcUUrsUIMtWcOOAj3/jczpeuRSNqLA++WT7xw1tyrn9dtHSf7RmQO0MxxzI/ Dyarj2R7hcyE/C1lgDeqFWVnvbmuyejG7wuSLbhz6s/6LGU7jNKU0BHPbehmtG7gEOjX9NUK 2QP5zEj66M18SSDTMT5XhC+iG6JuFgbQdU4O/Yh9AiHx67Q4gCYLmsJVDhMbJohrsBebSMu/ k+EmZXuHzMHmK2YTzeR+6mZqRu2ODMJNikSaCkcVwwH7tL/5oYpgXrnR85uCqevgvXpGDv7x HaBqy1WulkIpZdVjePhpwmB2m/y4MGTFWbZ+zk7QEqcx15gdJb8eLCU4ESK99FZD52CCVWe6 S1sd9el0MgCCpSElSqoSeoLHa206/vtDAAwkWKDDLF6qW3zpifLkZR4pWgneRw3appslSrBO he7hO9H2HNE0JJGh4dTapn5NcklxLOI+T/NBqGNNYomjnScmWa6EMBSiay4hTiFfKsEy/tX1 XKnnSGEUx4n5VxPlmbeegvk+eZDKtoC7W3SX4vn6B+szKCTYnWYIZ9cbgvSP71itvje+ViNm zq6Cydt40wFONASnwGNqdJDRbz0BSNT6W/KRzx/KbfYf1sO9JAJAP7N27IxE7FYc1Buvr6Qp BmVAxYIoGcTcFWbcW1mnFg/MuKwNXu+xFpnVRER0aGAgiZ9MdbxtfZHL/Pav9APrYRe8BK9d NFdE+3oPxiFYm2vF+g1BXUlkLFfSQ==
  • Ironport-hdrordr: A9a23:CB5NB6DYzypvg1PlHemU55DYdb4zR+YMi2TDtnoBLyC9Hfb4qy nDppQmPHzP+VEssRMb6LW90cC7KBu2n/MYjucs1NGZLWrbUQCTXeVfBOXZsl/d8/GXzJ8h6U 4aSdkGNDQ1NykD/L2KmnjFL+od
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, May 24, 2023 at 04:09:39PM +0200, Jan Beulich wrote:
> 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.

Thanks, I'll do this rework.

-- 
Anthony PERARD



 


Rackspace

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