Commit Graph

210 Commits

Author SHA1 Message Date
kamil 0c003f5999 Add a C99 symbol to libm: nexttowardl
It's an alias for an already existing symbol nextafterl.

Patch obtained from <mgorny>

Detected by the LLVM buildbot breakage in tests.
2019-04-27 23:04:31 +00:00
maya 3cdbcb3e1b document cosl with MLINKS and in the man page 2019-04-25 23:17:24 +00:00
mrg 261a15423e also want s_nexttoward.c on riscv. now tests/lib/libm links. 2019-04-17 07:45:23 +00:00
maya 085f60235e we need rintl (long double) to link binaries 2019-04-15 18:44:26 +00:00
maya 92e1c52520 Default our libm to -frounding-math, if built with GCC.
The long-standing GCC default is to not respect rounding mode.
it looks like GCC 7 optimizes rint to a builtin, causing our few
rounding mode tests to fail.

Fixes PR port-amd64/54000: FP tests failing on amd64 since gcc7 import
2019-02-22 18:17:22 +00:00
riastradh 6059a086c9 Disable x87 implementations of sin, cos, tan.
The x87 hardware uses a bad approximation to pi for argument
reduction, and consequently yields bad answers for inputs near pi or
pi/2.

Tweak one tanf test whose doubly rounded output is a little too far
from the correct answer on the doubly rounded input.
2018-11-07 04:00:12 +00:00
kamil 0d6563db8b Disable sanitizers for libm and librt
The sanitizers are designed to use pristine OS versions of these libraries,
install interceptors for public symbols in them and link with them in every
sanitized executable.

Having unmodified base libraries (c, m, rt, pthread) also makes the system
usable with programs linking with them and without sanitization, as there
are no fatal issues during the resolving of missing symbols.

The remaining libraries like libutil, libintl etc are prebuilt with
sanitization and all their users in the MKSANITIZER=yes distribution are
required to use the same sanitizer.

