Skip to content
Snippets Groups Projects
build-all.sh 546 B
Newer Older
#!/bin/bash

echo
echo "Building Fuzzing Support"
echo

SCONSDEBUG=""
if [[ "$*" =~ "--debug" ]]; then
	SCONSDEBUG=" debug=1 "
fi

Anh Nguyen-Tuong's avatar
Anh Nguyen-Tuong committed
cd $ZFUZZ_HOME
if [ ! -e afl ]; then
	echo
	echo Setup AFL
	echo 
	wget http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz
	tar -xzvf afl-latest.tgz && rm afl-latest.tgz
Anh Nguyen-Tuong's avatar
Anh Nguyen-Tuong committed
	mv afl-* afl
	cd afl && make
	cd qemu_mode && ./build_qemu_support.sh

	# afl wants this
	sudo $ZFUZZ_HOME/util/afl_setup_core_pattern.sh
Anh Nguyen-Tuong's avatar
Anh Nguyen-Tuong committed
fi

cd $AFL_TRANSFORMS
scons $SCONSDEBUG -j 3 || exit

Anh Nguyen-Tuong's avatar
Anh Nguyen-Tuong committed
cd $ZFUZZ_HOME/libzafl
Anh Nguyen-Tuong's avatar
Anh Nguyen-Tuong committed
scons autozafl=1