]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
build: fix dependency file generation with ENFORCE_UNIQUE_SYMBOLS=y
authorJan Beulich <jbeulich@suse.com>
Fri, 17 Jan 2020 16:38:19 +0000 (17:38 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Jan 2020 16:38:19 +0000 (17:38 +0100)
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")
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/Rules.mk

index 5aba841b0a955d0ce93623e41fb45ba7e41c1b5a..2f4e6f3d963802b9db7cf3b462fee49fa36a4df9 100644 (file)
@@ -195,7 +195,7 @@ SRCPATH := $(patsubst $(BASEDIR)/%,%,$(CURDIR))
 
 %.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