Update to FreeBSD libm r336665.
This reverts commit 253a8306316cedfd6fd3e3a169fbffe4cac04035 and moves
us forward to a revision that contains fixes for the problem with the
previous attempt.
This also makes sincos(3)/sincosf(3)/sincosl(3) available to `_BSD_SOURCE`
as well as `_GNU_SOURCE`.
The new FreeBSD libm code requires the FreeBSD `__CONCAT` macro, and all
our existing callers are FreeBSD too, so update that.
There's also an assumption that <complex.h> drags in <math.h> which isn't
true for us, so work around that with `-include` in the makefile. This
then causes clang to recognize a bug -- returning from a void function --
in our fake (LP32) sincosl(3), so fix that too.
Bug: http://b/111710419
Change-Id: I84703ad844f8afde6ec6b11604ab3c096ccb62c3
Test: ran tests
diff --git a/libm/fake_long_double.c b/libm/fake_long_double.c
index fb79af4..d81fa39 100644
--- a/libm/fake_long_double.c
+++ b/libm/fake_long_double.c
@@ -37,11 +37,11 @@
long lroundl(long double a1) { return lround(a1); }
long double modfl(long double a1, long double* a2) { double i; double f = modf(a1, &i); *a2 = i; return f; }
float nexttowardf(float a1, long double a2) { return nextafterf(a1, (float) a2); }
+long double powl(long double x, long double y) { return pow(x, y); }
long double roundl(long double a1) { return round(a1); }
-void sincosl(long double x, long double* s, long double* c) { return sincos(x, (double*) s, (double*) c); }
+void sincosl(long double x, long double* s, long double* c) { sincos(x, (double*) s, (double*) c); }
#endif // __LP64__
-// FreeBSD doesn't have ld128 implementations of powl or tgammal, so both LP32 and LP64 need these.
-long double powl(long double x, long double y) { return pow(x, y); }
+// FreeBSD doesn't have an ld128 implementations of tgammal, so both LP32 and LP64 need this.
long double tgammal(long double x) { return tgamma(x); }