diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2021-01-29 18:52:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-29 18:52:45 +0100 |
commit | b06e3d9f2b4a4cff5d5ba90b89ea3edaaca3ca12 (patch) | |
tree | e644d51ded5c1b8b2d65635087129ada735d9ea0 /qemu_mode/build_qemu_support.sh | |
parent | debd832f36b142e1b0b1bab8a6966848a51878f8 (diff) | |
parent | aaec45b6528e41a217de95ca3db1173fb2539672 (diff) | |
download | afl++-b06e3d9f2b4a4cff5d5ba90b89ea3edaaca3ca12.tar.gz |
Merge pull request #715 from AFLplusplus/qasan
Qasan
Diffstat (limited to 'qemu_mode/build_qemu_support.sh')
-rwxr-xr-x | qemu_mode/build_qemu_support.sh | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/qemu_mode/build_qemu_support.sh b/qemu_mode/build_qemu_support.sh index 608db9e4..a435f6f6 100755 --- a/qemu_mode/build_qemu_support.sh +++ b/qemu_mode/build_qemu_support.sh @@ -360,10 +360,23 @@ else fi -echo "[+] Building libcompcov ..." -make -C libcompcov && echo "[+] libcompcov ready" -echo "[+] Building unsigaction ..." -make -C unsigaction && echo "[+] unsigaction ready" +ORIG_CROSS="$CROSS" + +if [ "$ORIG_CROSS" = "" ]; then + CROSS=$CPU_TARGET-linux-gnu-gcc +fi + +if ! command -v "$CROSS" > /dev/null +then + echo "[!] Cross compiler $CROSS could not be found, cannot compile libcompcov libqasan and unsigaction" +else + echo "[+] Building libcompcov ..." + make -C libcompcov CC=$CROSS && echo "[+] libcompcov ready" + echo "[+] Building unsigaction ..." + make -C unsigaction CC=$CROSS && echo "[+] unsigaction ready" + echo "[+] Building libqasan ..." + make -C libqasan CC=$CROSS && echo "[+] unsigaction ready" +fi echo "[+] All done for qemu_mode, enjoy!" |