diff options
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!" |