Message ID | 20210701141011.785641-4-anthony.perard@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen: Build system improvements | expand |
On 01/07/2021 15:09, Anthony PERARD wrote: > diff --git a/xen/Rules.mk b/xen/Rules.mk > index f778058f80a6..6a0cdfde2eed 100644 > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -147,17 +147,22 @@ include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk > c_flags += $(CFLAGS-y) > a_flags += $(CFLAGS-y) $(AFLAGS-y) > > -built_in.o: $(obj-y) $(if $(strip $(lib-y)),lib.a) $(extra-y) > -ifeq ($(strip $(obj-y)),) > - $(CC) $(c_flags) -c -x c /dev/null -o $@ > -else > +quiet_cmd_cc_builtin = LD $@ s/LD/CC/ ~Andrew
On Thu, Jul 08, 2021 at 01:03:46PM +0100, Andrew Cooper wrote: > On 01/07/2021 15:09, Anthony PERARD wrote: > > diff --git a/xen/Rules.mk b/xen/Rules.mk > > index f778058f80a6..6a0cdfde2eed 100644 > > --- a/xen/Rules.mk > > +++ b/xen/Rules.mk > > @@ -147,17 +147,22 @@ include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk > > c_flags += $(CFLAGS-y) > > a_flags += $(CFLAGS-y) $(AFLAGS-y) > > > > -built_in.o: $(obj-y) $(if $(strip $(lib-y)),lib.a) $(extra-y) > > -ifeq ($(strip $(obj-y)),) > > - $(CC) $(c_flags) -c -x c /dev/null -o $@ > > -else > > +quiet_cmd_cc_builtin = LD $@ > > s/LD/CC/ Will fix that. Thanks,
diff --git a/xen/Rules.mk b/xen/Rules.mk index f778058f80a6..6a0cdfde2eed 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -147,17 +147,22 @@ include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk c_flags += $(CFLAGS-y) a_flags += $(CFLAGS-y) $(AFLAGS-y) -built_in.o: $(obj-y) $(if $(strip $(lib-y)),lib.a) $(extra-y) -ifeq ($(strip $(obj-y)),) - $(CC) $(c_flags) -c -x c /dev/null -o $@ -else +quiet_cmd_cc_builtin = LD $@ +cmd_cc_builtin = \ + $(CC) $(XEN_CFLAGS) -c -x c /dev/null -o $@ + +quiet_cmd_ld_builtin = LD $@ ifeq ($(CONFIG_LTO),y) - $(LD_LTO) -r -o $@ $(filter $(obj-y),$^) +cmd_ld_builtin = \ + $(LD_LTO) -r -o $@ $(filter $(obj-y),$(real-prereqs)) else - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$^) -endif +cmd_ld_builtin = \ + $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$(real-prereqs)) endif +built_in.o: $(obj-y) $(if $(strip $(lib-y)),lib.a) $(extra-y) FORCE + $(call if_changed,$(if $(strip $(obj-y)),ld_builtin,cc_builtin)) + lib.a: $(lib-y) FORCE $(call if_changed,ar)