diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2021-01-29 15:14:20 +0100 |
---|---|---|
committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2021-01-29 15:14:20 +0100 |
commit | d21ca3e48095ebba72e2c40aff1437a49882a415 (patch) | |
tree | c8823d5e40fa12fd06c3a18927ff630381cab226 /qemu_mode/build_qemu_support.sh | |
parent | 1b1006ddd418192cfbf5d613b49edd53b424ded5 (diff) | |
download | afl++-d21ca3e48095ebba72e2c40aff1437a49882a415.tar.gz |
libqasan and use target cross compiler to compile target qemu libs
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..cef6ca07 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!" |