]> www.ginac.de Git - cln.git/commitdiff
Update known-to-work-with compilers.
authorRichard Kreckel <kreckel@ginac.de>
Thu, 4 May 2017 22:17:07 +0000 (00:17 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Thu, 4 May 2017 22:17:07 +0000 (00:17 +0200)
And while at it, remove some workarounds for ancient compilers.

INSTALL
README
doc/cln.texi
src/float/ffloat/misc/cl_FF_idecode.cc
src/float/lfloat/elem/cl_LF_fround.cc
src/numtheory/cl_nt_sqrtmodp.cc

diff --git a/INSTALL b/INSTALL
index 95f33bcfaaac4421c03b326ab1db3ac01b349abb..670b85d045e892ff9d7ca92b15670a6476278ff9 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -88,31 +88,26 @@ $ make
 CLN is known to work with:
 =========================
 
-  - Linux/x86, gcc-3.x, gcc-4.[0-9].x
-  - Linux/x86_64, gcc-3.[3-4], gcc-4.[0-9].x, clang-2.8
-  - Linux/ia64, gcc-3.[2-4], gcc-4.[0-4].x
-  - Linux/arm, gcc-3.[0-3] (*), gcc-4.[0-9].x (*)
-  - Linux/mips, gcc-3.3, gcc-4.[0-9].x
-  - Linux/sparc, gcc-3.[1-3], gcc-4.[0-9].x
-  - Linux/alpha, gcc-3.[0-3], gcc-4.[0-2].x
-  - Linux/powerpc, gcc-3.[0-3], gcc-4.[0-9].x
-  - Linux/hppa, gcc-4.2.x (*)
-  - Solaris 2.4 (sparc), gcc-3.[1-3], gcc-4.[0-2].x (*)
-  - OSF/1 V4.0 (alpha), gcc-3.1
-  - Irix 6.5, gcc-3.0
-  - OS X Leopard (x86), gcc 4.0.1
-  - Windows/32-bit, MSVC 16.00.30319.01
+  - Linux/x86_64: gcc-3.[3,4], gcc-4.x.x, gcc-[5-7], clang-2.[8,9]
+  - Linux/x86: gcc-3.x.x, gcc-4.x.x, gcc-[5,6]
+  - Linux/ia64: gcc-3.[2-4], gcc-4.[0-4].x
+  - Linux/arm: gcc-3.[0-3], gcc-4.x.x, gcc-[5,6] (*)
+  - Linux/mips: gcc-3.3, gcc-4.[0-9].x, gcc-[5,6]
+  - Linux/sparc: gcc-3.[1-3], gcc-4.[0-9].x
+  - Linux/alpha: gcc-3.[0-3], gcc-4.[0-2].x
+  - Linux/powerpc: gcc-3.[0-3], gcc-4.[0-9].x, gcc-[5,6]
+  - Linux/hppa: gcc-4.2.x (*)
+  - Solaris 2.4 (sparc): gcc-3.[1-3], gcc-4.[0-2].x (*)
+  - OSF/1 V4.0 (alpha): gcc-3.1
+  - Irix 6.5: gcc-3.0
+  - OS X Leopard (x86): gcc 4.0.1
+  - Windows/32-bit: MSVC 16.00.30319.01
 
 (*) On these platforms, problems with the assembler routines have been
 reported. It may be best to add "-DNO_ASM" to CPPFLAGS before
 configuring.
 
-Using gcc-4.9, the "make" step takes about 15 minutes, on an x86_64 / 2 GHz.
-
-If you use g++ from gcc-3.0.4 or older on Sparc, add either "-O", "-O1" or
-"-O2 -fno-schedule-insns" to the CXXFLAGS. With full "-O2", g++ miscompiles
-the division routines. Do not use gcc-3.0 on Sparc for compiling CLN, it
-won't work at all.
+Using gcc-6, the "make" step takes about 15 minutes, on an x86_64 @ 3 GHz.
 
 More detailed installation instructions can be found in the documentation,
 in the doc/ directory.
diff --git a/README b/README
index 02b51b8ec1c48d90c4276b6971f44bde4553149b..bad937980d5c567d3c562bc52092c1d9d6d5b7c6 100644 (file)
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 Class Library for Numbers
 
 Copyright (c)      Bruno Haible 1988-2008
-Copyright (c)   Richard Kreckel 2000-2014
+Copyright (c)   Richard Kreckel 2000-2017
 Copyright (c) Alexei Sheplyakov 2008-2010
 
 GPL
index ab7e56ac7ceeb588896bc097cca5fc32cfdc8795..1e6e8d63bf3045065adf888504261dd04c071877 100644 (file)
@@ -36,7 +36,7 @@ Published by Bruno Haible, @code{<haible@@clisp.cons.org>} and
 Richard B. Kreckel, @code{<kreckel@@ginac.de>}.
 
 Copyright (C)  Bruno Haible 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008.
-Copyright (C)  Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014.
+Copyright (C)  Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2017.
 Copyright (C)  Alexei Sheplyakov 2008, 2010.
 
 Permission is granted to make and distribute verbatim copies of
index 26a28e3d1181f837f3d86553f5198b89976a42b9..64e921438f9a07f16b38656f5fb177fb5bf4d718 100644 (file)
 #include "float/ffloat/cl_FF.h"
 #include "integer/cl_I.h"
 
-#if defined(__mips__) && !defined(__GNUC__)
-
-// Workaround SGI Irix 6.2 C++ 7.0 bug.
-
-#include "float/cl_F.h"
-#include "dfloat/cl_DF.h"
-
-namespace cln {
-
-CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl_FF& x)
-{
-       var cl_idecoded_float sem = integer_decode_float(cl_FF_to_DF(x));
-       return cl_idecoded_float(sem.mantissa >> (DF_mant_len-FF_mant_len),
-                                sem.exponent + (DF_mant_len-FF_mant_len),
-                                sem.sign
-                               );
-}
-
-}  // namespace cln
-
-#else
-
 namespace cln {
 
 CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl_FF& x)
