about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-02-09 10:31:38 +0100
committerGitHub <noreply@github.com>2024-02-09 10:31:38 +0100
commit3cbaefd24779580b1617284a328177db8aaad93f (patch)
treea2ab8e5b47324ded9cd9e933a451916065905d5d
parent88e41f01c839ed5c46882222ad7e1f5c3e7d9e20 (diff)
parent037a14f62175226850f7a1b27f376843097b0e30 (diff)
downloadafl++-3cbaefd24779580b1617284a328177db8aaad93f.tar.gz
Merge pull request #1995 from seanm/issue1981
Fixed issue #1981: document PATH correctly based on homebrew version
-rw-r--r--docs/INSTALL.md33
1 files changed, 18 insertions, 15 deletions
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index 9f53afed..5260a65c 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -97,9 +97,9 @@ These build options exist:
 
 e.g.: `make LLVM_CONFIG=llvm-config-14`
 
-## MacOS X on x86 and arm64 (M1)
+## macOS on x86_64 and arm64
 
-MacOS has some gotchas due to the idiosyncrasies of the platform.
+macOS has some gotchas due to the idiosyncrasies of the platform.
 
 To build AFL, install llvm (and perhaps gcc) from brew and follow the general
 instructions for Linux. If possible, avoid Xcode at all cost.
@@ -108,17 +108,20 @@ instructions for Linux. If possible, avoid Xcode at all cost.
 brew install wget git make cmake llvm gdb coreutils
 ```
 
-Be sure to setup `PATH` to point to the correct clang binaries and use the
-freshly installed clang, clang++, llvm-config, gmake and coreutils, e.g.:
+Depending on your macOS system + brew version, brew may be installed in different places.
+You can check with `brew info llvm` to know where, then create a variable for it:
 
 ```shell
-# Depending on your MacOS system + brew version it is either
-export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
+export HOMEBREW_BASE="/opt/homebrew/opt"
 # or
-export PATH="/usr/local/opt/llvm/bin:/usr/local/opt/coreutils/libexec/gnubin:$PATH"
-# you can check with "brew info llvm"
+export HOMEBREW_BASE="/usr/local/opt"
+```
 
-export PATH="/usr/local/bin:$PATH"
+Be sure to setup `PATH` to point to the correct clang binaries and use the
+freshly installed clang, clang++, llvm-config, gmake and coreutils, e.g.:
+
+```shell
+export PATH="$HOMEBREW_BASE/coreutils/libexec/gnubin:/usr/local/bin:$HOMEBREW_BASE/llvm/bin:$PATH"
 export CC=clang
 export CXX=clang++
 gmake
@@ -131,9 +134,9 @@ sudo gmake install
 `afl-gcc` will fail unless you have GCC installed, but that is using outdated
 instrumentation anyway. `afl-clang` might fail too depending on your PATH setup.
 But you don't want neither, you want `afl-clang-fast` anyway :) Note that
-`afl-clang-lto`, `afl-gcc-fast` and `qemu_mode` are not working on MacOS.
+`afl-clang-lto`, `afl-gcc-fast` and `qemu_mode` are not working on macOS.
 
-The crash reporting daemon that comes by default with MacOS X will cause
+The crash reporting daemon that comes by default with macOS will cause
 problems with fuzzing. You need to turn it off:
 
 ```
@@ -146,16 +149,16 @@ and definitely don't look POSIX-compliant. This means two things:
 
   - Fuzzing will be probably slower than on Linux. In fact, some folks report
     considerable performance gains by running the jobs inside a Linux VM on
-    MacOS X.
+    macOS.
   - Some non-portable, platform-specific code may be incompatible with the AFL++
     forkserver. If you run into any problems, set `AFL_NO_FORKSRV=1` in the
     environment before starting afl-fuzz.
 
-User emulation mode of QEMU does not appear to be supported on MacOS X, so
+User emulation mode of QEMU does not appear to be supported on macOS, so
 black-box instrumentation mode (`-Q`) will not work. However, FRIDA mode (`-O`)
-works on both x86 and arm64 MacOS boxes.
+works on both x86 and arm64 macOS boxes.
 
-MacOS X supports SYSV shared memory used by AFL's instrumentation, but the
+macOS supports SYSV shared memory used by AFL's instrumentation, but the
 default settings aren't usable with AFL++. The default settings on 10.14 seem to
 be: