Skip to content

Commit bf188ae

Browse files
committed
Build with Clang on OpenBSD
This is the default compiler starting with OpenBSD 6.2, and has been installed by default on OpenBSD since 6.0.
1 parent b7b3b4b commit bf188ae

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

Make.inc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@ endif
2424
USEGCC = 1
2525
USECLANG = 0
2626

27-
ifeq ($(OS), Darwin)
28-
USEGCC = 0
29-
USECLANG = 1
30-
endif
31-
32-
ifeq ($(OS), FreeBSD)
27+
ifneq (,$(findstring $(OS),Darwin FreeBSD OpenBSD))
3328
USEGCC = 0
3429
USECLANG = 1
3530
endif

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,20 @@ consistently across compilers and operating systems, and in 32-bit and
1616

1717
OpenLibm builds on Linux, Mac OS X, Windows, FreeBSD, OpenBSD, and DragonFly BSD.
1818
It builds with both GCC and clang. Although largely tested and widely
19-
used on x86 architectures, openlibm also supports ARM and
20-
powerPC.
19+
used on x86 architectures, OpenLibm also supports ARM and
20+
PowerPC.
2121

2222
## Build instructions
2323

24-
1. Use `make` to build OpenLibm.
24+
1. Use GNU Make to build OpenLibm. This is `make` on most systems, but `gmake` on BSDs.
2525
2. Use `make USEGCC=1` to build with GCC. This is the default on
2626
Linux and Windows.
27-
3. Use `make USECLANG=1` to build with clang. This is the default on OS X
28-
and FreeBSD.
27+
3. Use `make USECLANG=1` to build with clang. This is the default on OS X, FreeBSD,
28+
and OpenBSD.
2929
4. Architectures are auto-detected. Use `make ARCH=i386` to force a
3030
build for i386. Other supported architectures are i486, i586, and
3131
i686. GCC 4.8 is the minimum requirement for correct codegen on
3232
older 32-bit architectures.
33-
5. On OpenBSD, you need to install GNU Make (port name: `gmake`) and a recent
34-
version of `gcc` (tested: 4.9.2), as the default version provided by OpenBSD
35-
is too old (4.2.1). If you use OpenBSD's port system for this (port name:
36-
`gcc`), run `make CC=egcc` to force Make to use the newer `gcc`.
3733

3834
## Acknowledgements
3935

0 commit comments

Comments
 (0)