= MPIR = == Description == MPIR is an open source multiprecision integer library derived from version 5.0.1 of the GMP (GNU Multi Precision) project (which was licensed LGPL v2+). See http://www.mpir.org == License == * LGPL V3+ == SPKG Maintainers == * William Stein == Upstream Contact == * The Google group mpir-devel * thempirteam@googlemail.com == Dependencies == * iconv * GNU patch == Special Update/Build Instructions == * TODO: - Perhaps also modify CXXFLAGS (and/or CPPFLAGS). - We currently don't use anything of GMP's/MPIR's CC setting, and matching with the current compiler (`$CC`) is perhaps suboptimal. * Make sure the patches still apply. * Remove some files / directories not needed for Sage from upstream: rm -rf src/build.vc* # Microsoft Visual C build files rm -rf src/yasm/Mkfiles/{dj,vc*} # DJGPP, Microsoft Visual C (Saves 13 of 40 MB uncompressed.) === Patches === * gmp-h.in.patch: a trivial patch adding some #includes such that MPIR would compile on SunOS with Sun CC. The changes in this patch only take effect if the preprocessor variable `__SUNPRO_CC` is defined. * quote_asm.patch: replace things of the form "define(OPERATION_foo,1)" by "define(`OPERATION_foo',1)". This gives proper quoting for use with m4, otherwise the define might expand to "define(,1)". Some versions of m4 bail out with an error when encountering "define(,1)". These files were patched using find mpn -name '*.asm' -exec sed -i 's/define(\(OPERATION[^,]*\),/define(\`\1'"'"',/' {} \; * configure.patch: add some extra run-time configure tests, remove mentions of Fortran. Re-generated configure (using the same versions of autoconf, automake and libtool as the original files). * core-prescott-configure.patch: fix upstream bug breaking support for core-*-* and prescott-*-*, at least on non-MacOS-X systems. (The bug results in requiring `ABI=standard` on these platforms, and only using the generic C implementation when configured that way.) Patches `configure`, `acinclude.m4` and `configure.in`; to be applied *after* `patches/configure.patch` (which its name should currently make sure). Submitted upstream (against MPIR 2.6.0; 26.02.2013). * clang-config.patch: remove one broken configure test and fix one test for Clang, see http://trac.sagemath.org/ticket/13948 * mpz__t-scan-bugfix.patch: fix trivial bug in `tests/mpz/t-scan.c` leading to a segfault (during the test suite) with newer GCC versions. Submitted upstream (against MPIR 2.6.0; 02.04.2013). * apple.patch: make sure 32 bits Apple Darwin use the correct asm directories. == Changelog == === mpir-2.6.0.p3 (Jeroen Demeyer, 2 October 2013) === * #13948: clang-config.patch: fix configure script for Clang. === mpir-2.6.0.p2 (Leif Leonhardy, April 3rd 2013) === * #14399: MPIR 2.6.0's test suite fails with GCC 4.8.0 Rather surprisingly, this bug, now causing a segfault in MPIR's test suite, apparently never showed up before. Add patch (`mpz__t-scan-bugfix.patch`) fixing an invalid array access in the test code. Patch has been submitted upstream. === mpir-2.6.0.p1 (Leif Leonhardy, February 27th 2013) === * #14172: MPIR 2.6.0 (but also older versions) fails to configure on Intel "Core" CPUs (expecting ABI to be "standard" rather than "32", which is just one symptom). (Similar for Pentium4 Prescott.) Add patch (`core-prescott-configure.patch`) fixing `acinclude.m4`, `configure.in`, and the generated `configure`, rebased to the patches we apply in advance. Patch(es) have been submitted upstream. === mpir-2.6.0.p0 (Jean-Pierre Flori, 12 January 2013) === * Trac #13137: Update to MPIR 2.6.0. * Modify spkg-install to rename *,asm files to *.asm files. * Remove -Wl,-z,noexecstack fix which has been integrated upstream. * Remove old code about 32 bits Apple Darwin and use slightly modified upstream fix. === mpir-2.5.2.p0 (John Palmieri, 3 October 2012) === * Trac #13137: Update to MPIR 2.5.2. * Remove the patch 'patches/yasm__tools__re2c__code.c.patch'. * Do not use clang, which fails to compile MPIR, on OS X. === mpir-2.4.0.p7 (Karl-Dieter Crisman, Jean-Pierre Flori, 1 August 2012) === * Trac #12115: let MPIR build on Cygwin. * Only build the shared version of the library on Cygwin. * Export ABI=32 on Cygwin. === mpir-2.4.0.p6 (Jeroen Demeyer, 28 May 2012) === * Trac #12751: Apply the ia64 workaround for gcc-4.7.0 *only* on gcc-4.7.0 and not on other gcc-4.7.x versions. === mpir-2.4.0.p5 (Jeroen Demeyer, 27 May 2012) === * Trac #12970: configure.patch: add some configure tests to check that certain code compiles and runs. In particular, add a runtime test for unsigned long/double division. * Additionally, remove all mentions of Fortran in the configure file. Supposedly, it was there to work around a libtool bug. === mpir-2.4.0.p4 (Jeroen Demeyer, 26 May 2012) === * Trac #12954: when SAGE_FAT_BINARY=yes on systems which don't support --enable-fat, compile a generic binary (not assuming any particular CPU) by passing the output of configfsf.guess to the --build option of ./configure. * Disable SAGE_FAT_BINARY when bootstrapping GCC. * Rename MPIR_EXTRA_OPTS to MPIR_CONFIGURE. * Add configure options directly to MPIR_CONFIGURE, no longer use SAGE_CONF_OPTS for this. * When user specifies CFLAGS, append them to MPIR's flags instead of completely replacing MPIR's flags. * Remove $default_cflags and get_processor_specific_cflags(). === mpir-2.4.0.p3 (Jeroen Demeyer, April 26th, 2012) === Trac #11616, reviewer fixes: * When the first configure run (with CFLAGS unset) of MPIR fails, bail out with an error. I am not aware of any system where MPIR fails to configure with CFLAGS unset but succeeds with CFLAGS set. This implies the following simplifications: - We no longer read CC and CFLAGS from /usr/include/gmp.h or /usr/local/include/gmp.h - We no longer try to add -march=native, we simply use MPIR's flags. * Extract $CC and $CFLAGS from Makefile instead of mpir.h, which is simpler and more reliable. * Added `quote_asm.patch` to add proper quoting to the m4 in .asm files. * Use `patch` to patch gmp-h.in instead of copying the file. * In get_processor_specific_cflags() in spkg-install, also check for -mpower* and -mno-power* flags, as MPIR adds -mpower on 32-bit PowerPC systems. === mpir-2.4.0.p2 (Leif Leonhardy, April 4th, 2012) === #11616 (upgrading MPIR), further fixes: * Before enabling `-march=native`, minimalistically check whether the system's assembler also understands the instructions the compiler emits with that option. (Work-around for e.g. GCC 4.6.3 on MacOS X 10.x and Intel Core i7-family CPUs with AVX.) * Do not unconditionally unset `PYTHON`, since Sage (>=5.0.beta10) no longer pollutes the environment with its package version variables, which previous- ly confused yasm's `configure`. * Fix extraction of `__GMP_CC` and `__GMP_CFLAGS` from `gmp.h`, since MPIR meanwhile defines these to preprocessor variables (rather than literals). Also don't use `\+` in `sed` patterns, as this is less portable. * Work around GCC 4.7.0 bug (compilation error) on Linux ia64 (Itanium) by almost completely disabling optimization on that platform if GCC 4.7.x is detected. This doesn't hurt much if we later rebuild MPIR with a (non- broken) GCC from the new GCC spkg. Cf. #12765. * Do not build the C++ interface and static libraries when bootstrapping the GCC spkg, i.e. if `SAGE_BUILD_TOOLCHAIN=yes`. (GMP/MPIR is a prerequisite for it, and MPIR will later get rebuilt with both enabled, with the newly built GCC.) Cf. #12782. * Fix a potential race condition in yasm's build by patching the re2c source. Cf. #11844. * Add "`patch` loop" to apply any patches (`*.patch`) located in `patches/`. Currently only the re2c patch matches that; the prepatched header to support Sun's C compiler is still copied over (and only on SunOS, although it doesn't do any harm on other platforms). * Minor clean-up; e.g. redirect error messages and warnings to `stderr`, quote parameter to `--libdir`, add some comments and messages, also save user's setting of `LDFLAGS` and `ABI`. === mpir-2.4.0.p1 (Leif Leonhardy, March 21st, 2012) === * Upstream upgrade to MPIR 2.4.0 (#11616). The 2.4.0.p0 spkg isn't in this history, as it was based on the 2.1.3.p4 spkg, i.e., is "on another branch", and never got merged into Sage. * Remove forcing a sequential `make install` again, since the potential race condition was fixed in MPIR 2.1.4. * Fix `.hgtags`, which contained duplicate entries, and was missing others. === mpir-2.1.3.p9 (Simon King, 11 December 2011) === * #12131: Use --libdir, so that the package works on openSUSE === mpir-2.1.3.p8 (Jeroen Demeyer, 10 December 2011) === * #12139: Disable parallel "make install". === mpir-2.1.3.p7 (Leif Leonhardy, October 30th, 2011) === * #11964: Use ABI=mode64 instead of ABI=64 on Linux PPC64. === mpir-2.1.3.p6 (Jeroen Demeyer, October 11th, 2011) === * #11896: Do not set ABI at all when the compiler does not support $CFLAG32 nor $CFLAG64 (by default set to '-m32' resp. '-m64'). === mpir-2.1.3.p5 (Leif Leonhardy, October 5th, 2011) === * #11896: Set ABI=32 on 32-bit (Linux) systems that run on 64-bit processors since otherwise the build might fail with a bunch of assembler errors when MPIR selects the wrong (64-bit) ABI. (Reported upstream, but no response yet.) === mpir-2.1.3.p4 (Leif Leonhardy, July 19th, 2011) === * #8664: Upgrade Sage's MPIR spkg to version 2.1.3 * Do not delete old GMP/MPIR shared libraries as Sage's versions of libraries used by GCC might still refer to them, such that their deletion would break GCC inside Sage. (PPL e.g. refers to libgmpxx; MPFR and MPC are equally dangerous, since they're [also] used by recent versions of GCC.) * Some more messages (e.g on rebuilding the Sage library and other packages after installation) and comments added. * "Patches" section added. * Also refreshed the patched gmp-h.in for SunOS. ;-) === mpir-2.1.3.p3 (Leif Leonhardy, July 18th, 2011) === * #8664: Upgrade Sage's MPIR spkg to version 2.1.3 * Support MacOS 10.7 (Darwin 11) and later. * Add warning if SAGE_DEBUG=yes since we then disable optimization. === mpir-2.1.3.p2 (Leif Leonhardy, November 24th, 2010) === * #8664: Upgrade Sage's MPIR spkg to version 2.1.3 * Further improvements: - Let MPIR select CPU-specific code generation parameters (for CFLAGS) even if we (also) pass our own (or user-specified) CC and CFLAGS; these might be used by MPFR and GMP-ECM later, too, since MPIR's settings are recorded in 'gmp.h' / 'mpir.h'. Don't override user-settings (and respect SAGE_FAT_BINARY, SAGE_DEBUG etc.) though. Add '-march-native' if appropriate and supported. * Recognize also lower-case 'power*' arch (from 'uname -m'). * Major restructuring / reformatting; more comments and messages added. === mpir-2.1.3.p1 (Leif Leonhardy, November 5th, 2010) === * #8664: Upgrade Sage's MPIR spkg to version 2.1.3 * Fix Darwin assembler errors on PPC by passing the option to allow use of extended instruction set to it. (See also #5847.) * Enable the build of a static MPIR library, to be e.g. used by ECM. * Support additional 'configure' options given by MPIR_EXTRA_OPTS, and print messages how we configure. * Print various environment variable settings (CC, CFLAGS et al.). * Move hint to rerun 'make' on *install* errors to correct place. * Further comments added. === mpir-2.1.3.p0 (Leif Leonhardy, November 3rd, 2010) === * #8664: Upgrade Sage's MPIR spkg to version 2.1.3 * Dependencies corrected (might be even more, depending on the configuration). * Work around executable stack issue on Fedora 14 (and other SELinux- enabled systems). * If 'make install' fails, this might be due to a rare race condition; give a hint that rerunning 'make' might be sufficient. * Support SAGE_DEBUG (disabling optimzation), but add debug symbols by default and enable optimization (-O3) if SAGE_DEBUG!="yes". * spkg-install clean-up: - Use $UNAME instead of `uname`. - Support "fat" binaries on Linux i486 and i586 as well, give warning if not supported (e.g. ia64 [?]). - Remove dead code; more or less cosmetic changes. * spkg-check: - Use $MAKE instead of 'make'. - Print messages on success and error. === mpir-1.2.2.p2 (Volker Braun, Oct 28, 2010) === * Clear the execstack (executable stack) flag from the shared libraries. NOTE: Obsoleted by the 2.1.3 spkg(s), not in the Mercurial repository. === mpir-2.1.1 (Mike Hansen, August 16th, 2010) === * #8664: Upgrade Sage's MPIR spkg to version 2.1.1 === mpir-1.2.2.p1 (Georg S. Weber, May 18th 2010) === * Update the License information (e.g. above), as kindly requested on the MPIR project homepage (see "http://www.mpir.org/past.html"): "... Note MPIR 1.2.2 is overall LGPL v3+ due to us accidentally including an LGPL v3 file (mpf/set_str.c). Please distribute this version of the library under the terms of this license! ..." (According to "http://trac.mpir.org/mpir_trac/ticket/71", this LGPL v3 file stems from (patches for) GMP 4.2.4 in the year 2008.) Also copied two new files "gpl-3.0.txt" and "lgpl-3.0.txt" under src/, taken from the updated mpir-1.2.2 "vanilla" tarball downloaded under the link: http://www.mpir.org/mpir-1.2.2.tar.gz According to private communication with Bill Hart (MPIR upstream), this addition of two files was the only change done to the tarball itself. === mpir-1.2.2.p0 (David Kirkby, January 5th 2010) === * 7849. Included two header files so MPIR builds with Sun studio if configured with --enable-cxx and the newer Sun C++ library is used (library=stlport4). This is between #ifdefine __SUNPRO_CC and #endif, so will have no effect except if Sun Studio is used. === mpir-1.2.2 (William Stein, Nov 18, 2009) === * Upgraded to MPIR-1.2.2. === mpir-1.2.p9 (William Stein, Nov 12, 2009) === * Also enable --enable-fat for i686. === mpir-1.2.p8 (William Stein, Nov 10, 2009) === * Put ABI=32 back except on OS X 10.6 (all versions) === mpir-1.2.p6 (William Stein, Sept 25, 2009) === * Put ABI=32 back except on OS X 10.6 === mpir-1.2.p5 (William Stein, Sept 24, 2009) === * Remove explicit ABI=32 for OS X; instead let the OS decide. This is needed for 10.6 where the default is 64-bit instead of 32-bit. === mpir-1.2.p3 (Nick Alexander, June 9, 2009) === * Update to latest MPIR 1.2 final release. === mpir-1.2.p2 (William Stein, June 4, 2009) === * Update to latest MPIR 1.2 pre-release === mpir-1.2.p1 (William Stein, June 2, 2009) === * Update to latest MPIR 1.2 pre-release === mpir-1.2.p0 (William Stein, May 31, 2009) === * add support for SAGE_FAT_BINARY flag === mpir-1.2 (William Stein, May 31, 2009) === * Update to the latest MPIR 1.2 pre-release * Change "GMP" --> "MPIR" in various places. === gmp-mpir-1.1.2 (William Stein, May 28, 2009) === * Update to the latest MPIR 1.1.2 release === gmp-mpir-1.1.1 (Michael Abshoff, April 29th, 2009) === * Update to the latest MPIR 1.1.1 release === gmp-mpir-1.1 (Michael Abshoff, April 17th, 2009) === * Update to the latest MPIR 1.1 release === gmp-mpir-1.0.rc8 (Michael Abshoff, April 10th, 2009) === * Update to the latest MPIR 1.0 release candidate * fix --enable-gmplink flag that was changed * remove 1.0.rc7 non-Darwin workaround that was fixed in 1.0.rc8 === gmp-mpir-1.0.rc7 (Michael Abshoff, April 5th, 2009) === * Update to the latest MPIR 1.0 release candidate === gmp-mpir-1.0.rc4 (Michael Abshoff, April 1st, 2009) === * Update to the latest MPIR 1.0 release candidate * remove some 1.0.rc4 workaround again since it was fixed upstream === gmp-mpir-1.0.rc4 (Michael Abshoff, April 1st, 2009) * Update to the latest MPIR 1.0 release candidate * turn on the gmp link option === gmp-mpir-0.9 (Michael Abshoff, February 20th, 2009) === * 0.9.rc4 become the official 0.9 release * delete more OSX MacIntel specific assembly faile due to PIC issue (#5315) === gmp-mpir-0.9.rc4 (Michael Abshoff, February 10th, 2009) === * update to latest upstream 0.9.rc4 release (fixes #5210) === gmp-mpir-0.9.rc3 (Michael Abshoff, February 7th, 2009) === * update to latest upstream 0.9.rc3 release * clean out no longer used patches from the patches directory * turn on test suite per default * fix some typos and small bugs in spkg-install === gmp-mpir-svn1555.p0 (Michael Abshoff, January 19th, 2008) === * unset PYTHON since it confuses yasm during configure time === gmp-mpir-svn1555 (Michael Abshoff, January 19th, 2008) === * Switch to MPIR === gmp-4.2.1.p13 (Michael Abshoff, March 28th, 2008) === * Fix OSX 10.5 detection code to handle 10.5.2 and higher (#2672) * Make sure SAGE_ROOT is defined (#633) * clean spkg-check === gmp-4.2.1.p12 and previous === Work by * William Stein * Joe Weening * David Harvey * Wilson Cheung