xref: /relibc/openlibm/README.md (revision 0001d589a43a01e70dbb614b626944bf976bf909)
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. Use `make ARCH=i386` to build for i386. Other supported architectures are
30   i486, i586, i686, x86_64, and various arm architectures.
315. On OpenBSD, you need to install GNU Make (port name: `gmake`) and a recent
32   version of `gcc` (tested: 4.9.2), as the default version provided by OpenBSD
33   is too old (4.2.1). If you use OpenBSD's port system for this (port name:
34   `gcc`), run `make CC=egcc` to force Make to use the newer `gcc`.
35
36## Acknowledgements
37
38PowerPC support for openlibm was graciously sponsored by IBM.
39