Ticket #12173: flint-2.3+reviewer.diff
File flint-2.3+reviewer.diff, 25.8 KB (added by , 9 years ago) |
---|
-
SPKG.txt
diff --git a/SPKG.txt b/SPKG.txt
a b 2 2 3 3 == Description == 4 4 5 FLINT is a C library for doing number theory, written by William Hart and David Harvey.5 FLINT is a C library for doing number theory, maintained by William Hart. 6 6 7 7 Website: www.flintlib.org 8 8 9 9 == License == 10 10 11 GPL V2+ 11 FLINT is licensed GPL v2+. 12 12 13 13 == SPKG Maintainers == 14 14 15 * Burcin Erocal 16 * Mike Hansen 17 * William Stein 15 * Fredrik Johansson 16 * Jean-Pierre Flori 18 17 19 18 == Upstream Contact == 20 19 21 * Bill Hart22 * Development list for FLINT <flint-devel@lists.sourceforge.net> (moderated)20 * flint-devel Gougle Group (http://groups.google.co.uk/group/flint-devel) 21 * William Hart 23 22 24 23 == Dependencies == 25 24 26 * gmp 25 * MPIR 26 * MPFR 27 27 * NTL 28 28 29 == Special Update/Build Instructions==29 == Changelog == 30 30 31 * We patch the makefile slightly to add 64 bit OSX build support and also change 32 LIBS such that the NTL interface is linked into the flint library. 33 This is not an officially supported option because flint is pure C 34 and the NTL interface requires C++. 35 * Remove the '.svn' directories from upstream ('src/') if present. 36 * Remove the 'src/zn_poly/demo/bernoulli/.DS_Store' file 37 38 == Changelog == 31 === flint-2.3 (Mike Hansen, Fredrik Johansson, Jean-Pierre Flori, May-November 2012) === 32 * Trac #12173: Update FLINT to version 2.3. 33 * Removed obsolete patches. 34 * Cleanup spkg-install and spkg-check scripts. 35 * Removed Cygwin hack for libntl.a made useless by #9050. 36 * Removed now useless patch --binary flag on Cygwin. 37 * Only build shared library on Cygwin. 39 38 40 39 === flint-1.5.2.p2 (Paul-Olivier Dehaye, 16 October 2012) === 41 40 * #9697: Remove the file 'src/zn_poly/demo/bernoulli/.DS_Store' -
deleted file patches/ZmodF_mul.c.patch
diff --git a/patches/ZmodF_mul.c.patch b/patches/ZmodF_mul.c.patch deleted file mode 100644
+ - 1 --- src/ZmodF_mul.c 2009-09-23 18:03:27.000000000 +08002 +++ patches/ZmodF_mul.c 2011-04-25 22:32:40.000000000 +08003 @@ -30,7 +30,6 @@4 ******************************************************************************/5 6 #include <math.h>7 -#include "ZmodF.h"8 #include "ZmodF_poly.h"9 #include "ZmodF_mul.h"10 #include "mpn_extras.h" -
deleted file patches/ZmodF_poly.c.patch
diff --git a/patches/ZmodF_poly.c.patch b/patches/ZmodF_poly.c.patch deleted file mode 100644
+ - 1 --- src/ZmodF_poly.c 2009-09-23 18:03:27.000000000 +08002 +++ patches/ZmodF_poly.c 2011-04-25 22:37:17.000000000 +08003 @@ -29,8 +29,6 @@4 5 *****************************************************************************/6 7 -#include "flint.h"8 -#include "memory-manager.h"9 #include "ZmodF_poly.h"10 #include "ZmodF_mul.h"11 #include "fmpz_poly.h" -
deleted file patches/longlong.patch
diff --git a/patches/longlong.patch b/patches/longlong.patch deleted file mode 100644
+ - 1 diff -ur flint-1.5.2.orig//longlong.h flint-1.5.2//longlong.h2 --- flint-1.5.2.orig//longlong.h 2009-09-23 12:03:27.000000000 +02003 +++ flint-1.5.2//longlong.h 2010-11-25 07:00:41.000000000 +01004 @@ -411,46 +411,6 @@5 __asm__ ("adds\t%1, %4, %5\n\tadc\t%0, %2, %3" \6 : "=r" (sh), "=&r" (sl) \7 : "r" (ah), "rI" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)8 -#define sub_ddmmss(sh, sl, ah, al, bh, bl) \9 - do { \10 - if (__builtin_constant_p (al)) \11 - { \12 - if (__builtin_constant_p (ah)) \13 - __asm__ ("rsbs\t%1, %5, %4\n\trsc\t%0, %3, %2" \14 - : "=r" (sh), "=&r" (sl) \15 - : "rI" (ah), "r" (bh), "rI" (al), "r" (bl) __CLOBBER_CC); \16 - else \17 - __asm__ ("rsbs\t%1, %5, %4\n\tsbc\t%0, %2, %3" \18 - : "=r" (sh), "=&r" (sl) \19 - : "r" (ah), "rI" (bh), "rI" (al), "r" (bl) __CLOBBER_CC); \20 - } \21 - else if (__builtin_constant_p (ah)) \22 - { \23 - if (__builtin_constant_p (bl)) \24 - __asm__ ("subs\t%1, %4, %5\n\trsc\t%0, %3, %2" \25 - : "=r" (sh), "=&r" (sl) \26 - : "rI" (ah), "r" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \27 - else \28 - __asm__ ("rsbs\t%1, %5, %4\n\trsc\t%0, %3, %2" \29 - : "=r" (sh), "=&r" (sl) \30 - : "rI" (ah), "r" (bh), "rI" (al), "r" (bl) __CLOBBER_CC); \31 - } \32 - else if (__builtin_constant_p (bl)) \33 - { \34 - if (__builtin_constant_p (bh)) \35 - __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \36 - : "=r" (sh), "=&r" (sl) \37 - : "r" (ah), "rI" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \38 - else \39 - __asm__ ("subs\t%1, %4, %5\n\trsc\t%0, %3, %2" \40 - : "=r" (sh), "=&r" (sl) \41 - : "rI" (ah), "r" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \42 - } \43 - else /* only bh might be a constant */ \44 - __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \45 - : "=r" (sh), "=&r" (sl) \46 - : "r" (ah), "rI" (bh), "r" (al), "rI" (bl) __CLOBBER_CC);\47 - } while (0)48 #if 1 || defined (__arm_m__) /* `M' series has widening multiply support */49 #define umul_ppmm(xh, xl, a, b) \50 __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) -
deleted file patches/makefile.patch
diff --git a/patches/makefile.patch b/patches/makefile.patch deleted file mode 100644
+ - 1 --- src/makefile 2009-09-23 12:03:27.000000000 +02002 +++ patches/makefile 2010-01-02 07:00:32.000000000 +01003 @@ -1,3 +1,5 @@4 +# sage depends on the NTL interface, so we include it in the flint library5 +6 LIBDIR=$(PREFIX)/lib7 INCLUDEDIR=$(PREFIX)/include8 DOCDIR=$(PREFIX)/doc9 @@ -22,7 +24,8 @@10 11 CPP = $(FLINT_CPP)12 13 -LIBS = -L$(FLINT_GMP_LIB_DIR) $(FLINT_LINK_OPTIONS) -lgmp -lpthread -lm14 +# add NTL options so that NTL interface links properly15 +LIBS = -L$(FLINT_GMP_LIB_DIR) -L$(FLINT_NTL_LIB_DIR) $(FLINT_LINK_OPTIONS) -lgmp -lpthread -lntl -lm16 17 LIBS2 = -L$(FLINT_GMP_LIB_DIR) -L$(FLINT_NTL_LIB_DIR) $(FLINT_LINK_OPTIONS) -lgmp -lpthread -lntl -lm18 19 @@ -66,7 +69,8 @@20 theta.h \21 zmod_mat.h \22 F_mpz.h \23 - QS/tinyQS.h24 + QS/tinyQS.h \25 + NTL-interface.h26 27 ####### library object files28 29 @@ -109,13 +113,14 @@30 poly.o \31 sieve.o \32 linear_algebra.o \33 - block_lanczos.o34 + block_lanczos.o \35 + NTL-interface.o36 37 QS: mpQS38 39 tune: ZmodF_mul-tune mpz_poly-tune40 41 -test: F_mpz-test mpn_extras-test fmpz_poly-test fmpz-test ZmodF-test ZmodF_poly-test mpz_poly-test ZmodF_mul-test long_extras-test zmod_poly-test zmod_mat-test42 +test: F_mpz-test mpn_extras-test fmpz_poly-test fmpz-test ZmodF-test ZmodF_poly-test mpz_poly-test ZmodF_mul-test long_extras-test zmod_poly-test zmod_mat-test NTL-interface-test43 44 check: test45 ./F_mpz-test46 @@ -139,16 +144,20 @@47 library: $(FLINT_LIB)48 49 libflint.dylib: $(FLINTOBJ)50 - $(CC) -single_module -fPIC -dynamiclib -o libflint.dylib $(FLINTOBJ) $(LIBS)51 + $(CPP) -single_module -fPIC -dynamiclib -o libflint.dylib $(FLINTOBJ) $(LIBS)52 53 libflint.dylib64: $(FLINTOBJ)54 - $(CC) -m64 -single_module -fPIC -dynamiclib -o libflint.dylib $(FLINTOBJ) $(LIBS)55 + $(CPP) -m64 -single_module -fPIC -dynamiclib -o libflint.dylib $(FLINTOBJ) $(LIBS)56 57 libflint.dll: $(FLINTOBJ)58 - $(CC) -fPIC -shared -o libflint.dll $(FLINTOBJ) $(LIBS)59 + $(CPP) -fPIC -shared -o libflint.dll $(FLINTOBJ) $(LIBS)60 +61 +# Since this code uses the C++ compiler as a linker to produce62 +# a library, the -m64 (or equivalent) option must be provided, as it63 +# it is in the line above where the target is libflint.dylib6464 65 libflint.so: $(FLINTOBJ)66 - $(CC) -fPIC -shared -o libflint.so $(FLINTOBJ) $(LIBS)67 + $(CPP) $(CXXFLAG64) -fPIC -shared -o libflint.so $(FLINTOBJ) $(LIBS)68 69 ##### zn_poly object files70 71 @@ -345,55 +354,56 @@72 ####### test program targets73 74 mpn_extras-test: mpn_extras-test.o test-support.o $(FLINTOBJ) $(HEADERS)75 - $(CC) $(CFLAGS) mpn_extras-test.o test-support.o -o mpn_extras-test $(FLINTOBJ) $(LIBS)76 + $(CPP) $(CFLAGS) mpn_extras-test.o test-support.o -o mpn_extras-test $(FLINTOBJ) $(LIBS)77 78 fmpz_poly-test: fmpz_poly-test.o test-support.o $(FLINTOBJ) $(HEADERS)79 - $(CC) $(CFLAGS) fmpz_poly-test.o test-support.o -o fmpz_poly-test $(FLINTOBJ) $(LIBS)80 + $(CPP) $(CFLAGS) fmpz_poly-test.o test-support.o -o fmpz_poly-test $(FLINTOBJ) $(LIBS)81 82 fmpz-test: fmpz-test.o test-support.o $(FLINTOBJ) $(HEADERS)83 - $(CC) $(CFLAGS) fmpz-test.o test-support.o -o fmpz-test $(FLINTOBJ) $(LIBS)84 + $(CPP) $(CFLAGS) fmpz-test.o test-support.o -o fmpz-test $(FLINTOBJ) $(LIBS)85 86 F_mpz-test: F_mpz-test.o test-support.o $(FLINTOBJ) $(HEADERS)87 - $(CC) $(CFLAGS) F_mpz-test.o test-support.o -o F_mpz-test $(FLINTOBJ) $(LIBS)88 + $(CPP) $(CFLAGS) F_mpz-test.o test-support.o -o F_mpz-test $(FLINTOBJ) $(LIBS)89 90 ZmodF-test: ZmodF-test.o test-support.o $(FLINTOBJ) $(HEADERS)91 - $(CC) $(CFLAGS) ZmodF-test.o test-support.o -o ZmodF-test $(FLINTOBJ) $(LIBS)92 + $(CPP) $(CFLAGS) ZmodF-test.o test-support.o -o ZmodF-test $(FLINTOBJ) $(LIBS)93 94 ZmodF_poly-test: ZmodF_poly-test.o test-support.o $(FLINTOBJ) $(HEADERS)95 - $(CC) $(CFLAGS) ZmodF_poly-test.o test-support.o -o ZmodF_poly-test $(FLINTOBJ) $(LIBS)96 + $(CPP) $(CFLAGS) ZmodF_poly-test.o test-support.o -o ZmodF_poly-test $(FLINTOBJ) $(LIBS)97 98 mpz_poly-test: mpz_poly-test.o test-support.o $(FLINTOBJ) $(HEADERS)99 - $(CC) $(CFLAGS) mpz_poly-test.o test-support.o -o mpz_poly-test $(FLINTOBJ) $(LIBS)100 + $(CPP) $(CFLAGS) mpz_poly-test.o test-support.o -o mpz_poly-test $(FLINTOBJ) $(LIBS)101 102 F_mpz_mat-test: F_mpz_mat-test.o test-support.o $(FLINTOBJ) $(HEADERS)103 - $(CC) $(CFLAGS) F_mpz_mat-test.o test-support.o -o F_mpz_mat-test $(FLINTOBJ) $(LIBS)104 + $(CPP) $(CFLAGS) F_mpz_mat-test.o test-support.o -o F_mpz_mat-test $(FLINTOBJ) $(LIBS)105 106 F_mpz_LLL_fast_d-test: F_mpz_LLL_fast_d-test.o test-support.o $(FLINTOBJ) $(HEADERS)107 - $(CC) $(CFLAGS) F_mpz_LLL_fast_d-test.o test-support.o -o F_mpz_LLL_fast_d-test $(FLINTOBJ) $(LIBS)108 + $(CPP) $(CFLAGS) F_mpz_LLL_fast_d-test.o test-support.o -o F_mpz_LLL_fast_d-test $(FLINTOBJ) $(LIBS)109 110 ZmodF_mul-test: ZmodF_mul-test.o test-support.o $(FLINTOBJ) $(HEADERS)111 - $(CC) $(CFLAGS) ZmodF_mul-test.o test-support.o -o ZmodF_mul-test $(FLINTOBJ) $(LIBS)112 + $(CPP) $(CFLAGS) ZmodF_mul-test.o test-support.o -o ZmodF_mul-test $(FLINTOBJ) $(LIBS)113 114 long_extras-test: long_extras-test.o test-support.o $(FLINTOBJ)115 - $(CC) $(CFLAGS) long_extras-test.o test-support.o -o long_extras-test $(FLINTOBJ) $(LIBS)116 + $(CPP) $(CFLAGS) long_extras-test.o test-support.o -o long_extras-test $(FLINTOBJ) $(LIBS)117 118 packed_vec-test: packed_vec-test.o test-support.o $(FLINTOBJ) $(HEADERS)119 - $(CC) $(CFLAGS) packed_vec-test.o test-support.o -o packed_vec-test $(FLINTOBJ) $(LIBS)120 + $(CPP) $(CFLAGS) packed_vec-test.o test-support.o -o packed_vec-test $(FLINTOBJ) $(LIBS)121 122 zmod_poly-test: zmod_poly-test.o test-support.o $(FLINTOBJ) $(HEADERS)123 - $(CC) $(CFLAGS) zmod_poly-test.o test-support.o -o zmod_poly-test $(FLINTOBJ) $(LIBS)124 + $(CPP) $(CFLAGS) zmod_poly-test.o test-support.o -o zmod_poly-test $(FLINTOBJ) $(LIBS)125 126 zmod_mat-test: zmod_mat-test.o test-support.o $(FLINTOBJ) $(HEADERS)127 - $(CC) $(CFLAGS) zmod_mat-test.o test-support.o -o zmod_mat-test $(FLINTOBJ) $(LIBS)128 + $(CPP) $(CFLAGS) zmod_mat-test.o test-support.o -o zmod_mat-test $(FLINTOBJ) $(LIBS)129 130 F_zmod_mat-test: F_zmod_mat-test.o test-support.o $(FLINTOBJ) $(HEADERS)131 - $(CC) $(CFLAGS) F_zmod_mat-test.o test-support.o -o F_zmod_mat-test $(FLINTOBJ) $(LIBS)132 + $(CPP) $(CFLAGS) F_zmod_mat-test.o test-support.o -o F_zmod_mat-test $(FLINTOBJ) $(LIBS)133 134 F_mpz_poly-test: F_mpz_poly-test.o test-support.o $(FLINTOBJ) $(HEADERS)135 - $(CC) $(CFLAGS) F_mpz_poly-test.o test-support.o -o F_mpz_poly-test $(FLINTOBJ) $(LIBS)136 + $(CPP) $(CFLAGS) F_mpz_poly-test.o test-support.o -o F_mpz_poly-test $(FLINTOBJ) $(LIBS)137 138 +# NTL interface is linked in the library139 NTL-interface-test: NTL-interface.o NTL-interface-test.o test-support.o $(FLINTOBJ) $(HEADERS)140 - $(CPP) $(CFLAGS) NTL-interface-test.o NTL-interface.o test-support.o $(FLINTOBJ) -o NTL-interface-test $(LIBS2)141 + $(CPP) $(CFLAGS) NTL-interface-test.o test-support.o $(FLINTOBJ) -o NTL-interface-test $(LIBS2)142 143 ####### tuning program object files144 145 @@ -489,70 +499,70 @@146 PROFOBJ = $(FLINTOBJ) profiler.o profiler-main.o147 148 fmpz_poly-profile: fmpz_poly-profile.o fmpz_poly-profile-tables.o test-support.o $(PROFOBJ)149 - $(CC) $(CFLAGS) -o fmpz_poly-profile fmpz_poly-profile.o fmpz_poly-profile-tables.o test-support.o $(PROFOBJ) $(LIBS)150 + $(CPP) $(CFLAGS) -o fmpz_poly-profile fmpz_poly-profile.o fmpz_poly-profile-tables.o test-support.o $(PROFOBJ) $(LIBS)151 152 F_mpz_poly-profile: F_mpz_poly-profile.o F_mpz_poly-profile-tables.o test-support.o $(PROFOBJ)153 - $(CC) $(CFLAGS) -o F_mpz_poly-profile F_mpz_poly-profile.o F_mpz_poly-profile-tables.o test-support.o $(PROFOBJ) $(LIBS)154 + $(CPP) $(CFLAGS) -o F_mpz_poly-profile F_mpz_poly-profile.o F_mpz_poly-profile-tables.o test-support.o $(PROFOBJ) $(LIBS)155 156 mpz_poly-profile: mpz_poly-profile.o mpz_poly-profile-tables.o test-support.o $(PROFOBJ)157 - $(CC) $(CFLAGS) -o mpz_poly-profile mpz_poly-profile.o mpz_poly-profile-tables.o test-support.o $(PROFOBJ) $(LIBS)158 + $(CPP) $(CFLAGS) -o mpz_poly-profile mpz_poly-profile.o mpz_poly-profile-tables.o test-support.o $(PROFOBJ) $(LIBS)159 160 ZmodF_mul-profile: ZmodF_mul-profile.o ZmodF_mul-profile-tables.o $(PROFOBJ)161 - $(CC) $(CFLAGS) -o ZmodF_mul-profile ZmodF_mul-profile.o ZmodF_mul-profile-tables.o $(PROFOBJ) $(LIBS)162 + $(CPP) $(CFLAGS) -o ZmodF_mul-profile ZmodF_mul-profile.o ZmodF_mul-profile-tables.o $(PROFOBJ) $(LIBS)163 164 ZmodF_poly-profile: ZmodF_poly-profile.o ZmodF_poly-profile-tables.o $(PROFOBJ)165 - $(CC) $(CFLAGS) -o ZmodF_poly-profile ZmodF_poly-profile.o ZmodF_poly-profile-tables.o $(PROFOBJ) $(LIBS)166 + $(CPP) $(CFLAGS) -o ZmodF_poly-profile ZmodF_poly-profile.o ZmodF_poly-profile-tables.o $(PROFOBJ) $(LIBS)167 168 169 kara-profile: kara-profile.c profiler.o test-support.o $(FLINTOBJ)170 - $(CC) $(CFLAGS) -o kara-profile kara-profile.c profiler.o test-support.o $(FLINTOBJ) $(LIBS)171 + $(CPP) $(CFLAGS) -o kara-profile kara-profile.c profiler.o test-support.o $(FLINTOBJ) $(LIBS)172 173 NTL-profile: NTL-profile.c test-support.o NTL-profile-tables.o $(PROFOBJ)174 $(CPP) $(CFLAGS) -o NTL-profile NTL-profile.c NTL-profile-tables.o test-support.o $(PROFOBJ) $(LIB) -lntl175 176 zmod_poly-profile: zmod_poly-profile.o zmod_poly-profile-tables.o $(PROFOBJ)177 - $(CC) $(CFLAGS) -o zmod_poly-profile zmod_poly.o zmod_poly-profile.o zmod_poly-profile-tables.o $(PROFOBJ) $(LIBS)178 + $(CPP) $(CFLAGS) -o zmod_poly-profile zmod_poly.o zmod_poly-profile.o zmod_poly-profile-tables.o $(PROFOBJ) $(LIBS)179 180 bernoulli-profile: bernoulli-profile.o bernoulli-profile-tables.o $(PROFOBJ)181 - $(CC) $(CFLAGS) -o bernoulli-profile zmod_poly.o bernoulli-profile.o bernoulli-profile-tables.o $(PROFOBJ) $(LIBS)182 + $(CPP) $(CFLAGS) -o bernoulli-profile zmod_poly.o bernoulli-profile.o bernoulli-profile-tables.o $(PROFOBJ) $(LIBS)183 184 ####### example programs185 186 delta_qexp.o: delta_qexp.c $(HEADERS)187 - $(CC) $(CFLAGS) -c delta_qexp.c -o delta_qexp.o188 + $(CPP) $(CFLAGS) -c delta_qexp.c -o delta_qexp.o189 190 delta_qexp: delta_qexp.o $(FLINTOBJ)191 - $(CC) $(CFLAGS) -o delta_qexp delta_qexp.o $(FLINTOBJ) $(LIBS)192 + $(CPP) $(CFLAGS) -o delta_qexp delta_qexp.o $(FLINTOBJ) $(LIBS)193 194 expmod: expmod.c $(FLINTOBJ)195 - $(CC) $(CFLAGS) -o expmod expmod.c $(FLINTOBJ) $(LIBS)196 + $(CPP) $(CFLAGS) -o expmod expmod.c $(FLINTOBJ) $(LIBS)197 198 BPTJCubes: BPTJCubes.c $(FLINTOBJ)199 - $(CC) $(CFLAGS) -o BPTJCubes BPTJCubes.c $(FLINTOBJ) $(LIBS)200 + $(CPP) $(CFLAGS) -o BPTJCubes BPTJCubes.c $(FLINTOBJ) $(LIBS)201 202 bernoulli.o: bernoulli.c $(HEADERS)203 - $(CC) $(CFLAGS) -c bernoulli.c -o bernoulli.o204 + $(CPP) $(CFLAGS) -c bernoulli.c -o bernoulli.o205 206 bernoulli: bernoulli.o $(FLINTOBJ)207 - $(CC) $(CFLAGS) -o bernoulli bernoulli.o $(FLINTOBJ) $(LIBS)208 + $(CPP) $(CFLAGS) -o bernoulli bernoulli.o $(FLINTOBJ) $(LIBS)209 210 bernoulli_fmpz.o: bernoulli_fmpz.c $(HEADERS)211 - $(CC) $(CFLAGS) -c bernoulli_fmpz.c -o bernoulli_fmpz.o212 + $(CPP) $(CFLAGS) -c bernoulli_fmpz.c -o bernoulli_fmpz.o213 214 bernoulli_fmpz: bernoulli_fmpz.o $(FLINTOBJ)215 - $(CC) $(CFLAGS) -o bernoulli_fmpz bernoulli_fmpz.o $(FLINTOBJ) $(LIBS)216 + $(CPP) $(CFLAGS) -o bernoulli_fmpz bernoulli_fmpz.o $(FLINTOBJ) $(LIBS)217 218 bernoulli_zmod.o: bernoulli_zmod.c $(HEADERS)219 - $(CC) $(CFLAGS) -c bernoulli_zmod.c -o bernoulli_zmod.o220 + $(CPP) $(CFLAGS) -c bernoulli_zmod.c -o bernoulli_zmod.o221 222 bernoulli_zmod: bernoulli_zmod.o $(FLINTOBJ)223 - $(CC) $(CFLAGS) -o bernoulli_zmod bernoulli_zmod.o $(FLINTOBJ) $(LIBS)224 + $(CPP) $(CFLAGS) -o bernoulli_zmod bernoulli_zmod.o $(FLINTOBJ) $(LIBS)225 226 thetaproduct.o: thetaproduct.c $(HEADERS)227 - $(CC) $(CFLAGS2) $(WITH_ZNPOLY) -c thetaproduct.c -o thetaproduct.o228 + $(CPP) $(CFLAGS2) $(WITH_ZNPOLY) -c thetaproduct.c -o thetaproduct.o229 230 thetaproduct: thetaproduct.o $(FLINTOBJ)231 - $(CC) $(CFLAGS2) -o thetaproduct thetaproduct.o $(FLINTOBJ) $(LIBS)232 + $(CPP) $(CFLAGS2) -o thetaproduct thetaproduct.o $(FLINTOBJ) $(LIBS)233 234 ####### Quadratic sieve235 236 @@ -590,12 +600,12 @@237 $(CC) $(CFLAGS) -c QS/mp_factor_base.c -o mp_factor_base.o238 239 mpQS: QS/mpQS.c QS/mpQS.h QS/tinyQS.h mp_factor_base.o mp_poly.o mp_sieve.o mp_linear_algebra.o mp_lprels.o $(FLINTOBJ)240 - $(CC) $(CFLAGS) -o mpQS QS/mpQS.c mp_factor_base.o mp_poly.o mp_sieve.o mp_linear_algebra.o mp_lprels.o $(FLINTOBJ) $(LIBS)241 + $(CPP) $(CFLAGS) -o mpQS QS/mpQS.c mp_factor_base.o mp_poly.o mp_sieve.o mp_linear_algebra.o mp_lprels.o $(FLINTOBJ) $(LIBS)242 243 ####### Integer multiplication timing244 245 ZMULOBJ = zn_mod.o misc.o mul_ks.o pack.o mul.o mulmid.o mulmid_ks.o ks_support.o mpn_mulmid.o nuss.o pmf.o pmfvec_fft.o tuning.o mul_fft.o mul_fft_dft.o array.o invert.o zmod_mat.o zmod_poly.o memory-manager.o fmpz.o ZmodF_mul-tuning.o mpz_poly.o mpz_poly-tuning.o fmpz_poly.o ZmodF_poly.o mpz_extras.o profiler.o ZmodF_mul.o ZmodF.o mpn_extras.o F_mpz_mul-timing.o long_extras.o factor_base.o poly.o sieve.o linear_algebra.o block_lanczos.o246 247 F_mpz_mul-timing: $(FLINTOBJ)248 - $(CC) $(CFLAGS) F_mpz_mul-timing.c profiler.o -o Zmul $(FLINTOBJ) $(LIBS)249 + $(CPP) $(CFLAGS) F_mpz_mul-timing.c profiler.o -o Zmul $(FLINTOBJ) $(LIBS)250 -
deleted file patches/mpn_extras.h.patch
diff --git a/patches/mpn_extras.h.patch b/patches/mpn_extras.h.patch deleted file mode 100644
+ - 1 --- src/mpn_extras.h 2009-09-23 03:03:27.000000000 -07002 +++ patches/mpn_extras.h 2011-12-20 15:47:18.495311148 -08003 @@ -22,7 +22,6 @@4 #ifndef MPN_EXTRAS_H5 #define MPN_EXTRAS_H6 7 -#include "flint.h"8 #include "ZmodF_poly.h"9 10 #include "longlong_wrapper.h" -
spkg-check
diff --git a/spkg-check b/spkg-check
a b 1 1 #!/usr/bin/env bash 2 2 3 echo "*************************************************" 4 echo "Running test suite. This should take 6-20 minutes" 5 echo " Please report all failures to sage-devel " 6 echo "*************************************************" 3 ############################################################################### 4 # 5 # FLINT Sage check script 6 # 7 ############################################################################### 7 8 8 if [ "`uname`" = "Linux" -a "`uname -m`" = "x86_64" ]; then 9 FLINT_TUNE="-mtune=opteron -march=opteron -fPIC -funroll-loops " 10 elif [ "`uname`" = "Darwin" -a "`uname -m`" = "Power Macintosh" ]; then 11 FLINT_TUNE=" -fPIC -funroll-loops " 12 elif [ "`uname -m`" = "ia64" ]; then 13 # -funroll-loops crashes the build on itanium under GCC-4.2.1, as reported by 14 # Kate Minola. 15 FLINT_TUNE=" -fPIC " 16 else 17 FLINT_TUNE=" -fPIC -funroll-loops " 9 if [ "$SAGE_LOCAL" = "" ]; then 10 echo >&2 "Error: SAGE_LOCAL undefined - exiting..."; 11 echo >&2 "Maybe run 'sage -sh'?" 12 exit 1 18 13 fi 19 14 20 export FLINT_TUNE 15 cd src 16 $MAKE check 21 17 22 if [ "x$SAGE64" = xyes ]; then23 echo "Building a 64-bit version of the Flint test suite"24 FLINT_TUNE=" -fPIC -m64 -funroll-loops"25 fi26 27 FLINT_GMP_INCLUDE_DIR="$SAGE_LOCAL"/include/28 FLINT_GMP_LIB_DIR="$SAGE_LOCAL"/lib/29 30 FLINT_NTL_INCLUDE_DIR="$SAGE_LOCAL"/include31 FLINT_NTL_LIB_DIR="$SAGE_LOCAL"/lib/32 33 # What is QD??34 FLINT_QD_LIB_DIR="$SAGE_LOCAL"/include35 FLINT_QD_INCLUDE_DIR="$SAGE_LOCAL"/include36 37 export FLINT_GMP_INCLUDE_DIR38 export FLINT_GMP_LIB_DIR39 export FLINT_QD_INCLUDE_DIR40 export FLINT_QD_LIB_DIR41 export FLINT_NTL_INCLUDE_DIR42 export FLINT_NTL_LIB_DIR43 44 ###45 FLINT_LINK_OPTIONS=""46 export FLINT_LINK_OPTIONS47 48 cd src49 50 make test51 18 if [ $? -ne 0 ]; then 52 echo "Error building the test suite for FLINT"19 echo >&2 "Error: FLINT failed to pass its test suite." 53 20 exit 1 54 21 fi 55 56 for i in {mpn_extras-test,ZmodF-test,ZmodF_mul-test,ZmodF_poly-test,fmpz-test,fmpz_poly-test,mpz_poly-test,long_extras-test,zmod_poly-test,zmod_mat-test,NTL-interface-test}; do57 ./$i58 if [ $? -ne 0 ]; then59 echo "FLINT test failed: $i"60 exit 161 fi62 done -
spkg-install
diff --git a/spkg-install b/spkg-install
a b 1 1 #!/usr/bin/env bash 2 2 3 ############################################################################### 4 # 5 # FLINT Sage install script 6 # 7 ############################################################################### 8 3 9 if [ "$SAGE_LOCAL" = "" ]; then 4 echo "SAGE_LOCAL undefined ... exiting";5 echo "Maybe run 'sage -sh'?"10 echo >&2 "Error: SAGE_LOCAL undefined - exiting..."; 11 echo >&2 "Maybe run 'sage -sh'?" 6 12 exit 1 7 13 fi 8 14 9 if [ $UNAME = "CYGWIN" ]; then 10 # we'll move the libntl.a temporarily out of the way and move it back at the 11 # end of this spkg-install script 12 mv $SAGE_LOCAL/lib/libntl.a $SAGE_LOCAL/lib/xxx_libntl.a 13 fi 14 15 if [ "`uname`" = "Linux" -a "`uname -m`" = "x86_64" ]; then 16 # This line causes *MAJOR* Illegal Instruction problems on 17 # 64-bit Pentium 4's. Do *not* do that!! Only enable the 18 # opteron stuff with a surefire way of detecting that a 19 # machine is really an opteron. 20 #FLINT_TUNE="-mtune=opteron -march=opteron -fPIC -funroll-loops " 21 22 FLINT_TUNE="-fPIC -funroll-loops " 23 elif [ "`uname`" = "Darwin" -a "`uname -m`" = "Power Macintosh" ]; then 24 FLINT_TUNE=" -fPIC -funroll-loops " 25 elif [ "`uname -m`" = "ia64" ]; then 26 # -funroll-loops crashes the build on itanium under GCC-4.2.1, as reported by 27 # Kate Minola. 28 echo "Turning off loop unrolling on Linux/Itanium" 29 FLINT_TUNE=" -fPIC " 30 elif [ "`uname`" = "SunOS" -a "`uname -p`" = "sparc" ]; then 31 # -funroll-loops crashes the build on an US IIIi under GCC-4.3.2, as reported by 32 # Michael Abshoff 33 echo "Turning off loop unrolling on Solaris/Sparc" 34 FLINT_TUNE=" -fPIC " 35 else 36 FLINT_TUNE=" -fPIC -funroll-loops " 15 if [ "$SAGE64" = "yes" ]; then 16 echo "Building a 64-bit version of FLINT." 17 export ABI="64" 37 18 fi 38 19 39 if [ -z "$CFLAG64" ] ; then 40 CFLAG64=-m64 41 fi 42 43 if [ -z "$CXXFLAG64" ] ; then 44 CXXFLAG64=-m64 20 if [ "$SAGE_DEBUG" = "yes" ]; then 21 echo "Building a debug version of FLINT." 22 export CFLAGS="-O0 -g" 23 export FLINT_TUNE=" " 45 24 fi 46 25 47 48 if [ "x$SAGE64" = xyes ]; then 49 FLINT_TUNE="$FLINT_TUNE $CFLAG64" 50 export CXXFLAG64 26 if [ "$UNAME" = "CYGWIN" ]; then 27 echo "Only building a shared version of FLINT on Cygwin." 28 FLINT_CONFIGURE="--disable-static $FLINT_CONFIGURE" 51 29 fi 52 30 53 export FLINT_TUNE 31 cd src 54 32 55 FLINT_GMP_INCLUDE_DIR="$SAGE_LOCAL"/include/ 56 FLINT_GMP_LIB_DIR="$SAGE_LOCAL"/lib/ 33 echo "Configuring FLINT." 34 ./configure --prefix="$SAGE_LOCAL" --with-mpir="$SAGE_LOCAL" \ 35 --with-mpfr="$SAGE_LOCAL" --with-ntl="$SAGE_LOCAL" $FLINT_CONFIGURE 36 if [ $? -ne 0 ]; then 37 echo >&2 "Error: Failed to configure FLINT." 38 exit 1 39 fi 57 40 58 FLINT_NTL_INCLUDE_DIR="$SAGE_LOCAL"/include 59 FLINT_NTL_LIB_DIR="$SAGE_LOCAL"/lib/ 41 echo "Building FLINT shared library." 42 $MAKE 43 if [ $? -ne 0 ]; then 44 echo >&2 "Error: Failed to build FLINT shared library." 45 exit 1 46 fi 60 47 61 # What is QD?? possibly quad double? 62 FLINT_QD_LIB_DIR="$SAGE_LOCAL"/include 63 FLINT_QD_INCLUDE_DIR="$SAGE_LOCAL"/include 48 echo "Deleting old FLINT files." 49 rm -f "$SAGE_LOCAL"/lib/libflint* 50 rm -rf "$SAGE_LOCAL"/include/flint 64 51 65 export FLINT_GMP_INCLUDE_DIR 66 export FLINT_GMP_LIB_DIR 67 export FLINT_QD_INCLUDE_DIR 68 export FLINT_QD_LIB_DIR 69 export FLINT_NTL_INCLUDE_DIR 70 export FLINT_NTL_LIB_DIR 71 72 ### 73 FLINT_LINK_OPTIONS="" 74 export FLINT_LINK_OPTIONS 75 76 # Apply all patches 77 if [ $UNAME = "CYGWIN" ]; then 78 PATCH_FLAG=--binary 52 echo "Installing new FLINT files." 53 $MAKE install 54 if [ $? -ne 0 ]; then 55 echo >&2 "Error: Failed to install FLINT." 56 exit 1 79 57 fi 80 cd src81 echo "Patching Flint"82 for p in ../patches/*.patch; do83 patch $PATCH_FLAG -p1 <"$p"84 if [ $? -ne 0 ]; then85 echo "Applying patch $p failed"86 exit 187 fi88 done89 90 # UNIX91 if [ $UNAME != "Darwin" ]; then92 $MAKE libflint.so93 if [ $? -ne 0 ]; then94 if [ $UNAME = "CYGWIN" ]; then95 # let's move libntl.a back96 mv $SAGE_LOCAL/lib/xxx_libntl.a $SAGE_LOCAL/lib/libntl.a97 fi98 echo "Error building flint shared library."99 exit 1100 fi101 if [ $UNAME = "CYGWIN" ]; then102 # let's move libntl.a back103 mv $SAGE_LOCAL/lib/xxx_libntl.a $SAGE_LOCAL/lib/libntl.a104 # make both kinds of dynamic libraries available for Windows105 cp -p libflint.so libflint.dll106 fi107 echo "Deleting old FLINT"108 rm -f $SAGE_LOCAL/lib/libflint*109 echo "Installing new library file"110 $CP -p libflint* "$SAGE_LOCAL/lib/"111 fi112 113 # OS X114 if [ $UNAME = "Darwin" ]; then115 if [ "$SAGE64" = "yes" ]; then116 $MAKE libflint.dylib64117 else118 $MAKE libflint.dylib119 fi120 if [ ! -f libflint.dylib ]; then121 echo "Failed to build FLINT dylib."122 exit 1123 fi124 echo "Deleting old FLINT"125 rm -f $SAGE_LOCAL/lib/libflint*126 echo "Installing new library file"127 $CP libflint.dylib "$SAGE_LOCAL/lib/"128 fi129 130 131 # Copy the header files132 133 rm -rf "$SAGE_LOCAL"/include/FLINT134 135 for i in {FLINT/,FLINT/zn_poly/src/}; do136 mkdir -p "$SAGE_LOCAL"/include/$i137 if [ $? -ne 0 ]; then138 echo "Error building FLINT"139 exit 1140 fi141 142 $CP ${i/FLINT\//}*.h "$SAGE_LOCAL"/include/$i143 if [ $? -ne 0 ]; then144 echo "Error building FLINT"145 exit 1146 fi147 done