newlib-cygwin/newlib/libm/math
Mike Frysinger ac9f8c46b1 newlib: libm: merge build up a directory
Convert all the libm/ subdir makes into the top-level Makefile.  This
allows us to build all of libm from the top Makefile without using any
recursive make calls.  This is faster and avoids the funky lib.a logic
where we unpack subdir archives to repack into a single libm.a.  The
machine override logic is maintained though by way of Makefile include
ordering, and source file accumulation in libm_a_SOURCES.

One thing to note is that this will require GNU Make because of:
	libm_a_CFLAGS = ... $(libm_a_CFLAGS_$(subst /,_,$(@D)))
This was the only way I could find to supporting per-dir compiler
settings, and I couldn't find a POSIX compatible way of transforming
the variable content.  I don't think this is a big deal as other
Makefiles in the tree are using GNU Make-specific syntax, but I call
this out as it's the only one so far in the new automake code that
I've been writing.

Automake doesn't provide precise control over the output object names
(by design).  This is fine by default as we get consistent names in all
the subdirs: libm_a-<source>.o.  But this relies on using the same set
of compiler flags for all objects.  We currently compile libm/common/
with different optimizations than the rest.

If we want to compile objects differently, we can create an intermediate
archive with the subset of objects with unique flags, and then add those
objects to the main archive.  But Automake will use a different prefix
for the objects, and thus we can't rely on ordering to override.

