diff options
author | van Hauser <vh@thc.org> | 2020-02-28 06:50:15 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-02-28 06:50:15 +0100 |
commit | 7fa289316a52cec245433b22c54c3b86cd78e60e (patch) | |
tree | 9dd75f46e2bd1d275479356010138d895dde1ef8 | |
parent | 0e8388d3eaa0f202091083c0fb623d55ce775bd4 (diff) | |
download | afl++-7fa289316a52cec245433b22c54c3b86cd78e60e.tar.gz |
fix for qemu_mode where capstone 4.0+ is installed
-rw-r--r-- | docs/Changelog.md | 5 | ||||
-rwxr-xr-x | qemu_mode/build_qemu_support.sh | 4 | ||||
-rw-r--r-- | qemu_mode/patches/configure.diff | 23 |
3 files changed, 20 insertions, 12 deletions
diff --git a/docs/Changelog.md b/docs/Changelog.md index 6112e76b..2548a356 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -10,8 +10,9 @@ sending a mail to <afl-users+subscribe@googlegroups.com>. ### Version ++2.62d (developt): - - - ... your patch? :-) + - qemu_mode now uses solely the internal capstone version to fix builds + on modern Linux distributions + - more tools get environment variable usage info in the help output ### Version ++2.62c (release): diff --git a/qemu_mode/build_qemu_support.sh b/qemu_mode/build_qemu_support.sh index 6882039b..09c04e7f 100755 --- a/qemu_mode/build_qemu_support.sh +++ b/qemu_mode/build_qemu_support.sh @@ -177,7 +177,7 @@ if [ "$STATIC" = "1" ]; then --disable-sdl --disable-seccomp --disable-smartcard --disable-snappy --disable-spice --disable-libssh2 \ --disable-libusb --disable-usb-redir --disable-vde --disable-vhost-net --disable-virglrenderer \ --disable-virtfs --disable-vnc --disable-vte --disable-xen --disable-xen-pci-passthrough --disable-xfsctl \ - --enable-linux-user --disable-system --disable-blobs --disable-tools \ + --enable-linux-user --disable-system --disable-blobs --disable-tools --enable-capstone=internal \ --target-list="${CPU_TARGET}-linux-user" --static --disable-pie --cross-prefix=$CROSS_PREFIX || exit 1 else @@ -186,7 +186,7 @@ else # improvement, much to my surprise. Not sure how universal this is.. ./configure --disable-system \ - --enable-linux-user --disable-gtk --disable-sdl --disable-vnc \ + --enable-linux-user --disable-gtk --disable-sdl --disable-vnc --enable-capstone=internal \ --target-list="${CPU_TARGET}-linux-user" --enable-pie $CROSS_PREFIX || exit 1 fi diff --git a/qemu_mode/patches/configure.diff b/qemu_mode/patches/configure.diff index acb96294..e265edae 100644 --- a/qemu_mode/patches/configure.diff +++ b/qemu_mode/patches/configure.diff @@ -1,12 +1,18 @@ -diff --git a/configure b/configure -index 1c9f609..3edc9a7 100755 ---- a/configure -+++ b/configure -@@ -4603,6 +4603,21 @@ if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \ - libs_softmmu="-lutil $libs_softmmu" +--- a/configure 2019-08-02 18:04:50.000000000 +0200 ++++ b/configure 2020-02-28 06:31:30.424895061 +0100 +@@ -1479,6 +1479,8 @@ + ;; + --enable-capstone=system) capstone="system" + ;; ++ --enable-capstone=internal) capstone="internal" ++ ;; + --with-git=*) git="$optarg" + ;; + --enable-git-update) git_update=yes +@@ -4604,6 +4606,21 @@ fi -+########################################## + ########################################## +cat > $TMPC << EOF +#include <dlfcn.h> +#include <stdlib.h> @@ -21,6 +27,7 @@ index 1c9f609..3edc9a7 100755 + error_exit "libdl check failed" +fi + - ########################################## ++########################################## # spice probe if test "$spice" != "no" ; then + cat > $TMPC << EOF |