On Thu, Dec 10, 2020 at 11:21:53AM +0100, Jan Beulich wrote: > On 09.12.2020 18:40, Anthony PERARD wrote: > > How about using $(XEN_CFLAGS) instead of $(c_flags)? That should prevent > > CC from generating the .*.o.d files while keeping the relevant flags. > > What does "relevant" cover? For an empty .o it may not be important > right now, but I could see > > c_flags = -MMD -MP -MF $(@D)/.$(@F).d $(XEN_CFLAGS) '-D__OBJECT_FILE__="$@"' > a_flags = -MMD -MP -MF $(@D)/.$(@F).d $(XEN_AFLAGS) > > include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk > > c_flags += $(CFLAGS-y) > a_flags += $(CFLAGS-y) $(AFLAGS-y) > > leading to CFLAGS-y / AFLAGS-y which need to be consistent across > _all_ object files (e.g. some recording of ABI used). > > > Do we need to worry about having a object file been listed twice? > > Wouldn't that be a mistake? > > No. The list approach (obj-$(CONFIG_xyz) += ...) easily allows for > this to happen. See xen/arch/x86/mm/Makefile for an existing example.
Sounds good, Reviewed-by: Anthony PERARD <anthony.per...@citrix.com> Thanks, -- Anthony PERARD