diff options
Diffstat (limited to 'hints')
-rw-r--r-- | hints/netbsd.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/hints/netbsd.sh b/hints/netbsd.sh index 445680d8ba..5c9f5bcbd5 100644 --- a/hints/netbsd.sh +++ b/hints/netbsd.sh @@ -265,3 +265,38 @@ case "$osver" in d_fchmodat="$undef" ;; esac + +cat >UU/uselongdouble.cbu <<'EOCBU' +# This script UU/uselongdouble.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use long doubles. +# +# See https://github.com/Perl/perl5/issues/17853 and https://github.com/Perl/perl5/issues/17854 +case "$uselongdouble" in +$define|true|[yY]*) + cat >try.c <<\TRY +#include <stdio.h> +#include <math.h> + +long double x = 1.0; + +int main(int argc, char **argv) { + double e1 = exp(1.0); + /* as of NetBSD 9.0 expl() just calls exp(), + Fail here if they're equal. */ + return expl(x) == (long double)e1; +} +TRY + if $cc -o try $ccflags $ldflags try.c -lm && $run ./try; then + echo "NetBSD seem to have fixed expl (and hopefully more)" >&4 + else + cat <<EOM >&4 + +Warning! NetBSD's long double support is limited enough that it will cause +test failures, and possibly build failures, and this doesn't appear to have +been fixed in the release you're running. + +EOM + fi +;; +esac +EOCBU |