@@ -56,5 +34,3 @@ CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl
 }
 
 }  // namespace cln
-
-#endif
index 7dfb4ba8ecec78f7e185d483532ff06ca96e7758..30548aa2f2de2b9fab10760af46916568da9dec0 100644 (file)
@@ -89,12 +89,7 @@ const cl_LF fround (const cl_LF& x)
       var uintC bitcount = exp % intDsize; // zu kopierende Bits danach, >=0, <intDsize
       var uintD mask = minus_bit(intDsize-bitcount-1); // Maske mit bitcount+1 Bits
       {var const uintD* mantptr = LF_MSDptr(x) mspop count;
-       #if !(defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 7))
        if ((mspref(mantptr,0) & -mask) ==0) goto ab; // Bit 16n-e-1 =0 -> abrunden
-       #else
-       // Work around gcc-2.7.x bug on i386/ELF
-       if ((mspref(mantptr,0) & ((~mask)+1)) ==0) goto ab; // Bit 16n-e-1 =0 -> abrunden
-       #endif
        if (!((mspref(mantptr,0) & ~mask) ==0)) goto auf; // Bit 16n-e-1 =1 und Bits 16n-e-2..0 >0 -> aufrunden
        if (test_loop_msp(mantptr mspop 1,len-count-1)) goto auf;
        // round-to-even, je nach Bit 16n-e :
index 7b53740cc4b163f2e34f1041bfa7ca2cf3fc1346..3727ff9851cf1b9afaa7b3b5662996ab34d31efe 100644 (file)
@@ -176,16 +176,6 @@ static const sqrt_mod_p_t cantor_zassenhaus_sqrt (const cl_modint_ring& R, const
        }
 }
 
-#if defined(__GNUC__) && defined(__s390__) && (__GNUC__ == 2)  // Workaround GCC-bug (see below)
-               struct cl_sylow2gen_property : public cl_property {
-                       SUBCLASS_cl_property();
-               public:
-                       cl_I h_rep;
-                       // Constructor.
-                       cl_sylow2gen_property (const cl_symbol& k, const cl_MI& h) : cl_property (k), h_rep (h.rep) {}
-               };
-#endif
-
 // Algorithm 3 (for p > 2 only):
 // Tonelli-Shanks.
 // [Cohen, A Course in Computational Algebraic Number Theory,
@@ -226,7 +216,6 @@ static const sqrt_mod_p_t tonelli_shanks_sqrt (const cl_modint_ring& R, const cl
                // Since this computation is a bit costly, we cache its result
                // on the ring's property list.
                static const cl_symbol key = (cl_symbol)(cl_string)"generator of 2-Sylow subgroup of (Z/pZ)^*";
-#if !(defined(__GNUC__) && defined(__s390__) && (__GNUC__ == 2))  // Workaround GCC-bug (see above)
                struct cl_sylow2gen_property : public cl_property {
                        SUBCLASS_cl_property();
                public:
@@ -234,7 +223,6 @@ static const sqrt_mod_p_t tonelli_shanks_sqrt (const cl_modint_ring& R, const cl
                        // Constructor.
                        cl_sylow2gen_property (const cl_symbol& k, const cl_MI& h) : cl_property (k), h_rep (h.rep) {}
                };
-#endif
                var cl_sylow2gen_property* prop = (cl_sylow2gen_property*) R->get_property(key);
                if (prop)
                        h = cl_MI(R,prop->h_rep);