Skip to content

Commit 0036d70

Browse files
committed
Merge pull request #97 from ziotom78/patch-1
Update Make.inc to detect OpenBSD
2 parents ef29d06 + 3f0a53d commit 0036d70

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

Make.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ SONAME_FLAG = -soname
103103
CFLAGS_add+=-fPIC
104104
endif
105105

106+
ifeq ($(OS), OpenBSD)
107+
SHLIB_EXT = so
108+
SONAME_FLAG = -soname
109+
CFLAGS_add+=-fPIC
110+
endif
111+
106112
ifeq ($(OS), Darwin)
107113
SHLIB_EXT = dylib
108114
SONAME_FLAG = -install_name

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ consistently across compilers and operating systems, and in 32-bit and
1414

1515
## Platform support
1616

17-
OpenLibm builds on Linux, Mac OS X, Windows, and FreeBSD. It builds
17+
OpenLibm builds on Linux, Mac OS X, Windows, FreeBSD, and OpenBSD. It builds
1818
with both GCC and clang. Although largely tested on x86, it also
1919
includes experimental support for ARM.
2020

@@ -27,3 +27,7 @@ includes experimental support for ARM.
2727
and FreeBSD.
2828
4. Use `make ARCH=i386` to build for i386. Other supported architectures are
2929
i486, i586, i686, x86_64, and various arm architectures.
30+
5. On OpenBSD, you need to install GNU Make (port name: `gmake`) and a recent
31+
version of `gcc` (tested: 4.9.2), as the default version provided by OpenBSD
32+
is too old (4.2.1). If you use OpenBSD's port system for this (port name:
33+
`gcc`), run `make CC=egcc` to force Make to use the newer `gcc`.

0 commit comments

Comments
 (0)