xref: /relibc/openlibm/README.md (revision c29e8b1b6ee79e17ab5d8a0975500fb6db518681)
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 builds
18with both GCC and clang. Although largely tested on x86, it also
19includes experimental support for ARM.
20
21## Build instructions
22
231. Use `make` to build OpenLibm.
242. Use `make USEGCC=1` to build with GCC. This is the default on
25   Linux and Windows.
263. Use `make USECLANG=1` to build with clang. This is the default on OS X
27   and FreeBSD.
284. Use `make ARCH=i386` to build for i386. Other supported architectures are
29   i486, i586, i686, x86_64, and various arm architectures.
305. 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`.
34