From c9515a79dee5012d25fd228e6c281f955dbf3ff0 Mon Sep 17 00:00:00 2001 From: hans Date: Tue, 25 Aug 2015 09:30:32 +0200 Subject: [PATCH 1/2] Make it build on openbsd. Build on amd64 and sparc64. --- configure.ac | 2 ++ src/Makefile.am | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 8016e5ad..5b124c61 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,7 @@ case $host_os in ;; *openbsd*) bsd=true + openbsd=true AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD]) ;; *netbsd*) @@ -133,6 +134,7 @@ AC_ARG_WITH(windows2000, AM_CONDITIONAL(LINUX, test "$linux" = true) AM_CONDITIONAL(BSD, test "$bsd" = true) +AM_CONDITIONAL(OPENBSD, test "$openbsd" = true) AM_CONDITIONAL(DARWIN, test "$darwin" = true) AM_CONDITIONAL(SOLARIS, test "$solaris" = true) AM_CONDITIONAL(MINGW, test "$mingw" = true) diff --git a/src/Makefile.am b/src/Makefile.am index bcffbf29..bcf03901 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -191,10 +191,12 @@ sptps_test_LDADD = libtincd.la libed25519.la libtincconf.la libchacha_poly1305.l sptps_keypair_LDADD = libed25519.la libtincconf.la libchacha_poly1305.la libtincd.la libchacha_poly1305.la if !DARWIN +if !OPENBSD sptps_speed_LDADD += -lrt sptps_test_LDADD += -lrt sptps_keypair_LDADD += -lrt endif +endif LIBS = @LIBS@ -lm From 4710de84553281ea981827ba441a23b7c1360445 Mon Sep 17 00:00:00 2001 From: hans Date: Tue, 25 Aug 2015 09:09:36 +0200 Subject: [PATCH 2/2] Activate fstack-protector-all on OpenBSD --- src/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index bcf03901..8a73b972 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -205,4 +205,8 @@ LIBS += -lpcap endif AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -iquote. +if OPENBSD +AM_CFLAGS += -fstack-protector-all +endif + #-fsanitize=address