|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [XEN PATCH v3 18/23] xen/build: use if_changed on built_in.o
In the case where $(obj-y) is empty, we also replace $(c_flags) by
$(XEN_CFLAGS) to avoid generating an .%.d dependency file. This avoid
make trying to include %.h file in the ld command if $(obj-y) isn't
empty anymore on a second run.
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
xen/Rules.mk | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/xen/Rules.mk b/xen/Rules.mk
index bb4ced5f0dd4..cbf4feba0e0f 100644
--- 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),$^)
else
- $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out $(extra-y),$^)
+ $(call if_changed,ld_builtin)
endif
endif
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |