瀏覽代碼

Merge pull request #97 from ziotom78/patch-1

Update Make.inc to detect OpenBSD
Viral B. Shah 9 年之前
父節點
當前提交
0036d70734
共有 2 個文件被更改,包括 11 次插入1 次删除
  1. 6 0
      Make.inc
  2. 5 1
      README.md

+ 6 - 0
Make.inc

@@ -103,6 +103,12 @@ SONAME_FLAG = -soname
 CFLAGS_add+=-fPIC
 CFLAGS_add+=-fPIC
 endif
 endif
 
 
+ifeq ($(OS), OpenBSD)
+SHLIB_EXT = so
+SONAME_FLAG = -soname
+CFLAGS_add+=-fPIC
+endif
+
 ifeq ($(OS), Darwin)
 ifeq ($(OS), Darwin)
 SHLIB_EXT = dylib
 SHLIB_EXT = dylib
 SONAME_FLAG = -install_name
 SONAME_FLAG = -install_name

+ 5 - 1
README.md

@@ -14,7 +14,7 @@ consistently across compilers and operating systems, and in 32-bit and
 
 
 ## Platform support
 ## Platform support
 
 
-OpenLibm builds on Linux, Mac OS X, Windows, and FreeBSD. It builds
+OpenLibm builds on Linux, Mac OS X, Windows, FreeBSD, and OpenBSD. It builds
 with both GCC and clang. Although largely tested on x86, it also
 with both GCC and clang. Although largely tested on x86, it also
 includes experimental support for ARM.
 includes experimental support for ARM.
 
 
@@ -27,3 +27,7 @@ includes experimental support for ARM.
    and FreeBSD.
    and FreeBSD.
 4. Use `make ARCH=i386` to build for i386. Other supported architectures are
 4. Use `make ARCH=i386` to build for i386. Other supported architectures are
    i486, i586, i686, x86_64, and various arm architectures.
    i486, i586, i686, x86_64, and various arm architectures.
+5. On OpenBSD, you need to install GNU Make (port name: `gmake`) and a recent
+   version of `gcc` (tested: 4.9.2), as the default version provided by OpenBSD
+   is too old (4.2.1). If you use OpenBSD's port system for this (port name:
+   `gcc`), run `make CC=egcc` to force Make to use the newer `gcc`.