mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-05 00:05:12 -04:00
Add support for building on OpenBSD (#471)
This commit is contained in:
parent
0c32a7000e
commit
7005a1d07f
13
README.md
13
README.md
@ -105,6 +105,19 @@ You need to install the following packages using brew (or a package manager of y
|
||||
|
||||
brew install autoconf automake libtool openssl wget
|
||||
|
||||
### Install dependencies for OpenBSD
|
||||
|
||||
You need to install the following packages using pkg_add:
|
||||
|
||||
pkg_add automake libtool
|
||||
|
||||
On OpenBSD you have to explicitly set the environment variables `AUTOCONF_VERSION` and
|
||||
`AUTOMAKE_VERSION` to a version installed on your system.
|
||||
|
||||
export AUTOCONF_VERSION=`ls -1 /usr/local/bin/autoreconf-* | sort | tail -n 1 | cut -d'-' -f2`
|
||||
export AUTOMAKE_VERSION=`ls -1 /usr/local/bin/automake-* | sort | tail -n 1 | cut -d'-' -f2`
|
||||
|
||||
|
||||
### Building
|
||||
|
||||
To build, first clone or download the source from GitHub:
|
||||
|
@ -16,6 +16,9 @@ AC_DEFUN([DETECT_HOST_AND_CPU], [
|
||||
linux*)
|
||||
linux=true
|
||||
;;
|
||||
openbsd*)
|
||||
openbsd=true
|
||||
;;
|
||||
*)
|
||||
#Default Case
|
||||
AC_MSG_ERROR([Your platform is not currently supported])
|
||||
@ -24,6 +27,7 @@ AC_DEFUN([DETECT_HOST_AND_CPU], [
|
||||
|
||||
AM_CONDITIONAL([ON_DARWIN], [test "x$darwin" = xtrue])
|
||||
AM_CONDITIONAL([ON_LINUX], [test "x$linux" = xtrue])
|
||||
AM_CONDITIONAL([ON_OPENBSD], [test "x$openbsd" = xtrue])
|
||||
|
||||
# Enable assembly optimizations here
|
||||
# Appearenly asm optimizations do not work well with darwin
|
||||
|
10
src/sig/picnic/external/endian_compat.h
vendored
10
src/sig/picnic/external/endian_compat.h
vendored
@ -59,11 +59,17 @@ static inline uint64_t AATR_CONST bswap64(uint64_t x) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* OS X / OpenBSD */
|
||||
#if defined(__APPLE__) || defined(__OpenBSD__)
|
||||
/* OS X */
|
||||
#if defined(__APPLE__)
|
||||
#include <machine/endian.h>
|
||||
#endif
|
||||
|
||||
/* OpenBSD */
|
||||
#if defined(__OpenBSD__)
|
||||
#include <machine/endian.h>
|
||||
#define HAVE_HOSTSWAP
|
||||
#endif
|
||||
|
||||
/* other BSDs */
|
||||
#if defined(__FreeBSD__) || defined(__NETBSD__) || defined(__NetBSD__)
|
||||
#include <sys/endian.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user