about summary refs log tree commit diff
path: root/GNUmakefile.gcc_plugin
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2020-09-26 18:02:19 +0100
committerGitHub <noreply@github.com>2020-09-26 19:02:19 +0200
commite85fde201e988cf9e7cf608be394977f7c045a75 (patch)
treef246e56c69f8a09247a23ce797da408854fe4a99 /GNUmakefile.gcc_plugin
parente301822c684b4948ca5e21b40f437940469238f5 (diff)
downloadafl++-e85fde201e988cf9e7cf608be394977f7c045a75.tar.gz
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
Diffstat (limited to 'GNUmakefile.gcc_plugin')
-rw-r--r--GNUmakefile.gcc_plugin8
1 files changed, 8 insertions, 0 deletions
diff --git a/GNUmakefile.gcc_plugin b/GNUmakefile.gcc_plugin
index 55b79182..e3108511 100644
--- a/GNUmakefile.gcc_plugin
+++ b/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