On 24.05.2023 09:39, Luca Fancellu wrote: >> On 23 May 2023, at 17:37, Anthony PERARD <anthony.per...@citrix.com> wrote: >> 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. >> >> 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 > > The solution above seems clean, maybe I am wrong but -flto should not matter > here as we are > not building objects to include in the final build, isn’t it? And gcc > documentation states just: > > “It is recommended that you compile all the files participating in the same > link with the same > options and also specify those options at link time." > > I’ve also tested this patch and it works fine, I have to say however that I > preferred > a more verbose output, so that people can check how we are invoking the > compiler, > but I guess now it’s more consistent with the other invocations that doesn’t > print > the compiler invocation.
If you want it more verbose, you can pass V=1 on the make command line. (Of course that'll affect all commands' output.) Jan