libc and libpthread are already marked with the NOSANITIZER flag.
2018-06-13 08:19:36 +00:00
maya 14e90145c6 Add man page link for hypotl.3 2017-09-26 16:01:58 +00:00
christos c2e78b1bda add nexttoward for mips64 and aarch64 2017-08-21 17:10:34 +00:00
he 7659ce9cff Actually... s_nexttowardf.c appears to be usable on soft-float as well;
it was for arm earlier and briefly for all mips, so just move it into
COMMON_SRCS.
2017-08-17 13:58:39 +00:00
he 9de3bc60de Move the inclusion of s_nexttowardf.c into a common test for
MKSOFTFLOAT=="no".  This brings us nexttowardf() for sparc, at least.
2017-08-17 09:06:21 +00:00
nisimura 25f03d5f57 add s_rintl.c for aarch64. ok by ryo@. 2017-08-16 13:34:59 +00:00
he b2720bf72a In the non-softfloat m68k part, add s_nexttoward.c and s_nexttowardf.c,
so that we get nexttoward() and nexttowardf() implemented here as well.
2017-08-16 09:18:24 +00:00
mlelstv 7d91d16de6 rintl is required for archs that support long double. 2017-08-15 10:40:28 +00:00
he 900a3d47b2 Move s_nearbyint.c out of the cpu ifdefs and into COMMON_SRCS,
which is used everywhere except on vax.  This is to simplify and
to ensure the function is included in the build, allowing us to
re-add the nearbyint() test.
2017-08-11 20:24:56 +00:00
he 0cac3e13d5 The sparc port needs s_nearbyint.c as well. 2017-07-27 10:03:10 +00:00
he 4ae65f06c5 Non-softfloat m68k needs s_rintl.c. 2017-07-27 07:01:58 +00:00
he 07051e2f14 Add s_nearbyint.c to alpha, ia64, riscv, mips, powerpc, and sh3 ports. 2017-07-26 09:53:09 +00:00
he e07b573bf9 Add some blank lines to separate the different CPU archs,
for a minimal readability improvement.
2017-07-26 09:42:12 +00:00
christos 464b32545a Replace our rounding functions with the ones from FreeBSD 2017-05-06 18:03:24 +00:00
chs de7c5b7203 sun2 just has to be different, of course.
it doesn't use the libc softfloat and thus doesn't set MKSOFTFLOAT=yes.
enable the fenv functions here explicitly for now.
2017-03-23 18:26:03 +00:00
chs 7e30e94394 provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().
2017-03-22 23:11:07 +00:00
scole e3edf3b621 Add fenv for ia64, imported from FreeBSD, compile tested only. 2017-02-23 02:05:30 +00:00
christos 5398e0956f more stuff needs -mfpu=vfp 2016-12-08 18:42:01 +00:00
christos 122a9a6480 deal with namespace issues and missing atanhf for vax. 2016-09-21 14:11:40 +00:00
jakllsch 6b848d5cfa Actually get fma(3) and friends into ARM libm. 2016-09-07 14:41:33 +00:00
christos 394a54cbfc skip buggy assembly for libm_g.a 2016-08-27 09:15:44 +00:00
christos a3fc1936b1 fix double merge. 2016-08-26 08:33:48 +00:00
christos 048f5b6f16 do the FENV test consistently 2016-08-26 08:31:17 +00:00
christos 92e958de60 more fenv for sh 2016-08-25 12:15:28 +00:00
christos 5b36f996f3 fix ilogb* 2016-08-24 10:03:32 +00:00
christos 96936a322e add ilogb. 2016-08-24 09:10:57 +00:00
christos efaac31f0f fenv.h for alpha 2016-08-23 10:00:15 +00:00
martin a13d81e5df No fenv for m68k with SOFTFLOAT for now - so at least it builds. 2016-03-30 07:44:06 +00:00
nros 71f379ad51 Added ldexpl to ldexp manpage since it is missing.
Also added ldexpf manpage link since it is missing.
2016-03-17 18:29:58 +00:00
nros cf57e34dd1 Add fabsl to the manpage describing the fabs functions. 2016-03-17 00:00:44 +00:00
christos 420437aa3e Add sqrtl 2015-12-29 16:57:35 +00:00
christos 63aea4bd5b Add mips fenv.c (From FreeBSD) 2015-12-21 17:02:02 +00:00
christos 161588a5e8 Powerpc fenv.c from FreeBSD 2015-12-20 16:24:25 +00:00
nros 33961e7b90 Add manpage to the fma function in libm.
The manpage is taken from the FreeBSD project since the fma implementation is
based on the one in FreeBSD.
2015-12-12 19:05:45 +00:00
he 3c48f5cbbf Add entry for nexttowardf(3) and a link for the function name.
Bump manual page date.
2015-09-13 10:58:30 +00:00
he a9e1b0780a Add entries for rintl(3) and the nearbyint functions, and
make manual page links to the new functions.
Bump manual page date.
2015-09-13 09:46:30 +00:00
martin dce8d6f504 fenv(3) support for hppa 2014-12-27 16:54:02 +00:00
christos 5f285f6d25 PR/49399: Henning Petersen: Add man pages for erfl and erfcl 2014-11-17 16:53:23 +00:00
matt 9fd2283a99 Add RISC-V MD bits. 2014-09-19 17:42:44 +00:00
christos 61598576c4 Adding extra dependencies does not affect the inference rule search anymore.
XXX[1]: should that be the case?
Simplify the code anyway via selective path search.
XXX[2]: Split arch portions to arch specific files, this is a mess
2014-08-26 11:48:20 +00:00
mrg 6cdb313ef0 revert parts of 1.163 that affect the x86 build.
possibly, we want to build the i386 fenv.c for compat build, but they
seem largely compatible and for now, just go back to what we had before
that wasn't breaking the build or generating bug reports.
2014-08-11 08:20:57 +00:00
matt 11614bb2b2 MKCOMPAT fixes for when compat MACHINE_CPU != normal MACHINE_CPU 2014-08-10 23:25:49 +00:00
joerg b32c7c5ab8 Add -mfpu=vfp for fenv.c, since it gets those instructions from
machdep/armreg.h
2014-08-10 20:48:34 +00:00
matt 547b3a3b01 Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
2014-08-10 05:56:36 +00:00