|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] tools/fuzz: use vpath uniformly for access to hypervisor library code
commit 9cf4084f4ee51123f95a5bb1e7220e89da16350e
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Dec 18 09:57:42 2025 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Dec 18 09:57:42 2025 +0100
tools/fuzz: use vpath uniformly for access to hypervisor library code
It's not quite clear why for libelf and the emulator we use symlink-ing,
while elsewhere we use vpath. Do so for these two as well, thus also
eliminating the need for custom -iquote options and custom cleaning.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
tools/fuzz/libelf/Makefile | 8 +++-----
tools/fuzz/x86_instruction_emulator/Makefile | 6 ++----
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/tools/fuzz/libelf/Makefile b/tools/fuzz/libelf/Makefile
index 9211f75951..0df5c4c826 100644
--- a/tools/fuzz/libelf/Makefile
+++ b/tools/fuzz/libelf/Makefile
@@ -1,17 +1,15 @@
XEN_ROOT = $(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
+vpath %.c $(XEN_ROOT)/xen/common/libelf
+
LIBELF_OBJS := libelf-tools.o libelf-loader.o libelf-dominfo.o
-CFLAGS += -iquote ../../../xen/common/libelf
$(LIBELF_OBJS): CFLAGS += -Wno-pointer-sign
$(LIBELF_OBJS): CFLAGS += -DFUZZ_NO_LIBXC $(CFLAGS_xeninclude)
libelf-fuzzer.o: CFLAGS += $(CFLAGS_xeninclude)
-$(LIBELF_OBJS:.o=.c): libelf-%.c: ../../../xen/common/libelf/libelf-%.c FORCE
- ln -nsf $< $@
-
libelf.a: libelf-fuzzer.o $(LIBELF_OBJS)
$(AR) rc $@ $^
@@ -30,7 +28,7 @@ distclean: clean
.PHONY: clean
clean:
- rm -f *.o .*.d *.a *-libelf-fuzzer $(LIBELF_OBJS:.o=.c)
+ rm -f *.o .*.d *.a *-libelf-fuzzer
.PHONY: install
install: all
diff --git a/tools/fuzz/x86_instruction_emulator/Makefile
b/tools/fuzz/x86_instruction_emulator/Makefile
index 459743f4d9..524644ec28 100644
--- a/tools/fuzz/x86_instruction_emulator/Makefile
+++ b/tools/fuzz/x86_instruction_emulator/Makefile
@@ -9,8 +9,7 @@ x86-insn-fuzz-all:
endif
# Add libx86 to the build
-%.c: $(XEN_ROOT)/xen/lib/x86/%.c FORCE
- ln -nsf $< $@
+vpath %.c $(XEN_ROOT)/xen/lib/x86
x86_emulate: FORCE
mkdir -p $@
@@ -25,7 +24,6 @@ x86_emulate/%.h: x86_emulate ;
ln -nsf $< $@
CFLAGS += $(CFLAGS_xeninclude) -D__XEN_TOOLS__ -iquote .
-cpuid.o: CFLAGS += -iquote $(XEN_ROOT)/xen/lib/x86
GCOV_FLAGS := --coverage
%-cov.o: %.c
@@ -72,7 +70,7 @@ distclean: clean
clean:
rm -f *.a *.o $(DEPS_RM) *.gcda *.gcno *.gcov
rm -f afl-harness afl-harness-cov libfuzzer-harness
- rm -rf x86_emulate x86-emulate.c x86-emulate.h wrappers.c cpuid.c
+ rm -rf x86_emulate x86-emulate.c x86-emulate.h wrappers.c
.PHONY: install
install: all
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |