gmp: 6.2.1 -> 6.3.0

The highlight is loongarch64 support.

Changes: https://gmplib.org/gmp6.3
This commit is contained in:
Sergei Trofimovich 2023-08-02 22:13:33 +01:00
parent 0878b757bf
commit 23275b7891
2 changed files with 2 additions and 23 deletions

View File

@ -1,19 +0,0 @@
https://gmplib.org/repo/gmp-6.2/raw-rev/561a9c25298e
diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c
--- a/mpz/inp_raw.c Tue Dec 22 23:49:51 2020 +0100
+++ b/mpz/inp_raw.c Thu Oct 21 19:06:49 2021 +0200
@@ -88,8 +88,11 @@
abs_csize = ABS (csize);
+ if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
+ return 0; /* Bit size overflows */
+
/* round up to a multiple of limbs */
- abs_xsize = BITS_TO_LIMBS (abs_csize*8);
+ abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8);
if (abs_xsize != 0)
{

View File

@ -13,15 +13,13 @@ let inherit (lib) optional; in
let self = stdenv.mkDerivation rec {
pname = "gmp${lib.optionalString cxx "-with-cxx"}";
version = "6.2.1";
version = "6.3.0";
src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv
urls = [ "mirror://gnu/gmp/gmp-${version}.tar.bz2" "ftp://ftp.gmplib.org/pub/gmp-${version}/gmp-${version}.tar.bz2" ];
sha256 = "0z2ddfiwgi0xbf65z4fg4hqqzlhv0cc6hdcswf3c6n21xdmk5sga";
hash = "sha256-rCghGnz7YJuuLiyNYFjWbI/pZDT3QM9v4uR7AA0cIMs=";
};
patches = [ ./6.2.1-CVE-2021-43618.patch ];
#outputs TODO: split $cxx due to libstdc++ dependency
# maybe let ghc use a version with *.so shared with rest of nixpkgs and *.a added
# - see #5855 for related discussion