Date: Thu, 27 Dec 2018 16:09:37 -0600 From: Justin Hibbits <chmeeedalf@gmail.com> To: freebsd-numerics@freebsd.org Subject: Expose all math *l functions as aliases for the * functions when long double == double Message-ID: <20181227160937.51cfe9a5@ralga.knownspace>
next in thread | raw e-mail | index | archive | help
--MP_/Fu/I+MQ6e+w2g.0.QYDYusY Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline When building editors/calligra on powerpc64 it failed with undefined references to erfl and erfcl. Some digging it turns out that these functions aren't being exposed as weak symbols in libm on platforms where long double is 64 bits, because LDBL_MANT_DIG is not defined in the files defining these functions. The attached patch fixes that case. It's only been compile-tested for powerpc64, but should have no negative impact on any other platform. - Justin --MP_/Fu/I+MQ6e+w2g.0.QYDYusY Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=msun_ldbl64.diff Index: lib/msun/src/s_cbrt.c =================================================================== --- lib/msun/src/s_cbrt.c (revision 342107) +++ lib/msun/src/s_cbrt.c (working copy) @@ -15,6 +15,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <float.h> #include "math.h" #include "math_private.h" Index: lib/msun/src/s_cproj.c =================================================================== --- lib/msun/src/s_cproj.c (revision 342107) +++ lib/msun/src/s_cproj.c (working copy) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include <complex.h> +#include <float.h> #include <math.h> #include "math_private.h" Index: lib/msun/src/s_erf.c =================================================================== --- lib/msun/src/s_erf.c (revision 342107) +++ lib/msun/src/s_erf.c (working copy) @@ -107,7 +107,7 @@ * erfc/erf(NaN) is NaN */ - +#include <float.h> #include "math.h" #include "math_private.h" --MP_/Fu/I+MQ6e+w2g.0.QYDYusY--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181227160937.51cfe9a5>