about summary refs log tree commit diff
path: root/llvm_mode
diff options
context:
space:
mode:
authorhexcoder <hexcoder-@users.noreply.github.com>2020-06-03 18:32:44 +0200
committerGitHub <noreply@github.com>2020-06-03 18:32:44 +0200
commita79c0021450041c188066d1f94fe8ed9d7597ef0 (patch)
tree88b49223f25499319b2979599701bfc2877421c1 /llvm_mode
parentea91cfdf9aa57f7db10b8c6cb9c6ac41939a274a (diff)
parent0adb664a315dbd3c5e63c348de0dfd44ff05edb4 (diff)
downloadafl++-a79c0021450041c188066d1f94fe8ed9d7597ef0.tar.gz
Merge pull request #390 from devnexen/obsd_no_retpoline
OpenBSD build update and llvm mode fix
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/GNUmakefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm_mode/GNUmakefile b/llvm_mode/GNUmakefile
index 0666fde0..5efe1e12 100644
--- a/llvm_mode/GNUmakefile
+++ b/llvm_mode/GNUmakefile
@@ -226,6 +226,10 @@ endif
 
 ifeq "$(shell uname)" "OpenBSD"
   CLANG_LFL += `$(LLVM_CONFIG) --libdir`/libLLVM.so
+  CLANG_CFL += -mno-retpoline
+  CFLAGS += -mno-retpoline
+  # Needed for unwind symbols
+  LDFLAGS += -lc++abi
 endif
 
 ifeq "$(shell echo '$(HASH)include <sys/ipc.h>@$(HASH)include <sys/shm.h>@int main() { int _id = shmget(IPC_PRIVATE, 65536, IPC_CREAT | IPC_EXCL | 0600); shmctl(_id, IPC_RMID, 0); return 0;}' | tr @ '\n' | $(CC) -x c - -o .test2 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1"