Tuesday, August 01, 2023

devel/gmp: update to 6.3.0, needs testing

Here's an update to devel/gmp 6.3.0:
* New public function mpz_prevprime.
* New documented pointer types mpz_ptr, mpz_srcptr, and similar for
other GMP types.

I have successfully run the tests on
* amd64 with IBT (I successfully tried with -mno-retpoline, too)
* i386
* arm64 without BTI

Other archs could use testing, in particular
* arm64 with BTI: there were numerous assembly code changes
* sparc64: upstream assembly fix
* riscv64: assembly code changes


diff /usr/ports
commit - 380c03e636a66ea34ecb3e19703489ab05da0592
path + /usr/ports
blob - 3ebc8e2ff0239fa0e73c6676b0c9b67f2dfabaf0
file + devel/gmp/Makefile
--- devel/gmp/Makefile
+++ devel/gmp/Makefile
@@ -1,14 +1,13 @@
COMMENT-main= library for arbitrary precision arithmetic
COMMENT-cxx= C++ library for arbitrary precision arithmetic

-VERSION= 6.2.1
-REVISION= 2
+VERSION= 6.3.0
DISTNAME= gmp-${VERSION}
MULTI_PACKAGES= -main -cxx
PKGNAME-cxx= gmpxx-${VERSION}

-SHARED_LIBS += gmp 11.0 # 14.1
-SHARED_LIBS += gmpxx 3.0 # 10.1
+SHARED_LIBS += gmp 11.1 # 15.0
+SHARED_LIBS += gmpxx 3.0 # 11.0
CATEGORIES= devel math

HOMEPAGE= https://gmplib.org/
blob - d23ab1910434c013a46bcef8d1f5f7097982cad7
file + devel/gmp/distinfo
--- devel/gmp/distinfo
+++ devel/gmp/distinfo
@@ -1,2 +1,2 @@
-SHA256 (gmp-6.2.1.tar.xz) = /UgpkSzd0S+EGBw0Ucx1K+IkZD6H+sSXtp7d2txJtPI=
-SIZE (gmp-6.2.1.tar.xz) = 2027316
+SHA256 (gmp-6.3.0.tar.xz) = o8K4AgG4nmhhb0rTC8Zq7kknw85Q4zkpyoGdXENTiJg=
+SIZE (gmp-6.3.0.tar.xz) = 2094196
blob - 49f9b9987d821a150e24138ae08a48079b92b915
file + /dev/null
--- devel/gmp/patches/patch-mpn_asm-defs_m4
+++ /dev/null
@@ -1,23 +0,0 @@
-Fix libgmp.a on powerpc, which needs the PIC asm, because OpenBSD uses
-PIE position-independent executables. powerpc and powerpc64 define
-PIC_ALWAYS to `yes', but the quotes on `PIC_ALWAYS' broke the macro
-expansion. This fix prevents text relocation errors on powerpc when
-ld.lld links gdb >= 8 with libgmp.a.
-
-ld: error: can't create dynamic relocation R_PPC_ADDR16_HA against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
->>> defined in /usr/local/lib/libgmp.a(invert_limb.o)
->>> referenced by tmp-invert_limb.s
->>> invert_limb.o:(__gmpn_invert_limb) in archive /usr/local/lib/libgmp.a
-
-Index: mpn/asm-defs.m4
---- mpn/asm-defs.m4.orig
-+++ mpn/asm-defs.m4
-@@ -1051,7 +1051,7 @@ dnl Normally PIC is defined (or not) by libtool, but
- dnl systems which are always PIC. PIC_ALWAYS established in config.m4
- dnl identifies these for us.
-
--ifelse(`PIC_ALWAYS',`yes',`define(`PIC')')
-+ifelse(PIC_ALWAYS,`yes',`define(`PIC')')
-
-
- dnl Various possible defines passed from the Makefile that are to be tested
blob - 065e98059978c205035be82f85124b11329fdcc4
file + /dev/null
--- devel/gmp/patches/patch-mpn_sparc32_sparc-defs_m4
+++ /dev/null
@@ -1,20 +0,0 @@
-as(1) from binutils 2.17 does not support %gdop(). Partially revert
-https://gmplib.org/repo/gmp/rev/20cf1131dc94
-
-Index: mpn/sparc32/sparc-defs.m4
---- mpn/sparc32/sparc-defs.m4.orig
-+++ mpn/sparc32/sparc-defs.m4
-@@ -80,9 +80,10 @@ m4_assert_defined(`HAVE_GOTDATA')
- sethi %hi(_GLOBAL_OFFSET_TABLE_+4), %`$3'
- add %`$3', %lo(_GLOBAL_OFFSET_TABLE_+8), %`$3'
- add %`$2', %`$3', %`$3'
-- sethi %gdop_hix22(`$1'), %`$2'
-- xor %`$2', %gdop_lox10(`$1'), %`$2'
-- ldx [%`$3' + %`$2'], %`$2', %gdop(`$1')
-+ sethi %hi(`$1'), %`$2'
-+ or %`$2', %lo(`$1'), %`$2'
-+ ldx [%`$3' + %`$2'], %`$2'',`
-+ setx `$1', %`$3', %`$2'
- ',`
- sethi %h44(`$1'), %`$2'
- or %`$2', %m44(`$1'), %`$2'
--
Christian "naddy" Weisgerber naddy@mips.inka.de

No comments:

Post a Comment