diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-10-06 21:27:28 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-10-06 22:45:33 +0200 |
commit | 1a78f2f425a3e884a0fe2c40ebb1ce5dc7feeeb5 (patch) | |
tree | 052d22fab56063cb3d939c3418f3fdf8afb12013 | |
parent | 6f376839598531b67a3a4384f73266962205ae72 (diff) | |
download | perl-1a78f2f425a3e884a0fe2c40ebb1ce5dc7feeeb5.tar.gz |
AIX/longdouble: switch the default to allow it.
Since the only really unfixable part is the inf/nan support.
Document the troublesomeness in README.aix.
-rw-r--r-- | README.aix | 16 | ||||
-rw-r--r-- | hints/aix.sh | 6 |
2 files changed, 19 insertions, 3 deletions
diff --git a/README.aix b/README.aix index 9a49067ff6..bdacd9dfff 100644 --- a/README.aix +++ b/README.aix @@ -157,6 +157,22 @@ With the default setting the size is limited to 128MB. The -1 removes this limit. If the "make test" fails please change your /etc/security/limits as stated above. +=head Long doubles + +IBM calls its implementation of long doubles 128-bit, but it is not +the IEEE 128-bit ("quadruple precision") which would give 116 bit of +mantissa (nor it is implemented in hardware), instead it's a special +software implementation called "double-double", which gives 106 bits +of mantissa. + +There seem to be various problems in this long double implementation. +If Configure detects this brokenness, it will disable the long double support. +This can be overriden with explicit C<-Duselongdouble> (or C<-Dusemorebits>, +which enables both long doubles and 64 bit integers). If you decide to +enable long doubles, for most of the broken things Perl has implemented +workarounds, but the handling of the special values infinity and NaN +remains badly broken: for example infinity plus zero results in NaN. + =head2 Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (threaded/32-bit) With the following options you get a threaded Perl version which diff --git a/hints/aix.sh b/hints/aix.sh index 956e80666b..fce831fd12 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -584,7 +584,7 @@ fi # The missing math functions affect the POSIX extension math interfaces. case "$uselongdouble" in -define) +'') echo "Checking if your infinity is working with long doubles..." >&4 cat > inf$$.c <<EOF #include <math.h> @@ -598,7 +598,7 @@ EOF $cc -qlongdouble -o inf$$ inf$$.c -lm case `./inf$$` in INF) echo "Your infinity is working correctly with long doubles." >&4 ;; - *) # NaNQ + *) # NaNQ (or anything else than INF) echo " " echo "Your infinity is broken, I suggest disabling long doubles." >&4 rp="Disable long doubles?" @@ -607,7 +607,7 @@ EOF case "$ans" in [Yy]*) echo "Okay, disabling long doubles." >&4 - uselongdouble=undef + uselongdouble="$undef" ccflags=`echo " $ccflags " | sed -e 's/ -qlongdouble / /'` libswanted=`echo " $libswanted " | sed -e 's/ c128/ /'` lddlflags=`echo " $lddlflags " | sed -e 's/ -lc128 / /'` |