Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -34,7 +34,7 @@ DEFINES   = -DVERSION=\"$(GIT_VERSION)\"
 
 # for dynamic linking
 LIBS      = -lssl -lcrypto
-ifneq ($(OS), FreeBSD)
+ifneq ($(OS),$(filter $(OS),OpenBSD FreeBSD))
 ifneq ($(findstring MINGW64,$(OS)),MINGW64)
 	LIBS += -ldl
 else
@@ -54,6 +54,7 @@ CFLAGS  += -D_FORTIFY_SOURCE=2 -fstack-protector-all -
 # Don't enable some hardening flags on OS X because it uses an old version of Clang
 ifneq ($(OS), Darwin)
 ifneq ($(OS), SunOS)
+ifneq ($(OS), OpenBSD)
 ifneq ($(findstring CYGWIN,$(OS)),CYGWIN)
 ifneq ($(findstring MINGW64,$(OS)),MINGW64)
 	LDFLAGS += -pie -z relro -z now
@@ -63,6 +64,7 @@ endif
 endif
 endif
 endif
+endif
 
 # Force C11 mode to fix the build on very old version of GCC
 CFLAGS += -std=gnu11
@@ -77,7 +79,7 @@ LIBS	     = ./openssl/libssl.a ./openssl/libcrypto.a -
 else
 LIBS         = -lssl -lcrypto -lz -lpthread
 endif
-ifneq ($(OS), FreeBSD)
+ifneq ($(OS),$(filter $(OS),OpenBSD FreeBSD))
 ifneq ($(findstring CYGWIN,$(OS)),CYGWIN)
 	LIBS += -ldl
 endif
@@ -137,6 +139,7 @@ uninstall:
 	rm -f $(DESTDIR)$(BINDIR)/sslscan
 	rm -f $(DESTDIR)$(MAN1DIR)/sslscan.1
 
+ifneq ($(OS), OpenBSD)
 .openssl.is.fresh: opensslpull
 	@true
 
@@ -149,9 +152,15 @@ opensslpull:
 	else \
 		git clone --depth 1 -b $$upstream https://github.com/openssl/openssl ./openssl && cd ./openssl && touch ../.openssl.is.fresh ; \
 	fi
+endif
 
+CONF_FLAGS=
+ifeq ($(ARCH),$(filter $(ARCH),armv7 sparc64))
+	CONF_FLAGS += no-asm
+endif
+
 openssl/Makefile: .openssl.is.fresh
-	cd ./openssl; ./Configure -v -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIC no-shared enable-weak-ssl-ciphers zlib
+	cd ./openssl; ./Configure -v -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIC no-shared enable-weak-ssl-ciphers zlib $(CONF_FLAGS)
 
 openssl/libcrypto.a: openssl/Makefile
 	$(MAKE) -j $(NUM_PROCS) -C openssl depend
