https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=bbdd783268a56348f824e421ab1306077b2ae70a
commit bbdd783268a56348f824e421ab1306077b2ae70a
Author: Andreas Arnez <ar...@li...>
Date: Wed Oct 9 17:10:08 2024 +0200
Fix some issues with GSL for `make auxchecks'
When trying to reproduce Bug 423908, I ran into some trouble performing
`make auxchecks', due to problems in GSL:
Newer compilers complain about incompatible pointer types in argument
passing between
unsigned int *
and
size_t *
This affects the fifth argument of function gsl_eigen_jacobi() in
eigen/jacobi.c. Fix this by passing the right pointer type at invocation.
Also, the configure checks for IEEE comparisons and for IEEE denormalized
values don't work as intended, because they call exit() without declaring
it and thus fail independently from those features being supported. Fix
this by using `return' instead.
Diff:
---
auxprogs/gsl-1.6.patch | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/auxprogs/gsl-1.6.patch b/auxprogs/gsl-1.6.patch
index a9ffd13c33..cd3255d336 100644
--- a/auxprogs/gsl-1.6.patch
+++ b/auxprogs/gsl-1.6.patch
@@ -34,3 +34,35 @@ diff -r -u gsl-1.6/wavelet/dwt.c gsl-1.6-patched/wavelet/dwt.c
static int
binary_logn (const size_t n)
+diff -r -u gsl-1.6/eigen/jacobi.c gsl-1.6-patched/eigen/jacobi.c
+--- gsl-1.6/eigen/jacobi.c
++++ gsl-1.6-patched/eigen/jacobi.c
+@@ -215,7 +215,7 @@
+ {
+ const size_t n = a->size2;
+ size_t i,j,k;
+- size_t nrot = 0;
++ unsigned int nrot = 0;
+ int status;
+
+ gsl_vector * eval = gsl_vector_alloc(n);
+diff -r -u gsl-1.6/configure.ac gsl-1.6-patched/configure.ac
+--- gsl-1.6/configure.ac
++++ gsl-1.6-patched/configure.ac
+@@ -325,7 +325,7 @@
+ inf = exp(1.0e10);
+ nan = inf / inf ;
+ status = (nan == nan);
+- exit (status);
++ return status;
+ }]])],[ac_cv_c_ieee_comparisons="yes"],[ac_cv_c_ieee_comparisons="no"],[ac_cv_c_ieee_comparisons="yes"])
+ ])
+
+@@ -346,7 +346,7 @@
+ for (i = 0; i < 5; i++) { z = z / 10.0 ; };
+ for (i = 0; i < 5; i++) { z = z * 10.0 ; };
+ status = (z == 0.0);
+- exit (status);
++ return status;
+ }]])],[ac_cv_c_ieee_denormals="yes"],[ac_cv_c_ieee_denormals="no"],[ac_cv_c_ieee_denormals="yes"])
+ ])
|