Commit graph

471 commits

Author SHA1 Message Date
Peter Colberg
ebed203c04 Remove superfluous compiler flags for tests
-O2 is the default, and -g should be set in CFLAGS if needed.
2015-11-13 13:19:51 -05:00
Peter Colberg
f4daa7e8bb Set default optimization flag to -O2
Allow overriding optimization flag with the environment variable CFLAGS.
2015-11-13 13:14:55 -05:00
Viral B. Shah
e102501e24 Merge pull request #105 from petercolberg/master
[WIP] More makefile improvements
2015-11-13 09:21:59 +05:30
Viral B. Shah
4c8740ad58 Import these fixes from upstream.
0563b7a42b/lib/msun/src/e_j0f.c

Fix test build on OS X.
2015-11-13 09:16:51 +05:30
Peter Colberg
3095eef623 Add make variable NOOPT to disable optimization flags
This is used by Debian to build an unoptimized variant for debugging.
2015-11-12 22:37:28 -05:00
Viral B. Shah
c29e8b1b6e Revert "Remove [jy][01n]f(). X/Open only standardizes the double versions."
This reverts commit 8c8693cf79.
2015-11-13 09:06:24 +05:30
Viral B. Shah
2af199e669 Merge pull request #104 from petercolberg/master
Test shared library
2015-11-13 09:00:07 +05:30
Peter Colberg
bab41fc510 Test shared library
Add make check target that builds and runs the tests.
2015-11-12 14:56:08 -05:00
Viral B. Shah
a8c2f3a1bb Merge pull request #102 from ginggs/kfreebsd-hurd
Build on GNU/kfreeBSD and GNU/Hurd
2015-11-12 11:20:11 +05:30
Graham Inggs
e3336dd022 Enable stack protection for all ELFs, not only __linux__ 2015-11-10 21:39:17 +02:00
Graham Inggs
ebe1db3ce4 Build on GNU/kfreeBSD and GNU/Hurd
Use __GLIBC__ instead of __linux
Simplify Make.inc as per JuliaLang/openspecfun@e91925a
2015-11-10 21:38:51 +02:00
Viral B. Shah
58e1dd9a28 Merge pull request #103 from ginggs/inline-fpgetprec-i386
Add missing include to inline __fpgetprec on i386
2015-10-28 19:44:30 +05:30
Graham Inggs
d37c9c3970 Add missing include to inline __fpgetprec on i386
This fixes the unresolved symbol __fpgetprec in libopenlibm.so.1.0 on i386
2015-10-28 09:02:50 +02:00
Viral B. Shah
91f517b9f5 Merge pull request #100 from NuxiNL/aarch64
Make OpenLibm build on AArch64 (aka ARM64).
2015-10-26 15:31:17 +05:30
Ed Schouten
845b329cb9 Remove __always_inline, just like we do for ld80.
__always_inline is a (Free)BSD specific definition from cdefs.h.
Compilers like Clang don't care about these keywords anyway, as they
simply do whatever they like.

It looks like we already removed this keyword from ld80/e_rem_pio2l.h as
well. Apply exactly the same change to the ld128 version as well.
2015-10-26 10:28:11 +01:00
Ed Schouten
ec5833a498 Add a copy of FreeBSD's lib/libc/aarch64/_fpmath.h.
This makes it possible to build OpenLibm on ARM64 CPUs.
2015-10-26 10:26:19 +01:00
Ed Schouten
bc8dd927a3 Use isfinite() instead of non-standard finite() function.
The finite() function got standardized under the name isfinite(). Its
use is therefore discouraged.
2015-10-26 10:23:11 +01:00
Keno Fischer
13d11626ba Merge pull request #98 from ginggs/fix-missing-buildflags
Fix missing buildflags
2015-10-26 03:34:52 -04:00
Graham Inggs
395d998567 Fix missing buildflags
Debian's blhc (build log hardening check) reports dpkg-buildflags-missing CPPFLAGS 48 (of 223), CFLAGS 2 (of 177), LDFLAGS 2 (of 3) missing
2015-10-26 07:15:39 +02:00
Viral B. Shah
0036d70734 Merge pull request #97 from ziotom78/patch-1
Update Make.inc to detect OpenBSD
2015-08-13 22:19:35 +05:30
Maurizio Tomasi
3f0a53d69b New instructions about how to build on OpenBSD 2015-08-13 14:28:19 +02:00
Maurizio Tomasi
2870ed32b3 Update Make.inc to detect OpenBSD
With this patch I have been able to successfully compile Openlibm on OpenBSD 5.7 (x86_64) using the following command:

gmake GCC=egcc GXX=eg++ USEGCC=1 ARCH=x86_64

(I had to install gcc 4.9 from ports, as Openlibm does not compile with the default compiler shipped with OpenBSD 5.7, which is gcc 4.2.1).
2015-08-13 12:14:57 +02:00
Viral B. Shah
ef29d06db1 Merge pull request #90 from scialex/cross-compile
Add support for cross compiling with `make ARCH=name`
2015-03-02 09:00:26 +05:30
Alexander Light
f70240ded5 Add support for cross compiling with ARCH=name
This is rather basic. A clean is needed to get rid of artifacts from
previous runs with other architectures.

