about summary refs log tree commit diff
path: root/llvm_mode
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-14 17:38:17 +0200
committerGitHub <noreply@github.com>2020-06-14 17:38:17 +0200
commit741dce3ca6e3406b75576ad097e1209ca40a26ad (patch)
tree4a577af893d3a7083ec3ae827e2d557b6374d3e4 /llvm_mode
parentab142282a32f93725926d59899ab17a62e65f060 (diff)
parent67d87dd2a9dbc393b56162e77ff3178f4e3f59fa (diff)
downloadafl++-741dce3ca6e3406b75576ad097e1209ca40a26ad.tar.gz
Merge pull request #404 from devnexen/haiku_porting
Porting to Haiku.
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