diff options
author | hexcoder- <heiko@hexco.de> | 2020-06-25 13:28:34 +0200 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-06-25 13:28:34 +0200 |
commit | 9858bc81a3fc1cccb2c3c73d824be2e1a4a18027 (patch) | |
tree | ab88747aaabb37f42fb5be00d6b1912e13000e70 | |
parent | b5573b3adbe01681156598ce064c228c0140f782 (diff) | |
download | afl++-9858bc81a3fc1cccb2c3c73d824be2e1a4a18027.tar.gz |
GNUmakefile: warn about '.' being first path in PATH environment variable. This causes recursion in 'as'. (seen in Haiku)
-rw-r--r-- | GNUmakefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile index 53bbb34d..06da959c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -311,6 +311,8 @@ ifndef AFL_NO_X86 test_x86: @echo "[*] Checking for the default compiler cc..." @type $(CC) >/dev/null || ( echo; echo "Oops, looks like there is no compiler '"$(CC)"' in your path."; echo; echo "Don't panic! You can restart with '"$(_)" CC=<yourCcompiler>'."; echo; exit 1 ) + @echo "[*] Testing the PATH environment variable..." + @test "$${PATH}" != "$${PATH#.:}" && { echo "Please remove current directory '.' from PATH to avoid recursion of 'as', thanks!"; echo; exit 1; } || : @echo "[*] Checking for the ability to compile x86 code..." @echo 'main() { __asm__("xorb %al, %al"); }' | $(CC) $(CFLAGS) -w -x c - -o .test1 || ( echo; echo "Oops, looks like your compiler can't generate x86 code."; echo; echo "Don't panic! You can use the LLVM or QEMU mode, but see docs/INSTALL first."; echo "(To ignore this error, set AFL_NO_X86=1 and try again.)"; echo; exit 1 ) @rm -f .test1 |