OpenBSD build fix
* OpenBSD build fix proposal.
Mainly the gcc plugin, using one of the egcc/eg++ version available.
Needs pthread flag to r/w lock api.
* README update
MODIFY
GNUmakefile
GNUmakefile
@@ -218,6 +218,11 @@ ifneq "$(findstring NetBSD, $(shell uname))" ""
LDFLAGS += -lpthread
endif
+ifneq "$(findstring OpenBSD, $(shell uname))" ""
+ override CFLAGS += -pthread
+ LDFLAGS += -lpthread
+endif
+
TEST_CC = afl-gcc
COMM_HDR = include/alloc-inl.h include/config.h include/debug.h include/types.h

MODIFY
GNUmakefile.gcc_plugin
GNUmakefile.gcc_plugin
@@ -75,11 +75,19 @@ ifeq "$(TEST_MMAP)" "1"
endif
ifneq "$(shell uname -s)" "Haiku"
+ifneq "$(shell uname -s)" "OpenBSD"
LDFLAGS += -lrt
+endif
else
CFLAGS_SAFE += -DUSEMMAP=1
endif
+ifeq "$(shell uname -s)" "OpenBSD"
+ CC = egcc
+ CXX = eg++
+ PLUGIN_FLAGS += -I/usr/local/include
+endif
+
ifeq "$(shell uname -s)" "SunOS"
PLUGIN_FLAGS += -I/usr/include/gmp
endif

MODIFY
GNUmakefile.llvm
GNUmakefile.llvm
@@ -279,7 +279,7 @@ ifeq "$(shell uname)" "OpenBSD"
CLANG_CPPFL += -mno-retpoline
CFLAGS += -mno-retpoline
# Needed for unwind symbols
- LDFLAGS += -lc++abi
+ LDFLAGS += -lc++abi -lpthread
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"

MODIFY
README.md
README.md
@@ -1081,6 +1081,7 @@ without feedback, bug reports, or patches from:
Andrea Biondo Vincent Le Garrec
Khaled Yakdan Kuang-che Wu
Josephine Calliotte Konrad Welc
+ David Carlier
```
Thank you!

MODIFY
unicorn_mode/unicornafl
unicorn_mode/unicornafl
-Subproject commit 0bf26f6c2601e1c1c84998551ed7d50b4108fbdf
+Subproject commit c6d6647161a32bae88785a618fcd828d1711d9e6

OpenBSD build fix (#566)

* OpenBSD build fix proposal.
Mainly the gcc plugin, using one of the egcc/eg++ version available.
Needs pthread flag to r/w lock api.

* README update