Skip to contentSkip to conversation

Fix and adjustment to tools/fuzz

PATCH New Wei Liu 1 participant 4 messages Jan 19, 2017 – Jan 20, 2017

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

cover Fix and adjustment to tools/fuzz

Wei Liu (2):
tools/fuzz: fix compilation after 897129d
tools/fuzz: make sure targets are always built

 tools/fuzz/Makefile                          | 6 ++----
 tools/fuzz/libelf/Makefile                   | 3 +++
 tools/fuzz/x86_instruction_emulator/Makefile | 5 ++++-
 3 files changed, 9 insertions(+), 5 deletions(-)
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#1 lore raw

PATCH 1/2 tools/fuzz: fix compilation after 897129d

We need to add -D__XEN_TOOLS__ so that the correct register names are generated.

---
 tools/fuzz/x86_instruction_emulator/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/fuzz/x86_instruction_emulator/Makefile +1 -1
index a97f507..505de39 100644
@@ -14,7 +14,7 @@ x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h:
 x86_emulate.c x86_emulate.h: %:
 	[ -L $* ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/$*
 
-CFLAGS += $(CFLAGS_xeninclude)
+CFLAGS += $(CFLAGS_xeninclude) -D__XEN_TOOLS__
 
 x86_emulate.o: x86_emulate.c x86_emulate.h x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h
 
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#2 lore raw

PATCH 2/2 tools/fuzz: make sure targets are always built

In reply to Wei Liu

Invocation of `make' in top-level directory would end up invoking the install target.

Adjust fuzzing target makefiles a bit so that they are always build in that situation.

---
 tools/fuzz/Makefile                          | 6 ++----
 tools/fuzz/libelf/Makefile                   | 3 +++
 tools/fuzz/x86_instruction_emulator/Makefile | 3 +++
 3 files changed, 8 insertions(+), 4 deletions(-)
tools/fuzz/Makefile +2 -4
index ce00b82..986fbb8 100644
@@ -5,7 +5,5 @@ SUBDIRS-y :=
 SUBDIRS-y += libelf
 SUBDIRS-y += x86_instruction_emulator
 
-.PHONY: all clean distclean
-all clean distclean: %: subdirs-%
-
-install:
+.PHONY: all clean distclean install
+all clean distclean install: %: subdirs-%
tools/fuzz/libelf/Makefile +3 -0
index 0e9d40a..c73ce44 100644
@@ -29,3 +29,6 @@ distclean: clean
 .PHONY: clean
 clean:
 	rm -f *.o *.a
+
+.PHONY: install
+install: all
tools/fuzz/x86_instruction_emulator/Makefile +3 -0
index 505de39..20431b0 100644
@@ -34,3 +34,6 @@ distclean: clean
 .PHONY: clean
 clean:
 	rm -f *.a *.o
+
+.PHONY: install
+install: all
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#3 lore raw

PATCH 1/1 tools/fuzz: remove redundant rule in x86 insn fuzzer

In reply to Wei Liu

The predefined pattern rule works.

---
 tools/fuzz/x86_instruction_emulator/Makefile | 2 --
 1 file changed, 2 deletions(-)
tools/fuzz/x86_instruction_emulator/Makefile +0 -2
index 20431b0..1777bf6 100644
@@ -21,8 +21,6 @@ x86_emulate.o: x86_emulate.c x86_emulate.h x86_emulate/x86_emulate.c x86_emulate
 x86-insn-emulator.a: x86_emulate.o
 	$(AR) rc $@ $^
 
-x86-insn-emulator-fuzzer.o: x86-insn-emulator-fuzzer.c
-
 # Common targets
 .PHONY: all
 all: x86-instruction-emulator-fuzzer-all
Signature · 7 lines
2.1.4


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