But if we leverage $@, we can turn Automake's CFLAGS into a multiplex
on a per-dir (and even per-file if we wanted) basis.  Unfortunately,
since $@ contains /, Automake complains it's an invalid name.  While
GNU Make supports this, it's a POSIX extension, so Automake flags it.
Using $(subst) avoids the Automake warning to get a POSIX compliant
name, albeit with a GNU Make extension.
2022-02-17 20:56:32 -05:00
..
Makefile.inc newlib: libm: merge build up a directory 2022-02-17 20:56:32 -05:00
e_acos.c
e_acosh.c
e_asin.c
e_atan2.c Throughout, run newlib with -Wall -Werror option and fix bugs and 2012-08-08 11:04:18 +00:00
e_atanh.c
e_cosh.c libm/math: Use __math_xflow in obsolete math code [v2] 2020-08-03 13:29:27 +02:00
e_exp.c libm/math: Use __math_xflow in obsolete math code [v2] 2020-08-03 13:29:27 +02:00
e_fmod.c
e_hypot.c
e_j0.c Fix spurious underflow exceptions for Bessel functions for double(from glibc bug 14155) 2020-03-26 12:21:33 +01:00
e_j1.c Fix spurious underflow exceptions for Bessel functions for double(from glibc bug 14155) 2020-03-26 12:21:33 +01:00
e_jn.c
e_log.c New log implementation 2018-06-27 15:40:49 +02:00
e_log10.c
e_pow.c libm/math: Use __math_xflow in obsolete math code [v2] 2020-08-03 13:29:27 +02:00
e_rem_pio2.c Throughout, run newlib with -Wall -Werror option and fix bugs and 2012-08-08 11:04:18 +00:00
e_remainder.c
e_scalb.c e_scalb.c: Call scalbln instead of scalbn on 16-bit targets to ensure constant fits in an int. 2018-09-03 09:41:23 +02:00
e_sinh.c
e_sqrt.c Fix rounding issues with sqrt/sqrtf 2021-06-04 14:42:58 -04:00
e_tgamma.c libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2] 2020-09-04 21:27:11 +02:00
ef_acos.c
ef_acosh.c
ef_asin.c
ef_atan2.c
ef_atanh.c
ef_cosh.c libm/math: Use __math_xflow in obsolete math code [v2] 2020-08-03 13:29:27 +02:00
ef_exp.c libm/math: ensure that expf(-huge) sets FE_UNDERFLOW exception 2020-08-10 10:31:36 +02:00
ef_fmod.c
ef_hypot.c Fix hypotf missing mask in hi+lo decomposition 2020-03-19 16:46:17 +01:00
ef_j0.c Fix spurious underflow exceptions for Bessel functions for double(from glibc bug 14155) 2020-03-26 12:21:33 +01:00
ef_j1.c Fix spurious underflow exceptions for Bessel functions for double(from glibc bug 14155) 2020-03-26 12:21:33 +01:00
ef_jn.c newlib: fix various gcc warnings 2018-08-08 10:50:19 +02:00
ef_log.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
ef_log10.c
ef_pow.c Fix error in powf for x close to 1 and large y 2020-12-11 14:38:19 -05:00
ef_rem_pio2.c
ef_remainder.c
ef_scalb.c 2009-07-09 Craig Howland <howland@LGSInnovations.com> 2009-07-09 17:04:56 +00:00
ef_sinh.c
ef_sqrt.c Fix rounding issues with sqrt/sqrtf 2021-06-04 14:42:58 -04:00
ef_tgamma.c libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2] 2020-09-04 21:27:11 +02:00
el_hypot.c * libc/include/complex.h (cabsl): Add prototype. 2015-02-06 16:14:04 +00:00
er_lgamma.c Update gamma functions from code in picolibc 2020-12-17 16:23:43 -05:00
erf_lgamma.c Improve lgammaf range for very small cases 2022-02-14 14:44:11 +01:00
k_cos.c
k_rem_pio2.c newlib: fix various gcc warnings 2018-08-08 10:50:19 +02:00
k_sin.c
k_standard.c libm: Make tgamma(-small) = -INFINITY 2020-09-18 17:20:27 -04:00
k_tan.c Fix for k_tan.c specific inputs 2020-03-18 10:05:11 +01:00
kf_cos.c
kf_rem_pio2.c Fix error in float trig. function range reduction 2020-03-03 16:45:22 +01:00
kf_sin.c
kf_tan.c
math.tex Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
s_asinh.c math: remove TRAD_SYNOPSIS 2017-12-01 03:41:53 -06:00
s_atan.c math: remove TRAD_SYNOPSIS 2017-12-01 03:41:53 -06:00
s_ceil.c
s_cos.c
s_erf.c libm/math: Use __math_xflow in obsolete math code [v2] 2020-08-03 13:29:27 +02:00
s_fabs.c math: remove TRAD_SYNOPSIS 2017-12-01 03:41:53 -06:00
s_floor.c math: remove TRAD_SYNOPSIS 2017-12-01 03:41:53 -06:00
s_frexp.c math: remove TRAD_SYNOPSIS 2017-12-01 03:41:53 -06:00
s_ldexp.c math: remove TRAD_SYNOPSIS 2017-12-01 03:41:53 -06:00
s_signif.c
s_sin.c math: remove TRAD_SYNOPSIS 2017-12-01 03:41:53 -06:00
s_tan.c math: remove TRAD_SYNOPSIS 2017-12-01 03:41:53 -06:00
s_tanh.c Fix rounding issues with sqrt/sqrtf 2021-06-04 14:42:58 -04:00
sf_asinh.c
sf_atan.c
sf_ceil.c
sf_cos.c Remove unused variable 'one' from sf_cos.c 2018-08-29 15:57:27 +02:00
sf_erf.c libm/math: Use __math_xflow in obsolete math code [v2] 2020-08-03 13:29:27 +02:00
sf_fabs.c
sf_floor.c
sf_frexp.c
sf_ldexp.c
sf_signif.c
sf_sin.c Improve performance of sinf/cosf/sincosf 2018-06-21 09:37:04 +02:00
sf_tan.c
sf_tanh.c Fix rounding issues with sqrt/sqrtf 2021-06-04 14:42:58 -04:00
w_acos.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
w_acosh.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
w_asin.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
w_atan2.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
w_atanh.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
w_cosh.c Remove HUGE_VAL definition from libm math functions 2019-01-23 10:46:30 +01:00
w_drem.c
w_exp.c Remove HUGE_VAL definition from libm math functions 2019-01-23 10:46:30 +01:00
w_exp2.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
w_fmod.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
w_gamma.c libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2] 2020-09-04 21:27:11 +02:00
w_hypot.c Remove HUGE_VAL definition from libm math functions 2019-01-23 10:46:30 +01:00
w_j0.c libm/math: Make yx functions set errno=ERANGE for x=0 2020-08-05 22:16:31 +02:00
w_j1.c libm/math: Make yx functions set errno=ERANGE for x=0 2020-08-05 22:16:31 +02:00
w_jn.c libm/math: Make yx functions set errno=ERANGE for x=0 2020-08-05 22:16:31 +02:00
w_lgamma.c libm/math: set errno to ERANGE at gamma poles 2020-08-05 22:16:31 +02:00
w_log.c Remove HUGE_VAL definition from libm math functions 2019-01-23 10:46:30 +01:00
w_log10.c Remove HUGE_VAL definition from libm math functions 2019-01-23 10:46:30 +01:00
w_pow.c libm/math: Don't modify __ieee754_pow return values in pow 2020-08-05 22:16:31 +02:00
w_remainder.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
w_scalb.c Remove HUGE_VAL definition from libm math functions 2019-01-23 10:46:30 +01:00
w_sincos.c
w_sinh.c Remove HUGE_VAL definition from libm math functions 2019-01-23 10:46:30 +01:00
w_sqrt.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
w_tgamma.c fixes to make compilation succeeds 2020-12-18 10:06:31 +01:00
wf_acos.c Use nanf() instead of nan() in single-precision float libm math functions 2019-01-23 10:46:30 +01:00
wf_acosh.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
wf_asin.c Use nanf() instead of nan() in single-precision float libm math functions 2019-01-23 10:46:30 +01:00
wf_atan2.c 2007-05-17 Cary R. <cygcary <at> yahoo.com> 2007-05-17 21:52:11 +00:00
wf_atanh.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
wf_cosh.c Use HUGE_VALF instead of HUGE_VAL in single-precision float libm math functions 2019-01-23 10:46:30 +01:00
wf_drem.c
wf_exp.c Fix expf overflow limit 2022-02-10 15:59:14 +01:00
wf_exp2.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
wf_fmod.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
wf_gamma.c libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2] 2020-09-04 21:27:11 +02:00
wf_hypot.c Use HUGE_VALF instead of HUGE_VAL in single-precision float libm math functions 2019-01-23 10:46:30 +01:00
wf_j0.c libm/math: Make yx functions set errno=ERANGE for x=0 2020-08-05 22:16:31 +02:00
wf_j1.c libm/math: Make yx functions set errno=ERANGE for x=0 2020-08-05 22:16:31 +02:00
wf_jn.c libm/math: Make yx functions set errno=ERANGE for x=0 2020-08-05 22:16:31 +02:00
wf_lgamma.c libm/math: set errno to ERANGE at gamma poles 2020-08-05 22:16:31 +02:00
wf_log.c Use nanf() instead of nan() in single-precision float libm math functions 2019-01-23 10:46:30 +01:00
wf_log2.c New expf, exp2f, logf, log2f and powf implementations 2017-10-13 10:58:00 +02:00
wf_log10.c Use nanf() instead of nan() in single-precision float libm math functions 2019-01-23 10:46:30 +01:00
wf_pow.c libm/math: Don't modify __ieee754_pow return values in pow 2020-08-05 22:16:31 +02:00
wf_remainder.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
wf_scalb.c Use HUGE_VALF instead of HUGE_VAL in single-precision float libm math functions 2019-01-23 10:46:30 +01:00
wf_sincos.c Improve performance of sinf/cosf/sincosf 2018-06-21 09:37:04 +02:00
wf_sinh.c Use HUGE_VALF instead of HUGE_VAL in single-precision float libm math functions 2019-01-23 10:46:30 +01:00
wf_sqrt.c Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
wf_tgamma.c fixes to make compilation succeeds 2020-12-18 10:06:31 +01:00
wr_gamma.c libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2] 2020-09-04 21:27:11 +02:00
wr_lgamma.c libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2] 2020-09-04 21:27:11 +02:00
wrf_gamma.c libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2] 2020-09-04 21:27:11 +02:00
wrf_lgamma.c libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2] 2020-09-04 21:27:11 +02:00