Note this requires PR #88 to work because without it x86 is broken.

Closes #89
2015-03-01 15:09:22 -05:00
Viral B. Shah
efcb36079a Merge pull request #88 from scialex/fix-i386
Fix build for x86 32 bit targets
2015-03-01 18:11:41 +05:30
Alexander Light
f30b0d3045 Fix build for i386
This would not build on i386 due to a missing include.
2015-02-26 16:01:30 -05:00
Viral B. Shah
c53d2ddbe2 Merge pull request #87 from JuliaLang/nalimilan/fpstack
Remove floating point stack checks in tests
2015-02-22 21:08:41 +05:30
Milan Bouchet-Valat
eaee935f48 Remove floating point stack checks in tests
There is no guarantee that the FP stack is preserved, and apparently
this no longer works with modern compilers. #55.
2015-02-22 12:22:57 +01:00
Viral B. Shah
8247b5af78 Revert "Update to the latest s_scalbln.c from msun."
This reverts commit a2f4e102f2.
2015-02-21 07:50:35 +05:30
Viral B. Shah
a2f4e102f2 Update to the latest s_scalbln.c from msun. 2015-02-20 23:56:48 +05:30
Viral B. Shah
763da44606 Bump SO major number as we have introduced API breakage.
Use version number as 0.5-dev, instead of 0.5.
2015-02-12 20:00:17 +05:30
Viral B. Shah
8d0843a324 Merge pull request #85 from NuxiNL/remove-extensions
Remove non-standard functions from OpenLibm
2015-02-12 19:38:00 +05:30
Ed Schouten
d64ea4e5f9 Make small changes to libm-test.c to improve portability.
- Don't define llabs(). This breaks if llabs() is already a macro, which
  is allowed by the C standard/POSIX. llabs() was introduced in C99, so
  I think we can safely assume it is present on all interesting systems.

- Cast the parameters to fabs() to the floating point type. Clang has
  introduced some interesting warnings that trigger if the arguments to
  fabs*() are not the right type.
2015-02-12 14:15:15 +01:00
Ed Schouten
b6ff8bbe91 Clean up a change that I sneaked in accidentically.
I often build the code with -Wmissing-prototypes to ensure that we don't
accidentically pollute the symbol namespace. If we want to provide a
symbol such as isopenlibm(), make sure we also declare it in
<openlibm_math.h>.
2015-02-12 13:58:35 +01:00
Ed Schouten
16902a6ce1 Reconnect cbrtl() to the build. It seems to build properly. 2015-02-12 13:49:47 +01:00
Ed Schouten
8c8693cf79 Remove [jy][01n]f(). X/Open only standardizes the double versions. 2015-02-12 13:48:13 +01:00
Ed Schouten
ce4982acf8 Remove scalb(). The scalbn() or scalbln() function should be used. 2015-02-12 13:38:13 +01:00
Ed Schouten
c08bd962f2 Remove the non-standard finite() function. 2015-02-12 13:35:19 +01:00
Ed Schouten
ae1e0c309a Remove the non-standard drem() function. 2015-02-12 13:29:38 +01:00
Ed Schouten
eca4ac8bf1 Remove the non-standard significand() function. 2015-02-12 13:28:37 +01:00
Ed Schouten
532fe1553e Remove the non-standard gamma() function. Use lgamma() instead. 2015-02-12 13:25:30 +01:00
Viral B. Shah
388f0f1d32 Remove unused Symbol.map files. 2015-02-01 19:41:55 +05:30
Viral B. Shah
cb6c82190b More README updates.
[ci skip]
2015-02-01 19:08:45 +05:30
Viral B. Shah
9fe53caefe README updates. 2015-02-01 19:06:16 +05:30
Viral B. Shah
5473e8b27d Disable OS X tests for now. 2015-02-01 10:24:55 +05:30
Viral B. Shah
ce8af02232 Merge pull request #82 from talex5/minios2
No stdio.h on Mini-OS, so use cdefs.h again there
2015-01-13 00:52:42 +05:30
Viral B. Shah
44a4964e06 Merge pull request #81 from NuxiNL/openlibm-math
Rename openlibm.h to openlibm_math.h.
2015-01-13 00:52:09 +05:30
Thomas Leonard
b19856215c No stdio.h on Mini-OS, so use cdefs.h again there. 2015-01-12 10:45:03 +00:00
Ed Schouten
34d44ffadd Set USECLANG=1 by default on FreeBSD.
FreeBSD 10+ no longer ships with GCC by default. Clang is the default
system compiler.
2015-01-11 23:50:17 +01:00
Ed Schouten
7e5585aaca Rename openlibm.h to openlibm_math.h.
This is a bit more consistent with the naming of the other header files
(openlibm_complex.h and openlibm_fenv.h). Re-add an openlibm.h header
that includes all of the public headers as a shorthand.

Fix up all of the source files to include <openlibm_math.h> instead of
<openlibm.h>. While there, fix ordering of the includes.
2015-01-11 23:37:01 +01:00