]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix some issues with GSL for `make auxchecks'
authorAndreas Arnez <arnez@linux.ibm.com>
Wed, 9 Oct 2024 15:10:08 +0000 (17:10 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Wed, 9 Oct 2024 15:10:08 +0000 (17:10 +0200)
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.

auxprogs/gsl-1.6.patch

index a9ffd13c3316c06897bcc16070abd8147fa50709..cd3255d336a2011d79d62f46b3c21c0181688c05 100644 (file)
@@ -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"])
+ ])