#
f504f610 |
| 05-Jan-2020 |
Augustin Cavalier <waddlesplash@gmail.com> |
libroot: Replace most of libm with musl's.
The glibc libm code was showing its age, and has recently been the subject of a number of tickets about its inaccuracy. Additionally, some developers have
libroot: Replace most of libm with musl's.
The glibc libm code was showing its age, and has recently been the subject of a number of tickets about its inaccuracy. Additionally, some developers have complained about how convoluted the headers are, and thus how hard it is to add support for new architectures (and how flaky the support for the existing architectures is.)
So, with this commit, nearly the entire glibc libm has been gutted and replaced with the one from musl 1.1.24.
The complex functions from glibc are retained (as they are more mature than musl's), as are some glibc-internal libm functions.
This also has the advantage that these functions are actually using our <math.h>, whereas GCC used its own, which was rather dangerous for obvious reasons.
Additionally, the new math functions are always compiled with GCC 8 (even on x86_gcc2), as it seems GCC 2 does not quite understand some of the union-aliasing they use (a lot of which was added in C99, I suppose.) FFmpeg on x86_gcc2 is already compiled with GCC 8 and that has so far worked out well, so there should not be any problems caused by this.
I did verify that ARM and PPC at least still compile, though other architectures may require a bit more work (they are not bootstrapped so I could not do much.)
Should fix #14933 among other issues.
Change-Id: Ifeea0ddab23a8d0480fc26dece1b0192afc263bd
show more ...
|