about summary refs log tree commit diff
path: root/llvm_mode
diff options
context:
space:
mode:
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/Makefile8
-rw-r--r--llvm_mode/afl-clang-fast.c4
2 files changed, 8 insertions, 4 deletions
diff --git a/llvm_mode/Makefile b/llvm_mode/Makefile
index e2ed07d6..d3e0c739 100644
--- a/llvm_mode/Makefile
+++ b/llvm_mode/Makefile
@@ -154,10 +154,10 @@ test_build: $(PROGS)
 
 all_done: test_build
 	@echo "[+] All done! You can now use '../afl-clang-fast' to compile programs."
-ifeq "$(SHMAT_OK)" "0"
-	@echo "[!] shmat isn't working on your platform - compile every target with -lrt:"
-	@echo "[!]  CFLAGS=-lrt LDFLAGS=-lrt CC=afl-clang-fast CXX=afl-clang-fast++ ./configure"
-endif
+#ifeq "$(SHMAT_OK)" "0"
+#	@echo "[!] shmat isn't working on your platform - compile every target with -lrt:"
+#	@echo "[!]  CFLAGS=-lrt LDFLAGS=-lrt CC=afl-clang-fast CXX=afl-clang-fast++ ./configure"
+#endif
 
 .NOTPARALLEL: clean
 
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 1e2e04ea..366389b4 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -246,6 +246,10 @@ static void edit_params(u32 argc, char** argv) {
 
   }
 
+#ifdef USEMMAP
+  cc_params[cc_par_cnt++] = "-lrt";
+#endif
+
   cc_params[cc_par_cnt++] = "-D__AFL_HAVE_MANUAL_CONTROL=1";
   cc_params[cc_par_cnt++] = "-D__AFL_COMPILER=1";
   cc_params[cc_par_cnt++] = "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1";