tools: remove local links to the x86 headers
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 12 Jul 2018 16:48:06 +0000 (18:48 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 13 Jul 2018 13:18:21 +0000 (14:18 +0100)
In the x86 test harness and the fuzzer, and instead create a link in
the tools/include directory that can be used by all the tools.

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
tools/fuzz/x86_instruction_emulator/Makefile
tools/include/Makefile
tools/tests/x86_emulator/Makefile
tools/tests/x86_emulator/x86-emulate.h

index fbbb70bbfc02b2d55f3dfea2e44f3efaec9b568a..eb88f9412c9b3ec49e4914ea92ab459bf81172f4 100644 (file)
@@ -13,11 +13,6 @@ x86_emulate:
 
 x86_emulate/%: x86_emulate ;
 
-asm:
-       [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 $@
-
-asm/%: asm ;
-
 x86-emulate.c x86-emulate.h wrappers.c: %:
        [ -L $* ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/$*
 
@@ -27,7 +22,8 @@ GCOV_FLAGS := --coverage
 %-cov.o: %.c
        $(CC) -c $(CFLAGS) $(GCOV_FLAGS) $< -o $@
 
-x86.h := asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h
+x86.h := $(addprefix $(XEN_ROOT)/tools/include/xen/asm/,\
+                     x86-vendors.h x86-defns.h msr-index.h)
 x86_emulate.h := x86-emulate.h x86_emulate/x86_emulate.h $(x86.h)
 
 # x86-emulate.c will be implicit for both
@@ -50,7 +46,7 @@ all: x86-insn-fuzz-all
 
 .PHONY: distclean
 distclean: clean
-       rm -f x86_emulate x86-emulate.c x86-emulate.h asm
+       rm -f x86_emulate x86-emulate.c x86-emulate.h
 
 .PHONY: clean
 clean:
index 666510530eef95d496b6cee55b583ae6e0456be4..270a34f3185b9df6d05c549c42a8ac91b64428d0 100644 (file)
@@ -21,6 +21,9 @@ xen/.dir:
        ln -sf $(addprefix $(XEN_ROOT)/xen/include/xen/,libelf.h elfstructs.h) xen/libelf/
        ln -s ../xen-foreign xen/foreign
        ln -sf $(XEN_ROOT)/xen/include/acpi acpi
+ifeq ($(CONFIG_X86),y)
+       ln -sf $(XEN_ROOT)/xen/include/asm-x86 xen/asm
+endif
        touch $@
 
 # Not xen/xsm as that clashes with link to
index 417d5c0941696c74890dc7038862100086a2cec7..dec81c33b2e73803e4461cafa0d612cf4596a54b 100644 (file)
@@ -118,7 +118,7 @@ $(TARGET): x86-emulate.o test_x86_emulator.o wrappers.o
 
 .PHONY: clean
 clean:
-       rm -rf $(TARGET) *.o *~ core $(addsuffix .h,$(TESTCASES)) *.bin x86_emulate asm
+       rm -rf $(TARGET) *.o *~ core $(addsuffix .h,$(TESTCASES)) *.bin x86_emulate
 
 .PHONY: distclean
 distclean: clean
@@ -131,16 +131,12 @@ x86_emulate:
 
 x86_emulate/%: x86_emulate ;
 
-asm:
-       [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 $@
-
-asm/%: asm ;
-
 HOSTCFLAGS-x86_64 := -fno-PIE
 $(call cc-option-add,HOSTCFLAGS-x86_64,HOSTCC,-no-pie)
 HOSTCFLAGS += $(CFLAGS_xeninclude) -I. $(HOSTCFLAGS-$(XEN_COMPILE_ARCH))
 
-x86.h := asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h
+x86.h := $(addprefix $(XEN_ROOT)/tools/include/xen/asm/,\
+                     x86-vendors.h x86-defns.h msr-index.h)
 x86_emulate.h := x86-emulate.h x86_emulate/x86_emulate.h $(x86.h)
 
 x86-emulate.o test_x86_emulator.o wrappers.o: %.o: %.c $(x86_emulate.h)
index fd1ba5218b93f366615c0dc340fa6094a8f28baa..b249e4673c3357e09f2a201603b0963e145c2341 100644 (file)
@@ -11,9 +11,9 @@
 
 #include <xen/xen.h>
 
-#include <asm/msr-index.h>
-#include <asm/x86-defns.h>
-#include <asm/x86-vendors.h>
+#include <xen/asm/msr-index.h>
+#include <xen/asm/x86-defns.h>
+#include <xen/asm/x86-vendors.h>
 
 #include <xen-tools/libs.h>