Makefiles: add targets to build unix port, mpy-cross for fuzzing
This assumes you have properly install afl-fuzz with afl-clang-fast. Tested with AFLplusplus 2.60c-75-g2c6847b.
This commit is contained in:
parent
0c2894c725
commit
74bf17bb0d
1
mpy-cross/.gitignore
vendored
1
mpy-cross/.gitignore
vendored
@ -3,4 +3,5 @@
|
||||
/mpy-cross.static
|
||||
/mpy-cross.static.exe
|
||||
/mpy-cross.static-raspbian
|
||||
/mpy-cross.fuzz
|
||||
/pitools
|
||||
|
6
mpy-cross/Makefile.fuzz
Normal file
6
mpy-cross/Makefile.fuzz
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
PROG=mpy-cross.fuzz
|
||||
BUILD=build-static
|
||||
STATIC_BUILD=1
|
||||
CC=afl-clang-fast
|
||||
include mpy-cross.mk
|
@ -277,6 +277,18 @@ coverage_test: coverage
|
||||
coverage_clean:
|
||||
$(MAKE) V=2 BUILD=build-coverage PROG=micropython_coverage clean
|
||||
|
||||
# build an interpreter for fuzzing
|
||||
fuzz:
|
||||
$(MAKE) \
|
||||
CC=afl-clang-fast DEBUG=1 \
|
||||
CFLAGS_EXTRA='$(CFLAGS_EXTRA) -ffunction-sections' \
|
||||
LDFLAGS_EXTRA='$(LDFLAGS_EXTRA)' \
|
||||
BUILD=build-fuzz PROG=micropython_fuzz
|
||||
|
||||
fuzz_clean:
|
||||
$(MAKE) V=2 BUILD=build-fuzz PROG=micropython_fuzz clean
|
||||
|
||||
|
||||
# Value of configure's --host= option (required for cross-compilation).
|
||||
# Deduce it from CROSS_COMPILE by default, but can be overridden.
|
||||
ifneq ($(CROSS_COMPILE),)
|
||||
|
Loading…
Reference in New Issue
Block a user