From 9858bc81a3fc1cccb2c3c73d824be2e1a4a18027 Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Thu, 25 Jun 2020 13:28:34 +0200 Subject: GNUmakefile: warn about '.' being first path in PATH environment variable. This causes recursion in 'as'. (seen in Haiku) --- GNUmakefile | 2 ++ 1 file changed, 2 insertions(+) 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='."; 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 -- cgit 1.4.1