[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/8] tools/fuzz: Use $(CC) for linking the harnesses



This is necessary to make use of compiler features such as UBSAN.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CC: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/fuzz/libelf/Makefile                   | 1 +
 tools/fuzz/x86_instruction_emulator/Makefile | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tools/fuzz/libelf/Makefile b/tools/fuzz/libelf/Makefile
index af44c40..c884703 100644
--- a/tools/fuzz/libelf/Makefile
+++ b/tools/fuzz/libelf/Makefile
@@ -20,6 +20,7 @@ libelf.a: $(ELF_LIB_OBJS)
 libelf-fuzzer-all: libelf.a libelf-fuzzer.o
 
 afl-libelf-fuzzer: afl-libelf-fuzzer.o libelf-fuzzer.o $(ELF_LIB_OBJS)
+       $(CC) $(CFLAGS) $^ -o $@
 
 # Common targets
 .PHONY: all
diff --git a/tools/fuzz/x86_instruction_emulator/Makefile 
b/tools/fuzz/x86_instruction_emulator/Makefile
index 98fd398..673b5f0 100644
--- a/tools/fuzz/x86_instruction_emulator/Makefile
+++ b/tools/fuzz/x86_instruction_emulator/Makefile
@@ -34,6 +34,7 @@ x86-insn-emulator.a: x86_emulate.o
        $(AR) rc $@ $^
 
 afl-x86-insn-emulator-fuzzer: afl-x86-insn-emulator-fuzzer.o 
x86-insn-emulator-fuzzer.o x86_emulate.o
+       $(CC) $(CFLAGS) $^ -o $@
 
 # Common targets
 .PHONY: all
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.