about summary refs log tree commit diff
path: root/llvm_mode
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2020-06-14 15:26:43 +0000
committerDavid Carlier <devnexen@gmail.com>2020-06-14 15:32:02 +0000
commit67d87dd2a9dbc393b56162e77ff3178f4e3f59fa (patch)
tree24a839cd715e1bc204edeff4ee886f04d7fca267 /llvm_mode
parentbfe5b88e782ffd3f97c2a25da60b0b36552a6a64 (diff)
downloadafl++-67d87dd2a9dbc393b56162e77ff3178f4e3f59fa.tar.gz
Porting to Haiku.
getrusage does not implement resident memory gathering, no shm api neither.
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/GNUmakefile4
-rw-r--r--llvm_mode/afl-clang-fast.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm_mode/GNUmakefile b/llvm_mode/GNUmakefile
index ca1e8e08..de247a60 100644
--- a/llvm_mode/GNUmakefile
+++ b/llvm_mode/GNUmakefile
@@ -196,7 +196,7 @@ ifeq "$(shell echo 'int main() {return 0; }' | $(CLANG_BIN) -x c - -fuse-ld=`com
 endif
 endif
 
-CFLAGS          ?= -O3 -funroll-loops -D_FORTIFY_SOURCE=2
+CFLAGS          ?= -O3 -funroll-loops -fpic -D_FORTIFY_SOURCE=2
 override CFLAGS += -Wall \
                -g -Wno-pointer-sign -I ../include/ \
                -DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
@@ -209,7 +209,7 @@ ifdef AFL_TRACE_PC
   $(info Compile option AFL_TRACE_PC is deprecated, just set AFL_LLVM_INSTRUMENT=PCGUARD to activate when compiling targets )
 endif
 
-CXXFLAGS          ?= -O3 -funroll-loops -D_FORTIFY_SOURCE=2
+CXXFLAGS          ?= -O3 -funroll-loops -fpic -D_FORTIFY_SOURCE=2
 override CXXFLAGS += -Wall -g -I ../include/ \
                      -DVERSION=\"$(VERSION)\" -Wno-variadic-macros
 
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 75504ea5..57504e65 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -464,7 +464,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
 
   }
 
-#ifdef USEMMAP
+#if defined(USEMMAP) && !defined(__HAIKU__)
   cc_params[cc_par_cnt++] = "-lrt";
 #endif