Skip to contentSkip to conversation

build: fix dependency file generation with ENFORCE_UNIQUE_SYMBOLS=y

PATCH In review Jan Beulich 2 participants 2 messages Jan 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: fix dependency file generation with ENFORCE_UNIQUE_SYMBOLS=y

The recorded file, unless overridden by -MQ (or -MT) is that specified by -o, which doesn't produce correct dependencies and hence will cause failure to re-build when included files change.

Fixes 81ecb38b83b0 ("build: provide option to disambiguate symbol names")
xen/Rules.mk +1 -1
@@ -195,7 +195,7 @@ SRCPATH := $(patsubst $(BASEDIR)/%,%,$(C
 
 %.o: %.c Makefile
 ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y)
-	$(CC) $(CFLAGS) -c $< -o $(@D)/.$(@F).tmp
+	$(CC) $(CFLAGS) -c $< -o $(@D)/.$(@F).tmp -MQ $@
 ifeq ($(clang),y)
 	$(OBJCOPY) --redefine-sym $<=$(SRCPATH)/$< $(@D)/.$(@F).tmp $@
 else

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jan Beulich

The recorded file, unless overridden by -MQ (or -MT) is that specified by -o, which doesn't produce correct dependencies and hence will cause failure to re-build when included files change.

Fixes 81ecb38b83b0 ("build: provide option to disambiguate symbol names")

Thanks - this fixes my issue.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel