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

Re: [Xen-devel] [XEN PATCH v3 18/23] xen/build: use if_changed on built_in.o



On Wed, Mar 04, 2020 at 05:03:40PM +0100, Jan Beulich wrote:
> On 26.02.2020 12:33, Anthony PERARD wrote:
> > --- a/xen/Rules.mk
> > +++ b/xen/Rules.mk
> > @@ -126,14 +126,21 @@ include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
> >  c_flags += $(CFLAGS-y)
> >  a_flags += $(CFLAGS-y) $(AFLAGS-y)
> >  
> > -built_in.o: $(obj-y) $(extra-y)
> > +quiet_cmd_ld_builtin = LD      $@
> > +cmd_ld_builtin = \
> > +    $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out $(extra-y),$(real-prereqs))
> > +quiet_cmd_cc_builtin = LD      $@
> > +cmd_cc_builtin = \
> > +    $(CC) $(XEN_CFLAGS) -c -x c /dev/null -o $@
> > +
> > +built_in.o: $(obj-y) $(extra-y) FORCE
> >  ifeq ($(obj-y),)
> > -   $(CC) $(c_flags) -c -x c /dev/null -o $@
> > +   $(call if_changed,cc_builtin)
> >  else
> >  ifeq ($(CONFIG_LTO),y)
> >     $(LD_LTO) -r -o $@ $(filter-out $(extra-y),$^)
> 
> What about this? Couldn't you simply vary what cmd_ld_builtin
> expands to, and drop this inner ifeq()?

Yes, that should be possible. I was trying to leave CONFIG_LTO out, but
it's probably just make readability worse.

Thanks,

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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