xref: /relibc/openlibm/README.md (revision cca41bc1abd01804afa4862bbd2c79cc9803171a)
19fe53caeSViral B. Shah# OpenLibm
2ccd319c0SViral B. Shah
3ce69bf1fSAlex Arslan[![Travis](https://travis-ci.org/JuliaMath/openlibm.svg?branch=master)](https://travis-ci.org/JuliaMath/openlibm)
4ce69bf1fSAlex Arslan[![AppVeyor](https://ci.appveyor.com/api/projects/status/sia04r4089rr19uc/branch/master?svg=true)](https://ci.appveyor.com/project/ararslan/openlibm-19152/branch/master)
5769a422fSViral B. Shah
6532fe48cSViral B. Shah[OpenLibm](http://www.openlibm.org) is an effort to have a high quality, portable, standalone
7e27d5a2cSWaldir PimentaC mathematical library ([`libm`](http://en.wikipedia.org/wiki/libm)).
885a0f204SWaldir PimentaIt can be used standalone in applications and programming language
985a0f204SWaldir Pimentaimplementations.
10850280a8SViral B. Shah
1185a0f204SWaldir PimentaThe project was born out of a need to have a good `libm` for the
1285a0f204SWaldir Pimenta[Julia programming langage](http://www.julialang.org) that worked
1385a0f204SWaldir Pimentaconsistently across compilers and operating systems, and in 32-bit and
1485a0f204SWaldir Pimenta64-bit environments.
1511f62e05SViral B. Shah
169fe53caeSViral B. Shah## Platform support
17842286d7SViral B. Shah
18*74b54c71SViral B. ShahOpenLibm builds on Linux, Mac OS X, Windows, FreeBSD, OpenBSD, and
19*74b54c71SViral B. ShahDragonFly BSD.  It builds with both GCC and clang. Although largely
20*74b54c71SViral B. Shahtested and widely used on the x86 and x86-64 architectures, OpenLibm
21*74b54c71SViral B. Shahalso supports arm, aarch64, ppc64le, and mips.
22842286d7SViral B. Shah
239fe53caeSViral B. Shah## Build instructions
244164da0dSViral B. Shah
25bf188aebSAlex Arslan1. Use GNU Make to build OpenLibm. This is `make` on most systems, but `gmake` on BSDs.
26cb6c8219SViral B. Shah2. Use `make USEGCC=1` to build with GCC. This is the default on
2785a0f204SWaldir Pimenta   Linux and Windows.
28bf188aebSAlex Arslan3. Use `make USECLANG=1` to build with clang. This is the default on OS X, FreeBSD,
29bf188aebSAlex Arslan   and OpenBSD.
30f3d50093SViral B. Shah4. Architectures are auto-detected. Use `make ARCH=i386` to force a
31f3d50093SViral B. Shah   build for i386. Other supported architectures are i486, i586, and
32f3d50093SViral B. Shah   i686. GCC 4.8 is the minimum requirement for correct codegen on
33f3d50093SViral B. Shah   older 32-bit architectures.
340001d589SViral B. Shah
350001d589SViral B. Shah## Acknowledgements
360001d589SViral B. Shah
370001d589SViral B. ShahPowerPC support for openlibm was graciously sponsored by IBM.
38