pkgsrc/devel/gmp/Makefile

73 lines
1.9 KiB
Makefile
Raw Normal View History

gmp: updated to 6.2.0 Changes between GMP version 6.1.* and 6.2.0 BUGS FIXED * gmp_snprintf now correctly reports an error (returns -1) when snprintf does. * Conversion to double is now more robust even if the configuration process does not recognize the float format. * mpz_powm could return a not completely normalised value, when the exponent was 1 and the base < 0. * mpf_set_str could create invalid mpf_t variables for input strings with many leading zeros. FEATURES * New C++ functions factorial, primorial and fibonacci for mpz_class. * Functions to detect primality now substitute the first 24 Miller-Rabin iterations with the BPSW test. * Mini-GMP: new functions mpz_2fac_ui and mpz_mfac_uiui. * Mini-GMP: mpz_sizeinbase, mpz_get_str, and mpz_set_str now support bases up to 62. * Mini-GMP: added support for the mpq_t layer. * MIPS r6 cores are now supported. SPEEDUPS * Major speedup for AMD Ryzen and Epyc thanks to an extensive set of assembly code. * Major speedup for IBM POWER9 thanks to assembly code making use of new madd instruction. * Speedup for 64-bit ARM CPUs thanks to new/improved assembly code. * The n-over-k function mpz_bin_ui has been reimplemented for great speedups for large operands. * Speedup for the worst case of mpz_perfect_power_p. * Speedup for gcd for small and medium size operands. * Speedup for really huge multiplies thanks to much larger FFT tables. MISC * Internal representation of the mpz_t variables now supports lazy allocation; memory is allocated only when a value is stored. * Small improvements and better coverage for the test suite. * The tune/speed program can measure some more functions. * The low-level function mpn_mul no longer diverts to mpn_sqr, users should call mpn_sqr directly when applicable. * New installed files gmp.pc and gmpxx.pc, for use with pkg-config.
2020-01-20 22:25:24 +01:00
# $NetBSD: Makefile,v 1.87 2020/01/20 21:25:24 adam Exp $
gmp: updated to 6.2.0 Changes between GMP version 6.1.* and 6.2.0 BUGS FIXED * gmp_snprintf now correctly reports an error (returns -1) when snprintf does. * Conversion to double is now more robust even if the configuration process does not recognize the float format. * mpz_powm could return a not completely normalised value, when the exponent was 1 and the base < 0. * mpf_set_str could create invalid mpf_t variables for input strings with many leading zeros. FEATURES * New C++ functions factorial, primorial and fibonacci for mpz_class. * Functions to detect primality now substitute the first 24 Miller-Rabin iterations with the BPSW test. * Mini-GMP: new functions mpz_2fac_ui and mpz_mfac_uiui. * Mini-GMP: mpz_sizeinbase, mpz_get_str, and mpz_set_str now support bases up to 62. * Mini-GMP: added support for the mpq_t layer. * MIPS r6 cores are now supported. SPEEDUPS * Major speedup for AMD Ryzen and Epyc thanks to an extensive set of assembly code. * Major speedup for IBM POWER9 thanks to assembly code making use of new madd instruction. * Speedup for 64-bit ARM CPUs thanks to new/improved assembly code. * The n-over-k function mpz_bin_ui has been reimplemented for great speedups for large operands. * Speedup for the worst case of mpz_perfect_power_p. * Speedup for gcd for small and medium size operands. * Speedup for really huge multiplies thanks to much larger FFT tables. MISC * Internal representation of the mpz_t variables now supports lazy allocation; memory is allocated only when a value is stored. * Small improvements and better coverage for the test suite. * The tune/speed program can measure some more functions. * The low-level function mpn_mul no longer diverts to mpn_sqr, users should call mpn_sqr directly when applicable. * New installed files gmp.pc and gmpxx.pc, for use with pkg-config.
2020-01-20 22:25:24 +01:00
DISTNAME= gmp-6.2.0
CATEGORIES= devel math
MASTER_SITES= https://gmplib.org/download/gmp/
MASTER_SITES+= ${MASTER_SITE_GNU:=gmp/}
# Use .tar.bz2 distfile so that no extra dependency on archivers/xz
# is needed when building lang/gcc* with option gcc-inplace-math.
2013-10-02 17:13:46 +02:00
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
2017-08-01 16:58:51 +02:00
HOMEPAGE= https://gmplib.org/
COMMENT= Library for arbitrary precision arithmetic
LICENSE= gnu-lgpl-v3 OR gnu-gpl-v2
USE_LANGUAGES= c c++ c99
USE_LIBTOOL= yes
gmp: updated to 6.2.0 Changes between GMP version 6.1.* and 6.2.0 BUGS FIXED * gmp_snprintf now correctly reports an error (returns -1) when snprintf does. * Conversion to double is now more robust even if the configuration process does not recognize the float format. * mpz_powm could return a not completely normalised value, when the exponent was 1 and the base < 0. * mpf_set_str could create invalid mpf_t variables for input strings with many leading zeros. FEATURES * New C++ functions factorial, primorial and fibonacci for mpz_class. * Functions to detect primality now substitute the first 24 Miller-Rabin iterations with the BPSW test. * Mini-GMP: new functions mpz_2fac_ui and mpz_mfac_uiui. * Mini-GMP: mpz_sizeinbase, mpz_get_str, and mpz_set_str now support bases up to 62. * Mini-GMP: added support for the mpq_t layer. * MIPS r6 cores are now supported. SPEEDUPS * Major speedup for AMD Ryzen and Epyc thanks to an extensive set of assembly code. * Major speedup for IBM POWER9 thanks to assembly code making use of new madd instruction. * Speedup for 64-bit ARM CPUs thanks to new/improved assembly code. * The n-over-k function mpz_bin_ui has been reimplemented for great speedups for large operands. * Speedup for the worst case of mpz_perfect_power_p. * Speedup for gcd for small and medium size operands. * Speedup for really huge multiplies thanks to much larger FFT tables. MISC * Internal representation of the mpz_t variables now supports lazy allocation; memory is allocated only when a value is stored. * Small improvements and better coverage for the test suite. * The tune/speed program can measure some more functions. * The low-level function mpn_mul no longer diverts to mpn_sqr, users should call mpn_sqr directly when applicable. * New installed files gmp.pc and gmpxx.pc, for use with pkg-config.
2020-01-20 22:25:24 +01:00
USE_TOOLS+= autoconf gm4 makeinfo
Changes 5.1.0: BUGS FIXED * When reading a C++ number (like mpz_class) in an istream reaches the end of the stream, the eofbit is now set. * The result sign of mpz_rootrem's remainder is now always correct. * The mpz_remove function now handles negative divisors. * Contains all fixes from release 5.0.5. SPEEDUPS * The n-factorial and n-over-k functions have been reimplemented for great speedups for small and large operands. * New subquadratic algorithm for the Kronecker/Jacobi/Legendre symbol. * Major speedup for ARM, in particular ARM Cortex-A9 and A15, thanks to broad assembly support. * Significant speedup or POWER6 and POWER7 thanks to improved assembly. * The performance under M$ Windows' 64-bit ABI has been greatly improved thanks to complete assembly support. * Minor speed improvements of many functions and for many platforms. FEATURES * Many new CPUs recognised. * New functions for multi-factorials, and primorial: mpz_2fac_ui, mpz_mfac_uiui and mpz_primorial_ui. * The mpz_powm_sec function now uses side-channel silent division for converting into Montgomery residues. * The fat binary mechanism is now more robust in its CPU recognition. MISC * Inclusion of assembly code is now controlled by the configure options --enable-assembly and --disable-assembly. The "none" CPU targets is gone. * In C++, the conversions mpq_class->mpz_class, mpf_class->mpz_class and mpf_class->mpq_class are now explicit. * Includes "mini-gmp", a small, portable, but less efficient, implementation of a subset of GMP's mpn and mpz interfaces. Used in GMP bootstrap, but it can also be bundled with applications as a fallback when the real GMP library is unavailable. * The ABIs under AIX are no longer called aix32 and aix64, but mode64 and 32. This is more consistent with other powerpc systems. * The coverage of the testsuite has been improved, using the lcov tool. See also http://gmplib.org/devel/lcov/. * It is now possible to compile GMP using a C++ compiler. * K&R C compilers are no longer supported. * The BSD MP compatibility functions have been removed.
2013-01-31 21:30:25 +01:00
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --without-readline
gmp: updated to 6.2.0 Changes between GMP version 6.1.* and 6.2.0 BUGS FIXED * gmp_snprintf now correctly reports an error (returns -1) when snprintf does. * Conversion to double is now more robust even if the configuration process does not recognize the float format. * mpz_powm could return a not completely normalised value, when the exponent was 1 and the base < 0. * mpf_set_str could create invalid mpf_t variables for input strings with many leading zeros. FEATURES * New C++ functions factorial, primorial and fibonacci for mpz_class. * Functions to detect primality now substitute the first 24 Miller-Rabin iterations with the BPSW test. * Mini-GMP: new functions mpz_2fac_ui and mpz_mfac_uiui. * Mini-GMP: mpz_sizeinbase, mpz_get_str, and mpz_set_str now support bases up to 62. * Mini-GMP: added support for the mpq_t layer. * MIPS r6 cores are now supported. SPEEDUPS * Major speedup for AMD Ryzen and Epyc thanks to an extensive set of assembly code. * Major speedup for IBM POWER9 thanks to assembly code making use of new madd instruction. * Speedup for 64-bit ARM CPUs thanks to new/improved assembly code. * The n-over-k function mpz_bin_ui has been reimplemented for great speedups for large operands. * Speedup for the worst case of mpz_perfect_power_p. * Speedup for gcd for small and medium size operands. * Speedup for really huge multiplies thanks to much larger FFT tables. MISC * Internal representation of the mpz_t variables now supports lazy allocation; memory is allocated only when a value is stored. * Small improvements and better coverage for the test suite. * The tune/speed program can measure some more functions. * The low-level function mpn_mul no longer diverts to mpn_sqr, users should call mpn_sqr directly when applicable. * New installed files gmp.pc and gmpxx.pc, for use with pkg-config.
2020-01-20 22:25:24 +01:00
INFO_FILES= yes
TEST_TARGET= check
Update to 6.0.0a: Changes between 6.0.0 and 6.0.0a: Not documented. Changes between GMP version 5.1.* and 6.0.0 BUGS FIXED * The function mpz_invert now considers any number invertible in Z/1Z. * The mpn multiply code now handles operands of more than 2^31 limbs correctly. (Note however that the mpz code is limited to 2^32 bits on 32-bit hosts and 2^37 bits on 64-bit hosts.) * Contains all fixes from release 5.1.3. SPEEDUPS * Plain division of large operands is faster and more monotonous in operand size. * Major speedup for ARM, in particular ARM Cortex-A15, thanks to improved assembly. * Major speedup for SPARC T4/T5 and speedup also for T3, thanks to a lot of new assembly. * Speedup for Intel Sandy Bridge, Ivy Bridge, Haswell, thanks to rewritten and vastly expanded assembly support. Speedup also for the older Core 2 and Nehalem. * Faster mixed arithmetic between mpq_class and double. * With g++, optimise more operations when one argument is a simple constant. FEATURES * Support for new Intel and AMD CPUs. * Support for ARM64 alias Aarch64 alias ARMv8. * New public functions mpn_sec_mul and mpn_sec_sqr, implementing side-channel silent multiplication and squaring. * New public functions mpn_sec_div_qr and mpn_sec_div_r, implementing side-channel silent division. * New public functions mpn_cnd_add_n and mpn_cnd_sub_n. Side-channel silent conditional addition and subtraction. * New public function mpn_sec_powm, implementing side-channel silent modexp. * New public function mpn_sec_invert, implementing side-channel silent modular inversion. * Better support for applications which use the mpz_t type, but nevertheless need to call some of the lower-level mpn functions. See the documentation for mpz_limbs_read and related functions. MISC [FreeBSD bashing removed]
2014-04-17 15:08:24 +02:00
WRKSRC= ${WRKDIR}/${DISTNAME:S/a$//}
PLIST_VARS+= cxx
.include "../../mk/bsd.prefs.mk"
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q}
.endif
.if empty(PKGSRC_COMPILER:Msunpro)
CONFIGURE_ARGS+= --enable-cxx
PLIST.cxx= yes
.endif
.if !empty(MACHINE_PLATFORM:MIRIX-5*) && !empty(ABI)
ABI= o32
.endif
2017-04-21 00:37:57 +02:00
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
2017-04-22 10:23:17 +02:00
. if !empty(PKGSRC_COMPILER:Msunpro)
# don't use x86 assembly (it doesn't build)
CONFIGURE_ENV+= MPN_PATH="generic"
Update to version 4.2.2. Support DESTDIR installation. Add option to build a "fat" binary on (${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin"). This isn't enabled by default now, but it might be useful for build builds, as it uses cpuid at runtime to choose the most appropriate assembler code. Insofar as I can tell, no BUILDLINK_A[BP]I_DEPENDS bump is necessary. NOTE: Support for Darwin-*-i386 and Darwin-*-x86_64 has been improved, see below. Thus, I recommend that we test building the assembler code on Darwin at some point. Changes between GMP version 4.2.1 and 4.2.2: * License is now LGPL version 3. Bugs: * Shared library numbers corrected for libcxx. * Fixed serious bug in gmpxx.h where a=a+b*c would generate garbage. Note that this only affects C++ programs. * Fix crash in mpz_set_d for arguments with large negative exponent. * Fix 32-bit ABI bug with Itanium assembly for popcount and hamdist. * Fix assembly syntax problem for powerpc-ibm-aix with AIX native assembler. * Fix problems with x86 --enable-fat, where the compiler where told to generate code for the build machine, not plain i386 code as it should. * Improved recognition of powerpc systems wrt Altivec/VMX capability. * Misc minor fixes, mainly workarounds for compiler/assembler bugs. Speedups: * "Core 2" and Pentium 4 processors, running in 64-bit mode will get a slight boost as they are now specifically recognized. Features: * New support for x86_64-solaris * New, rudimentary support for x86-apple-darwin and x86_64-apple-darwin. (Please see http://gmplib.org/macos.html for more information.)
2007-10-30 02:36:59 +01:00
. else
PKG_OPTIONS_VAR= PKG_OPTIONS.gmp
PKG_SUPPORTED_OPTIONS= gmp-fat mmx simd
PKG_SUGGESTED_OPTIONS= gmp-fat
Update to version 4.2.2. Support DESTDIR installation. Add option to build a "fat" binary on (${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin"). This isn't enabled by default now, but it might be useful for build builds, as it uses cpuid at runtime to choose the most appropriate assembler code. Insofar as I can tell, no BUILDLINK_A[BP]I_DEPENDS bump is necessary. NOTE: Support for Darwin-*-i386 and Darwin-*-x86_64 has been improved, see below. Thus, I recommend that we test building the assembler code on Darwin at some point. Changes between GMP version 4.2.1 and 4.2.2: * License is now LGPL version 3. Bugs: * Shared library numbers corrected for libcxx. * Fixed serious bug in gmpxx.h where a=a+b*c would generate garbage. Note that this only affects C++ programs. * Fix crash in mpz_set_d for arguments with large negative exponent. * Fix 32-bit ABI bug with Itanium assembly for popcount and hamdist. * Fix assembly syntax problem for powerpc-ibm-aix with AIX native assembler. * Fix problems with x86 --enable-fat, where the compiler where told to generate code for the build machine, not plain i386 code as it should. * Improved recognition of powerpc systems wrt Altivec/VMX capability. * Misc minor fixes, mainly workarounds for compiler/assembler bugs. Speedups: * "Core 2" and Pentium 4 processors, running in 64-bit mode will get a slight boost as they are now specifically recognized. Features: * New support for x86_64-solaris * New, rudimentary support for x86-apple-darwin and x86_64-apple-darwin. (Please see http://gmplib.org/macos.html for more information.)
2007-10-30 02:36:59 +01:00
. include "../../mk/bsd.options.mk"
###
### Support for a "fat" binary on i386, with CPU autodetection.
Update to version 4.2.2. Support DESTDIR installation. Add option to build a "fat" binary on (${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin"). This isn't enabled by default now, but it might be useful for build builds, as it uses cpuid at runtime to choose the most appropriate assembler code. Insofar as I can tell, no BUILDLINK_A[BP]I_DEPENDS bump is necessary. NOTE: Support for Darwin-*-i386 and Darwin-*-x86_64 has been improved, see below. Thus, I recommend that we test building the assembler code on Darwin at some point. Changes between GMP version 4.2.1 and 4.2.2: * License is now LGPL version 3. Bugs: * Shared library numbers corrected for libcxx. * Fixed serious bug in gmpxx.h where a=a+b*c would generate garbage. Note that this only affects C++ programs. * Fix crash in mpz_set_d for arguments with large negative exponent. * Fix 32-bit ABI bug with Itanium assembly for popcount and hamdist. * Fix assembly syntax problem for powerpc-ibm-aix with AIX native assembler. * Fix problems with x86 --enable-fat, where the compiler where told to generate code for the build machine, not plain i386 code as it should. * Improved recognition of powerpc systems wrt Altivec/VMX capability. * Misc minor fixes, mainly workarounds for compiler/assembler bugs. Speedups: * "Core 2" and Pentium 4 processors, running in 64-bit mode will get a slight boost as they are now specifically recognized. Features: * New support for x86_64-solaris * New, rudimentary support for x86-apple-darwin and x86_64-apple-darwin. (Please see http://gmplib.org/macos.html for more information.)
2007-10-30 02:36:59 +01:00
###
### XXX Currently, the 'mmx' and 'simd' options imply the same thing,
### as cpu detection is done at runtime. Is there a more elegant
### way to handle this?
###
. if empty(PKG_OPTIONS:Mgmp-fat) && \
(!empty(PKG_OPTIONS:Mmmx) || !empty(PKG_OPTIONS:Msimd))
PKG_OPTIONS+= gmp-fat
. endif
Update to version 4.2.2. Support DESTDIR installation. Add option to build a "fat" binary on (${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin"). This isn't enabled by default now, but it might be useful for build builds, as it uses cpuid at runtime to choose the most appropriate assembler code. Insofar as I can tell, no BUILDLINK_A[BP]I_DEPENDS bump is necessary. NOTE: Support for Darwin-*-i386 and Darwin-*-x86_64 has been improved, see below. Thus, I recommend that we test building the assembler code on Darwin at some point. Changes between GMP version 4.2.1 and 4.2.2: * License is now LGPL version 3. Bugs: * Shared library numbers corrected for libcxx. * Fixed serious bug in gmpxx.h where a=a+b*c would generate garbage. Note that this only affects C++ programs. * Fix crash in mpz_set_d for arguments with large negative exponent. * Fix 32-bit ABI bug with Itanium assembly for popcount and hamdist. * Fix assembly syntax problem for powerpc-ibm-aix with AIX native assembler. * Fix problems with x86 --enable-fat, where the compiler where told to generate code for the build machine, not plain i386 code as it should. * Improved recognition of powerpc systems wrt Altivec/VMX capability. * Misc minor fixes, mainly workarounds for compiler/assembler bugs. Speedups: * "Core 2" and Pentium 4 processors, running in 64-bit mode will get a slight boost as they are now specifically recognized. Features: * New support for x86_64-solaris * New, rudimentary support for x86-apple-darwin and x86_64-apple-darwin. (Please see http://gmplib.org/macos.html for more information.)
2007-10-30 02:36:59 +01:00
. if !empty(PKG_OPTIONS:Mgmp-fat)
CONFIGURE_ARGS+= --enable-fat
. endif
. endif
.endif
pre-configure:
gmp: updated to 6.2.0 Changes between GMP version 6.1.* and 6.2.0 BUGS FIXED * gmp_snprintf now correctly reports an error (returns -1) when snprintf does. * Conversion to double is now more robust even if the configuration process does not recognize the float format. * mpz_powm could return a not completely normalised value, when the exponent was 1 and the base < 0. * mpf_set_str could create invalid mpf_t variables for input strings with many leading zeros. FEATURES * New C++ functions factorial, primorial and fibonacci for mpz_class. * Functions to detect primality now substitute the first 24 Miller-Rabin iterations with the BPSW test. * Mini-GMP: new functions mpz_2fac_ui and mpz_mfac_uiui. * Mini-GMP: mpz_sizeinbase, mpz_get_str, and mpz_set_str now support bases up to 62. * Mini-GMP: added support for the mpq_t layer. * MIPS r6 cores are now supported. SPEEDUPS * Major speedup for AMD Ryzen and Epyc thanks to an extensive set of assembly code. * Major speedup for IBM POWER9 thanks to assembly code making use of new madd instruction. * Speedup for 64-bit ARM CPUs thanks to new/improved assembly code. * The n-over-k function mpz_bin_ui has been reimplemented for great speedups for large operands. * Speedup for the worst case of mpz_perfect_power_p. * Speedup for gcd for small and medium size operands. * Speedup for really huge multiplies thanks to much larger FFT tables. MISC * Internal representation of the mpz_t variables now supports lazy allocation; memory is allocated only when a value is stored. * Small improvements and better coverage for the test suite. * The tune/speed program can measure some more functions. * The low-level function mpn_mul no longer diverts to mpn_sqr, users should call mpn_sqr directly when applicable. * New installed files gmp.pc and gmpxx.pc, for use with pkg-config.
2020-01-20 22:25:24 +01:00
cd ${WRKSRC} && autoconf
.include "../../mk/bsd.pkg.mk"