From: Richard Kreckel Date: Thu, 4 May 2017 22:17:07 +0000 (+0200) Subject: Update known-to-work-with compilers. X-Git-Tag: cln_1-3-5~49 X-Git-Url: https://www.ginac.de/CLN/cln.git//cln.git?a=commitdiff_plain;h=d6d3cb2bdee716a84015b4e3428b3775e929dc58;p=cln.git Update known-to-work-with compilers. And while at it, remove some workarounds for ancient compilers. --- diff --git a/INSTALL b/INSTALL index 95f33bc..670b85d 100644 --- 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 02b51b8..bad9379 100644 --- 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 diff --git a/doc/cln.texi b/doc/cln.texi index ab7e56a..1e6e8d6 100644 --- a/doc/cln.texi +++ b/doc/cln.texi @@ -36,7 +36,7 @@ Published by Bruno Haible, @code{} and Richard B. Kreckel, @code{}. 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 diff --git a/src/float/ffloat/misc/cl_FF_idecode.cc b/src/float/ffloat/misc/cl_FF_idecode.cc index 26a28e3..64e9214 100644 --- a/src/float/ffloat/misc/cl_FF_idecode.cc +++ b/src/float/ffloat/misc/cl_FF_idecode.cc @@ -12,28 +12,6 @@ #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 diff --git a/src/float/lfloat/elem/cl_LF_fround.cc b/src/float/lfloat/elem/cl_LF_fround.cc index 7dfb4ba..30548aa 100644 --- a/src/float/lfloat/elem/cl_LF_fround.cc +++ b/src/float/lfloat/elem/cl_LF_fround.cc @@ -89,12 +89,7 @@ const cl_LF fround (const cl_LF& x) var uintC bitcount = exp % intDsize; // zu kopierende Bits danach, >=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 : diff --git a/src/numtheory/cl_nt_sqrtmodp.cc b/src/numtheory/cl_nt_sqrtmodp.cc index 7b53740..3727ff9 100644 --- a/src/numtheory/cl_nt_sqrtmodp.cc +++ b/src/numtheory/cl_nt_sqrtmodp.cc @@ -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);