[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
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |