xref: /relibc/openlibm/README.md (revision 226faf4e11ab2266db613304089423550f210bac)
1# OpenLibm
2
3[![Build Status](https://travis-ci.org/JuliaLang/openlibm.svg?branch=master)](https://travis-ci.org/JuliaLang/openlibm)
4
5[OpenLibm](http://www.openlibm.org) is an effort to have a high quality, portable, standalone
6C mathematical library ([`libm`](http://en.wikipedia.org/wiki/libm)).
7It can be used standalone in applications and programming language
8implementations.
9
10The project was born out of a need to have a good `libm` for the
11[Julia programming langage](http://www.julialang.org) that worked
12consistently across compilers and operating systems, and in 32-bit and
1364-bit environments.
14
15## Platform support
16
17OpenLibm builds on Linux, Mac OS X, Windows, FreeBSD, and OpenBSD. It
18builds with both GCC and clang. Although largely tested and widely
19used on x86 architectures, openlibm also supports ARM and
20powerPC.
21
22## Build instructions
23
241. Use `make` to build OpenLibm.
252. Use `make USEGCC=1` to build with GCC. This is the default on
26   Linux and Windows.
273. Use `make USECLANG=1` to build with clang. This is the default on OS X
28   and FreeBSD.
294. Architectures are auto-detected. Use `make ARCH=i386` to force a
30   build for i386. Other supported architectures are i486, i586, and
31   i686. GCC 4.8 is the minimum requirement for correct codegen on
32   older 32-bit architectures.
335. 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`.
37
38## Acknowledgements
39
40PowerPC support for openlibm was graciously sponsored by IBM.
41