pari: update to 2.15.2.
Also: - use -flto=auto for multithreaded link - change build so we don't need to patch makefile - ship pdf documentation in addtion to dvi - use SOURCE_DATE_EPOCH for dvi files - backport fix for pari bug 2441
This commit is contained in:
parent
ab89ca51f8
commit
e2d61a1b31
4 changed files with 27 additions and 94 deletions
17
srcpkgs/pari/patches/bug-2441.patch
Normal file
17
srcpkgs/pari/patches/bug-2441.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
Source: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?att=1;bug=2441;filename=patch;msg=25
|
||||
See: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2441
|
||||
|
||||
diff --git a/src/basemath/ellsea.c b/src/basemath/ellsea.c
|
||||
index a6871fa6a7..05f148eadd 100644
|
||||
--- a/src/basemath/ellsea.c
|
||||
+++ b/src/basemath/ellsea.c
|
||||
@@ -852,7 +852,8 @@ find_isogenous_from_Atkin(GEN a4, GEN a6, ulong ell, struct meqn *MEQN, GEN g, G
|
||||
GEN a4t, a6t, h;
|
||||
a4a6t(&a4t, &a6t, ell, E4t, E6t, T, p);
|
||||
h = find_kernel(a4, a6, ell, a4t, a6t, pp1, T, p, pp, e);
|
||||
- if (h) return gerepilecopy(ltop, mkvec3(a4t, a6t, h));
|
||||
+ if (h && signe(Fq_elldivpolmod(a4, a6, ell, h, T, pp))==0)
|
||||
+ return gerepilecopy(ltop, mkvec3(a4t, a6t, h));
|
||||
}
|
||||
}
|
||||
pari_err_BUG("find_isogenous_from_Atkin, kernel not found");
|
|
@ -1,48 +0,0 @@
|
|||
Author: Gonzalo Tornaría <tornaria@cmat.edu.uy>
|
||||
Date: Fri Oct 14 17:00:46 2022 -0300
|
||||
|
||||
Revert "x86 (32bit): force -mpc64 on compilers that supports it."
|
||||
|
||||
This reverts commit ca61b6391cf95ac8af15669236e2ec5839d2ad91.
|
||||
|
||||
|
||||
This causes problems with floating point precision on i686:
|
||||
```
|
||||
$ cat exp40.c
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
volatile int a=40; /* do not optimize away the call to exp(a) */
|
||||
printf("%f\n", exp(a));
|
||||
}
|
||||
$ cc -Wall exp40.c -lm && ./a.out
|
||||
235385266837020000.000000
|
||||
$ cc -Wall exp40.c -lm -mpc64 && ./a.out
|
||||
235385266837020448.000000
|
||||
```
|
||||
|
||||
Note that when pari is built using -mpc64, just *linking* with -lpari
|
||||
causes the problem!!!
|
||||
```
|
||||
$ cc -Wall exp40.c -lm -lpari && ./a.out
|
||||
235385266837020448.000000
|
||||
```
|
||||
|
||||
diff --git a/config/get_cc b/config/get_cc
|
||||
index 3cfaa88bb7..2d61d3871f 100644
|
||||
--- a/config/get_cc
|
||||
+++ b/config/get_cc
|
||||
@@ -110,13 +110,6 @@ if test -n "$__gnuc__"; then
|
||||
# Specific optimisations for some architectures
|
||||
case "$arch" in
|
||||
sparcv8*) cflags=-mv8;;
|
||||
- i?86)
|
||||
- cmd="$CC $CFLAGS $extraflag -mpc64 -fno-strict-aliasing -o $exe gnu.c"
|
||||
- . log_cmd
|
||||
- if test -s $exe; then
|
||||
- cflags="-mpc64"
|
||||
- fi
|
||||
- . cleanup_exe;;
|
||||
esac
|
||||
# problems on some architectures
|
||||
case "$osname" in
|
|
@ -1,36 +0,0 @@
|
|||
Add targets to main makefile:
|
||||
- gp-dyn
|
||||
- gp-sta
|
||||
- lib-dyn
|
||||
- lib-sta
|
||||
- install-lib-dyn
|
||||
- install-bin-dyn
|
||||
|
||||
Also: define a .NOTPARALLEL target so that top targets are not run in parallel.
|
||||
|
||||
Otherwise, running several targets with -j is broken.
|
||||
|
||||
Examples:
|
||||
|
||||
1. "make -j8 gp lib-sta lib-dyn" fails once in a while
|
||||
|
||||
2. "make -j8 doc docpdf" fails every time
|
||||
|
||||
With .NOTPARALLEL, both seem to work reliably.
|
||||
|
||||
Reference:
|
||||
https://www.gnu.org/software/make/manual/html_node/Special-Targets.html#Special-Targets
|
||||
|
||||
--- pari-2.13.2.orig/config/TOP_Make.SH 2020-10-26 09:43:04.000000000 -0300
|
||||
+++ pari-2.13.2/config/TOP_Make.SH 2021-08-14 15:28:04.052670019 -0300
|
||||
@@ -42,7 +42,9 @@
|
||||
@\$(MAKE) gp
|
||||
@-cd doc && \$(MAKE) doc
|
||||
+
|
||||
+.NOTPARALLEL:
|
||||
|
||||
-gp bench test-kernel test-all install cleanall cleanobj cleantest nsis link-data install-bin install-doc install-docpdf install-nodata install-data install-lib-sta install-bin-sta dobench dyntest-all statest-all tune $top_test_extra $top_dotest_extra::
|
||||
+gp gp-dyn gp-sta lib-dyn lib-sta bench test-kernel test-all install cleanall cleanobj cleantest nsis link-data install-bin install-doc install-docpdf install-nodata install-data install-lib-dyn install-lib-sta install-bin-dyn install-bin-sta dobench dyntest-all statest-all tune $top_test_extra $top_dotest_extra::
|
||||
@dir=\`config/objdir\`; echo "Making \$@ in \$\$dir";\\
|
||||
if test ! -d \$\$dir; then echo "Please run Configure first!"; exit 1; fi;\\
|
||||
cd \$\$dir && \$(MAKE) \$@
|
|
@ -1,14 +1,14 @@
|
|||
# Template file for 'pari'
|
||||
pkgname=pari
|
||||
version=2.15.1
|
||||
version=2.15.2
|
||||
revision=1
|
||||
build_style=configure
|
||||
build_helper=qemu
|
||||
configure_script=./Configure
|
||||
configure_args="--prefix=/usr $(vopt_if pthreads --mt=pthread) -s"
|
||||
make_build_target="gp lib-sta lib-dyn doc"
|
||||
configure_args="--prefix=/usr $(vopt_if pthreads --mt=pthread)"
|
||||
make_build_target="gp doc docpdf"
|
||||
make_check_target=statest-all
|
||||
make_install_target="install install-lib-sta install-lib-dyn"
|
||||
make_install_target="install install-bin-sta install-lib-sta install-docpdf"
|
||||
hostmakedepends="perl texlive"
|
||||
makedepends="gmp-devel readline-devel $(vopt_if x11 libX11-devel)"
|
||||
checkdepends="pari-elldata-small pari-galdata pari-galpol-small
|
||||
|
@ -19,19 +19,19 @@ license="GPL-2.0-or-later"
|
|||
homepage="https://pari.math.u-bordeaux.fr"
|
||||
changelog="https://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=pari.git;a=blob_plain;f=CHANGES;hb=refs/heads/pari-${version%.*}"
|
||||
distfiles="https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-${version}.tar.gz"
|
||||
checksum=45419db77c6685bee67e42e0ecb78e19ef562be7aafc637c8a41970f2e909e3d
|
||||
checksum=b04628111ee22876519a4b1cdafb32febaa34eafa24f9e81f58f8d057fbee0dd
|
||||
|
||||
build_options="x11 pthreads"
|
||||
build_options_default="x11 pthreads"
|
||||
desc_option_pthreads="Enable support for pthreads"
|
||||
|
||||
# reduce speed losses due to pthreads
|
||||
CFLAGS="-flto -fno-semantic-interposition"
|
||||
CFLAGS="-flto=auto -fno-semantic-interposition"
|
||||
|
||||
case $XBPS_TARGET_MACHINE in
|
||||
# avoid numerical noise caused by extended-precision of registers
|
||||
i686*) CFLAGS+=" -ffloat-store" ;;
|
||||
esac
|
||||
# force `etex` to use SOURCE_DATE_EPOCH when creating dvi files
|
||||
# See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897627
|
||||
export FORCE_SOURCE_DATE=1
|
||||
make_build_args="TEX=etex"
|
||||
|
||||
post_patch() {
|
||||
# sse2 is not available on all i686
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue