about summary refs log tree commit diff
path: root/qemu_mode
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-04-19 00:37:23 +0200
committerDominik Maier <domenukk@gmail.com>2020-04-21 13:14:34 +0200
commit5b9928f1a9d4b017ea04365ca8b522fde71236eb (patch)
tree22d80bf5d5a26223874bc2bd3d7f5ab50651f18f /qemu_mode
parent856a59901e859a70dd37867b12e981e8c67ae27e (diff)
downloadafl++-5b9928f1a9d4b017ea04365ca8b522fde71236eb.tar.gz
fix some gcc dependencies and build problems on debian 32-Bit,
adapted qemu_mode AFL_ENTRYPOINT test case for 32 bit
Diffstat (limited to 'qemu_mode')
-rwxr-xr-xqemu_mode/build_qemu_support.sh9
-rw-r--r--qemu_mode/unsigaction/Makefile4
2 files changed, 10 insertions, 3 deletions
diff --git a/qemu_mode/build_qemu_support.sh b/qemu_mode/build_qemu_support.sh
index b34a149b..1b6690c6 100755
--- a/qemu_mode/build_qemu_support.sh
+++ b/qemu_mode/build_qemu_support.sh
@@ -83,6 +83,13 @@ if [ ! -d "/usr/include/glib-2.0/" -a ! -d "/usr/local/include/glib-2.0/" ]; the
 
 fi
 
+if [ ! -d "/usr/include/pixman-1/" -a ! -d "/usr/local/include/pixman-1/" ]; then
+
+  echo "[-] Error: devel version of 'pixman-1' not found, please install first."
+  PREREQ_NOTFOUND=1
+
+fi
+
 if echo "$CC" | grep -qF /afl-; then
 
   echo "[-] Error: do not use afl-gcc or afl-clang to compile this tool."
@@ -230,7 +237,7 @@ if [ "$ORIG_CPU_TARGET" = "" ]; then
 
   make >/dev/null || exit 1
 
-  gcc test-instr.c -o test-instr || exit 1
+  cc test-instr.c -o test-instr || exit 1
 
   unset AFL_INST_RATIO
   export ASAN_OPTIONS=detect_leaks=0
diff --git a/qemu_mode/unsigaction/Makefile b/qemu_mode/unsigaction/Makefile
index d5063dab..206a8f07 100644
--- a/qemu_mode/unsigaction/Makefile
+++ b/qemu_mode/unsigaction/Makefile
@@ -25,10 +25,10 @@ all:  $(TARGETS)
 	@if [ "$(AFL_NO_X86)" != "" ]; then echo "[!] Note: skipping compilation of unsigaction (AFL_NO_X86 set)."; fi
 
 unsigaction32.so:
-	@$(CC) -m32 -fPIC -shared unsigaction.c -o unsigaction32.so 2>/dev/null ; if [ "$$?" = "0" ]; then echo "unsigaction32 build success"; else echo "unsigaction32 build failure (that's fine)"; fi
+	@if $(CC) -m32 -fPIC -shared unsigaction.c -o unsigaction32.so 2>/dev/null ; then echo "unsigaction32 build success"; else echo "unsigaction32 build failure (that's fine)"; fi
 
 unsigaction64.so:
-	$(CC) -m64 -fPIC -shared unsigaction.c -o unsigaction64.so
+	@if $(CC) -m64 -fPIC -shared unsigaction.c -o unsigaction64.so 2>/dev/null ; then echo "unsigaction64 build success"; else echo "unsigaction64 build failure (that's fine)"; fi
 
 clean:
 	rm -f unsigaction32.so unsigaction64.so