From 1800c4c417813a02fed35b5d9eb5b219ff163bd2 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Wed, 8 Jul 2026 00:37:24 +0530 Subject: [PATCH 01/48] Deregister and drop SciPy patches --- packages/scipy/meta.yaml | 7 - .../scipy/patches/0001-gemm_-no-const.patch | 90 --------- .../patches/0002-make-int-return-values.patch | 188 ------------------ .../scipy/patches/0003-Fix-gees-calls.patch | 38 ---- .../patches/0004-Remove-chla_transtype.patch | 27 --- .../0005-Set-wrapper-return-type-to-int.patch | 29 --- 6 files changed, 379 deletions(-) delete mode 100644 packages/scipy/patches/0001-gemm_-no-const.patch delete mode 100644 packages/scipy/patches/0002-make-int-return-values.patch delete mode 100644 packages/scipy/patches/0003-Fix-gees-calls.patch delete mode 100644 packages/scipy/patches/0004-Remove-chla_transtype.patch delete mode 100644 packages/scipy/patches/0005-Set-wrapper-return-type-to-int.patch diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml index f8956f4c..54846d0e 100644 --- a/packages/scipy/meta.yaml +++ b/packages/scipy/meta.yaml @@ -20,13 +20,6 @@ package: source: url: https://files.pythonhosted.org/packages/source/s/scipy/scipy-1.18.0.tar.gz sha256: 67b2ad2ad54c72ca6d04975a9b2df8c3638c34ddd5b28738e94fc2b57929d378 - - patches: - - patches/0001-gemm_-no-const.patch - - patches/0002-make-int-return-values.patch - - patches/0003-Fix-gees-calls.patch - - patches/0004-Remove-chla_transtype.patch - - patches/0005-Set-wrapper-return-type-to-int.patch build: vendor-sharedlib: true # NumPy 2.1 disabled visibility for symbols outside of extension modules diff --git a/packages/scipy/patches/0001-gemm_-no-const.patch b/packages/scipy/patches/0001-gemm_-no-const.patch deleted file mode 100644 index a8774d4e..00000000 --- a/packages/scipy/patches/0001-gemm_-no-const.patch +++ /dev/null @@ -1,90 +0,0 @@ -From d41e995faadb51e130253b2b1bc2dffbfae1cf87 Mon Sep 17 00:00:00 2001 -From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> -Date: Tue, 26 May 2026 08:58:01 +0530 -Subject: [PATCH 1/6] Remove const from xgemm_ declarations in SuperLU headers - -cgemm_, dgemm_, sgemm_, and zgemm_ are declared with `const` qualifiers -in slu_*defs.h, but the OpenBLAS library used by Pyodide declares them -without const, causing compile errors due to signature mismatches. -This patch drops the consts and fixes the problem. - -Co-Authored-By: Hood Chatham -Co-Authored-By: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> ---- - scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_cdefs.h | 6 +++--- - scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_ddefs.h | 6 +++--- - scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_sdefs.h | 6 +++--- - scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_zdefs.h | 6 +++--- - 4 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_cdefs.h b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_cdefs.h -index 2c25c81d89..351791abb5 100644 ---- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_cdefs.h -+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_cdefs.h -@@ -266,9 +266,9 @@ extern void ccheck_tempv(int, singlecomplex *); - - extern void ccopy_(slu_blasint *, singlecomplex *, slu_blasint *, singlecomplex *, slu_blasint *); - extern void caxpy_(slu_blasint *, singlecomplex *, singlecomplex *, slu_blasint *, singlecomplex *, slu_blasint *); --extern void cgemm_(const char*, const char*, const slu_blasint*, const slu_blasint*, const slu_blasint*, -- const singlecomplex*, const singlecomplex*, const slu_blasint*, const singlecomplex*, -- const slu_blasint*, const singlecomplex*, singlecomplex*, const slu_blasint*); -+extern void cgemm_( char*, char*, slu_blasint*, slu_blasint*, slu_blasint*, -+ singlecomplex*, singlecomplex*, slu_blasint*, singlecomplex*, -+ slu_blasint*, singlecomplex*, singlecomplex*, slu_blasint*); - extern void ctrsv_(char*, char*, char*, slu_blasint*, singlecomplex*, slu_blasint*, - singlecomplex*, slu_blasint*); - extern void ctrsm_(char*, char*, char*, char*, slu_blasint*, slu_blasint*, -diff --git a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_ddefs.h b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_ddefs.h -index 27762382c9..484dda8a0d 100644 ---- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_ddefs.h -+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_ddefs.h -@@ -263,9 +263,9 @@ extern void dcheck_tempv(int, double *); - - extern void dcopy_(slu_blasint *, double *, slu_blasint *, double *, slu_blasint *); - extern void daxpy_(slu_blasint *, double *, double *, slu_blasint *, double *, slu_blasint *); --extern void dgemm_(const char*, const char*, const slu_blasint*, const slu_blasint*, const slu_blasint*, -- const double*, const double*, const slu_blasint*, const double*, -- const slu_blasint*, const double*, double*, const slu_blasint*); -+extern void dgemm_( char*, char*, slu_blasint*, slu_blasint*, slu_blasint*, -+ double*, double*, slu_blasint*, double*, -+ slu_blasint*, double*, double*, slu_blasint*); - extern void dtrsv_(char*, char*, char*, slu_blasint*, double*, slu_blasint*, - double*, slu_blasint*); - extern void dtrsm_(char*, char*, char*, char*, slu_blasint*, slu_blasint*, -diff --git a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_sdefs.h b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_sdefs.h -index e0d5c6c612..caef9c674c 100644 ---- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_sdefs.h -+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_sdefs.h -@@ -263,9 +263,9 @@ extern void scheck_tempv(int, float *); - - extern void scopy_(slu_blasint *, float *, slu_blasint *, float *, slu_blasint *); - extern void saxpy_(slu_blasint *, float *, float *, slu_blasint *, float *, slu_blasint *); --extern void sgemm_(const char*, const char*, const slu_blasint*, const slu_blasint*, const slu_blasint*, -- const float*, const float*, const slu_blasint*, const float*, -- const slu_blasint*, const float*, float*, const slu_blasint*); -+extern void sgemm_( char*, char*, slu_blasint*, slu_blasint*, slu_blasint*, -+ float*, float*, slu_blasint*, float*, -+ slu_blasint*, float*, float*, slu_blasint*); - extern void strsv_(char*, char*, char*, slu_blasint*, float*, slu_blasint*, - float*, slu_blasint*); - extern void strsm_(char*, char*, char*, char*, slu_blasint*, slu_blasint*, -diff --git a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_zdefs.h b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_zdefs.h -index cb65506594..a7139f73da 100644 ---- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_zdefs.h -+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_zdefs.h -@@ -266,9 +266,9 @@ extern void zcheck_tempv(int, doublecomplex *); - - extern void zcopy_(slu_blasint *, doublecomplex *, slu_blasint *, doublecomplex *, slu_blasint *); - extern void zaxpy_(slu_blasint *, doublecomplex *, doublecomplex *, slu_blasint *, doublecomplex *, slu_blasint *); --extern void zgemm_(const char*, const char*, const slu_blasint*, const slu_blasint*, const slu_blasint*, -- const doublecomplex*, const doublecomplex*, const slu_blasint*, const doublecomplex*, -- const slu_blasint*, const doublecomplex*, doublecomplex*, const slu_blasint*); -+extern void zgemm_( char*, char*, slu_blasint*, slu_blasint*, slu_blasint*, -+ doublecomplex*, doublecomplex*, slu_blasint*, doublecomplex*, -+ slu_blasint*, doublecomplex*, doublecomplex*, slu_blasint*); - extern void ztrsv_(char*, char*, char*, slu_blasint*, doublecomplex*, slu_blasint*, - doublecomplex*, slu_blasint*); - extern void ztrsm_(char*, char*, char*, char*, slu_blasint*, slu_blasint*, --- -2.50.1 (Apple Git-155) - diff --git a/packages/scipy/patches/0002-make-int-return-values.patch b/packages/scipy/patches/0002-make-int-return-values.patch deleted file mode 100644 index 4782490f..00000000 --- a/packages/scipy/patches/0002-make-int-return-values.patch +++ /dev/null @@ -1,188 +0,0 @@ -From ad830e6289e8aeec1b06367770ec6708ebe67448 Mon Sep 17 00:00:00 2001 -From: Joe Marshall -Date: Wed, 6 Apr 2022 21:25:13 -0700 -Subject: [PATCH 2/6] BUG: Fix void return types and declarations - -The return values of f2c functions are insignificant in most cases, so often it -is treated as returning void, when it really should return int (values are -"returned" by writing to pointers passed as an argument, but an obscure feature -known as alternative returns can cause the return value to be significant). - -emscripten is very strict about void vs int returns and function signatures, so -we change everything to return int from subroutines, and signatures are altered -to be consistent. the BLAS/Fortran wrapper declarations are changed to return int -instead of void to match f2ced OpenBLAS ABI. - -f2py is patched in numpy to make subroutines return int. - -Co-Authored-By: Joe Marshall -Co-Authored-By: Hood Chatham -Co-Authored-By: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> ---- - scipy/_build_utils/src/wrap_g77_abi.c | 16 ++++++++-------- - scipy/odr/__odrpack.c | 2 +- - .../linalg/_dsolve/SuperLU/SRC/ilu_cdrop_row.c | 8 ++++---- - .../_dsolve/SuperLU/SRC/ilu_scopy_to_ucol.c | 2 +- - scipy/sparse/linalg/_dsolve/SuperLU/SRC/sgssvx.c | 7 ++++--- - scipy/sparse/linalg/_dsolve/_superlu_utils.c | 4 ++-- - 6 files changed, 20 insertions(+), 19 deletions(-) - -diff --git a/scipy/_build_utils/src/wrap_g77_abi.c b/scipy/_build_utils/src/wrap_g77_abi.c -index 3110d6996f..36ceeffb12 100644 ---- a/scipy/_build_utils/src/wrap_g77_abi.c -+++ b/scipy/_build_utils/src/wrap_g77_abi.c -@@ -83,7 +83,7 @@ double_complex F_FUNC(wzdotu,WZDOTU)(CBLAS_INT *n, double_complex *zx, \ - return ret; - } - --void BLAS_FUNC(sladiv)(float *xr, float *xi, float *yr, float *yi, \ -+int BLAS_FUNC(sladiv)(float *xr, float *xi, float *yr, float *yi, \ - float *retr, float *reti); - float_complex F_FUNC(wcladiv,WCLADIV)(float_complex *x, float_complex *y){ - float_complex ret; -@@ -95,7 +95,7 @@ float_complex F_FUNC(wcladiv,WCLADIV)(float_complex *x, float_complex *y){ - return ret; - } - --void BLAS_FUNC(dladiv)(double *xr, double *xi, double *yr, double *yi, \ -+int BLAS_FUNC(dladiv)(double *xr, double *xi, double *yr, double *yi, \ - double *retr, double *reti); - double_complex F_FUNC(wzladiv,WZLADIV)(double_complex *x, double_complex *y){ - double_complex ret; -@@ -107,31 +107,31 @@ double_complex F_FUNC(wzladiv,WZLADIV)(double_complex *x, double_complex *y){ - return ret; - } - --void F_FUNC(cdotcwrp,WCDOTCWRP)(float_complex *ret, CBLAS_INT *n, float_complex *cx, \ -+int F_FUNC(cdotcwrp,WCDOTCWRP)(float_complex *ret, CBLAS_INT *n, float_complex *cx, \ - CBLAS_INT *incx, float_complex *cy, CBLAS_INT *incy){ - *ret = F_FUNC(wcdotc,WCDOTC)(n, cx, incx, cy, incy); - } - --void F_FUNC(zdotcwrp,WZDOTCWRP)(double_complex *ret, CBLAS_INT *n, double_complex *zx, \ -+int F_FUNC(zdotcwrp,WZDOTCWRP)(double_complex *ret, CBLAS_INT *n, double_complex *zx, \ - CBLAS_INT *incx, double_complex *zy, CBLAS_INT *incy){ - *ret = F_FUNC(wzdotc,WZDOTC)(n, zx, incx, zy, incy); - } - --void F_FUNC(cdotuwrp,CDOTUWRP)(float_complex *ret, CBLAS_INT *n, float_complex *cx, \ -+int F_FUNC(cdotuwrp,CDOTUWRP)(float_complex *ret, CBLAS_INT *n, float_complex *cx, \ - CBLAS_INT *incx, float_complex *cy, CBLAS_INT *incy){ - *ret = F_FUNC(wcdotu,WCDOTU)(n, cx, incx, cy, incy); - } - --void F_FUNC(zdotuwrp,ZDOTUWRP)(double_complex *ret, CBLAS_INT *n, double_complex *zx, \ -+int F_FUNC(zdotuwrp,ZDOTUWRP)(double_complex *ret, CBLAS_INT *n, double_complex *zx, \ - CBLAS_INT *incx, double_complex *zy, CBLAS_INT *incy){ - *ret = F_FUNC(wzdotu,WZDOTU)(n, zx, incx, zy, incy); - } - --void F_FUNC(cladivwrp,CLADIVWRP)(float_complex *ret, float_complex *x, float_complex *y){ -+int F_FUNC(cladivwrp,CLADIVWRP)(float_complex *ret, float_complex *x, float_complex *y){ - *ret = F_FUNC(wcladiv,WCLADIV)(x, y); - } - --void F_FUNC(zladivwrp,ZLADIVWRP)(double_complex *ret, double_complex *x, double_complex *y){ -+int F_FUNC(zladivwrp,ZLADIVWRP)(double_complex *ret, double_complex *x, double_complex *y){ - *ret = F_FUNC(wzladiv,WZLADIV)(x, y); - } - -diff --git a/scipy/odr/__odrpack.c b/scipy/odr/__odrpack.c -index f86a65fdf6..e6133f82e3 100644 ---- a/scipy/odr/__odrpack.c -+++ b/scipy/odr/__odrpack.c -@@ -13,7 +13,7 @@ - #include "odrpack.h" - - --void F_FUNC(dodrc,DODRC)(void (*fcn)(F_INT *n, F_INT *m, F_INT *np, F_INT *nq, F_INT *ldn, F_INT *ldm, -+void F_FUNC(dodrc,DODRC)(int (*fcn)(F_INT *n, F_INT *m, F_INT *np, F_INT *nq, F_INT *ldn, F_INT *ldm, - F_INT *ldnp, double *beta, double *xplusd, F_INT *ifixb, F_INT *ifixx, - F_INT *ldifx, F_INT *ideval, double *f, double *fjacb, double *fjacd, - F_INT *istop), -diff --git a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/ilu_cdrop_row.c b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/ilu_cdrop_row.c -index 823defad20..971bca2eed 100644 ---- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/ilu_cdrop_row.c -+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/ilu_cdrop_row.c -@@ -23,10 +23,10 @@ at the top-level directory. - #include - #include "slu_cdefs.h" - --extern void cswap_(slu_blasint *, singlecomplex [], slu_blasint *, singlecomplex [], slu_blasint *); --extern void caxpy_(slu_blasint *, singlecomplex *, singlecomplex [], slu_blasint *, singlecomplex [], slu_blasint *); --extern void ccopy_(slu_blasint *, singlecomplex [], slu_blasint *, singlecomplex [], slu_blasint *); --extern void scopy_(slu_blasint *, float [], slu_blasint *, float [], slu_blasint *); -+extern int cswap_(slu_blasint *, singlecomplex [], slu_blasint *, singlecomplex [], slu_blasint *); -+extern int caxpy_(slu_blasint *, singlecomplex *, singlecomplex [], slu_blasint *, singlecomplex [], slu_blasint *); -+extern int ccopy_(slu_blasint *, singlecomplex [], slu_blasint *, singlecomplex [], slu_blasint *); -+extern int scopy_(slu_blasint *, float [], slu_blasint *, float [], slu_blasint *); - extern float scasum_(slu_blasint *, singlecomplex *, slu_blasint *); - extern float scnrm2_(slu_blasint *, singlecomplex *, slu_blasint *); - extern double dnrm2_(slu_blasint *, double [], slu_blasint *); -diff --git a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/ilu_scopy_to_ucol.c b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/ilu_scopy_to_ucol.c -index fbae396c6e..11149cf98a 100644 ---- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/ilu_scopy_to_ucol.c -+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/ilu_scopy_to_ucol.c -@@ -26,7 +26,7 @@ at the top-level directory. - int num_drop_U; - #endif - --extern void scopy_(slu_blasint *, float [], slu_blasint *, float [], slu_blasint *); -+extern int scopy_(slu_blasint *, float [], slu_blasint *, float [], slu_blasint *); - - #if 0 - static float *A; /* used in _compare_ only */ -diff --git a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/sgssvx.c b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/sgssvx.c -index e36db6e6a4..9d1264e0cc 100644 ---- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/sgssvx.c -+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/sgssvx.c -@@ -22,6 +22,8 @@ at the top-level directory. - */ - #include "slu_sdefs.h" - -+extern float slangs(char *, SuperMatrix *); -+ - /*! \brief - * - *
-@@ -377,8 +379,6 @@ sgssvx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
-     double    t0;      /* temporary time */
-     double    *utime;
- 
--    /* External functions */
--    extern float slangs(char *, SuperMatrix *);
- 
-     Bstore = B->Store;
-     Xstore = X->Store;
-@@ -573,7 +573,8 @@ printf("dgssvx: Fact=%4d, Trans=%4d, equed=%c\n",
-         } else {
- 	    *(unsigned char *)norm = 'I';
-         }
--        anorm = slangs(norm, AA);
-+        anorm = slangs(norm, AA);    /* External functions */
-+        extern float slangs(char *, SuperMatrix *);
-         sgscon(norm, L, U, anorm, rcond, stat, &info1);
-         utime[RCOND] = SuperLU_timer_() - t0;
-     }
-diff --git a/scipy/sparse/linalg/_dsolve/_superlu_utils.c b/scipy/sparse/linalg/_dsolve/_superlu_utils.c
-index ea7e1bc701..ee696fa2c9 100644
---- a/scipy/sparse/linalg/_dsolve/_superlu_utils.c
-+++ b/scipy/sparse/linalg/_dsolve/_superlu_utils.c
-@@ -237,12 +237,12 @@ int input_error(char *srname, int *info)
-  * Stubs for Harwell Subroutine Library functions that SuperLU tries to call.
-  */
- 
--void mc64id_(int *a)
-+int mc64id_(int *a)
- {
-     superlu_python_module_abort("chosen functionality not available");
- }
- 
--void mc64ad_(int *a, int *b, int *c, int d[], int e[], double f[],
-+int mc64ad_(int *a, int *b, int *c, int d[], int e[], double f[],
- 	     int *g, int h[], int *i, int j[], int *k, double l[],
- 	     int m[], int n[])
- {
--- 
-2.50.1 (Apple Git-155)
-
diff --git a/packages/scipy/patches/0003-Fix-gees-calls.patch b/packages/scipy/patches/0003-Fix-gees-calls.patch
deleted file mode 100644
index ced565b5..00000000
--- a/packages/scipy/patches/0003-Fix-gees-calls.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 8addc1da35bc63df651946ef14c723797a431e0c Mon Sep 17 00:00:00 2001
-From: Hood Chatham 
-Date: Mon, 26 Jun 2023 20:12:25 -0700
-Subject: [PATCH 3/6] Fix gees calls
-
----
- scipy/linalg/flapack_gen.pyf.src | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/scipy/linalg/flapack_gen.pyf.src b/scipy/linalg/flapack_gen.pyf.src
-index 04037fdca..3686cea86 100644
---- a/scipy/linalg/flapack_gen.pyf.src
-+++ b/scipy/linalg/flapack_gen.pyf.src
-@@ -1196,8 +1196,8 @@ subroutine gees(compute_v,sort_t,select,n,a,nrows,sdim,w,vs,
-     !  A = Z * T * Z^H  -- a complex matrix is in Schur form if it is upper
-     !  triangular
- 
--    callstatement (*f2py_func)((compute_v?"V":"N"),(sort_t?"S":"N"),cb_select_in_gees__user__routines,&n,a,&nrows,&sdim,w,vs,&ldvs,work,&lwork,rwork,bwork,&info,1,1)
--    callprotoargument char*,char*,F_INT(*)(*),F_INT*,*,F_INT*,F_INT*,*,*,F_INT*,*,F_INT*,*,F_INT*,F_INT*,F_INT,F_INT
-+    callstatement (*f2py_func)((compute_v?"V":"N"),(sort_t?"S":"N"),cb_select_in_gees__user__routines,&n,a,&nrows,&sdim,w,vs,&ldvs,work,&lwork,rwork,bwork,&info)
-+    callprotoargument char*,char*,F_INT(*)(*),F_INT*,*,F_INT*,F_INT*,*,*,F_INT*,*,F_INT*,*,F_INT*,F_INT*
- 
-     use gees__user__routines
- 
-@@ -1226,8 +1226,8 @@ subroutine gees(compute_v,sort_t,select,n,a,nrows,sdim,wr,wi,v
-     !  A = Z * T * Z^H  -- a real matrix is in Schur form if it is upper quasi-
-     !  triangular with 1x1 and 2x2 blocks.
- 
--    callstatement (*f2py_func)((compute_v?"V":"N"),(sort_t?"S":"N"),cb_select_in_gees__user__routines,&n,a,&nrows,&sdim,wr,wi,vs,&ldvs,work,&lwork,bwork,&info,1,1)
--    callprotoargument char*,char*,F_INT(*)(*,*),F_INT*,*,F_INT*,F_INT*,*,*,*,F_INT*,*,F_INT*,F_INT*,F_INT*,F_INT,F_INT
-+    callstatement (*f2py_func)((compute_v?"V":"N"),(sort_t?"S":"N"),cb_select_in_gees__user__routines,&n,a,&nrows,&sdim,wr,wi,vs,&ldvs,work,&lwork,bwork,&info)
-+    callprotoargument char*,char*,F_INT(*)(*,*),F_INT*,*,F_INT*,F_INT*,*,*,*,F_INT*,*,F_INT*,F_INT*,F_INT*
- 
-     use gees__user__routines
- 
--- 
-2.34.1
-
diff --git a/packages/scipy/patches/0004-Remove-chla_transtype.patch b/packages/scipy/patches/0004-Remove-chla_transtype.patch
deleted file mode 100644
index 12da53e1..00000000
--- a/packages/scipy/patches/0004-Remove-chla_transtype.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 848c94e218e89d866978fbc883cbb2d919f56ce9 Mon Sep 17 00:00:00 2001
-From: Hood Chatham 
-Date: Wed, 31 Jul 2024 10:29:47 +0200
-Subject: [PATCH 4/6] Remove chla_transtype
-
-The signature should probably be `int chla_transtype(char* res, int *trans)`.
-This just deletes it entirely due to laziness.
-
----
- scipy/linalg/cython_lapack_signatures.txt | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/scipy/linalg/cython_lapack_signatures.txt b/scipy/linalg/cython_lapack_signatures.txt
-index 5aa59d96ea..afdc9480f1 100644
---- a/scipy/linalg/cython_lapack_signatures.txt
-+++ b/scipy/linalg/cython_lapack_signatures.txt
-@@ -111,7 +111,6 @@ void chetrs(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int
- void chetrs2(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *info)
- void chfrk(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, c *a, int *lda, s *beta, c *c)
- void chgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *t, int *ldt, c *alpha, c *beta, c *q, int *ldq, c *z, int *ldz, c *work, int *lwork, s *rwork, int *info)
--char chla_transtype(int *trans)
- void chpcon(char *uplo, int *n, c *ap, int *ipiv, s *anorm, s *rcond, c *work, int *info)
- void chpev(char *jobz, char *uplo, int *n, c *ap, s *w, c *z, int *ldz, c *work, s *rwork, int *info)
- void chpevd(char *jobz, char *uplo, int *n, c *ap, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info)
--- 
-2.39.3 (Apple Git-146)
-
diff --git a/packages/scipy/patches/0005-Set-wrapper-return-type-to-int.patch b/packages/scipy/patches/0005-Set-wrapper-return-type-to-int.patch
deleted file mode 100644
index 0c78a0a3..00000000
--- a/packages/scipy/patches/0005-Set-wrapper-return-type-to-int.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 111e290fde8c6faa16d28696b23005f10e58edc6 Mon Sep 17 00:00:00 2001
-From: Hood Chatham 
-Date: Tue, 26 May 2026 09:22:00 +0530
-Subject: [PATCH 5/6] Set wrapper return type to int in _generate_pyx.py
-
-Set the C declaration return type for WRAPPED_FUNCS (complex-return BLAS
-wrappers) to int instead of void to match ABI used by our OpenBLAS.
-
-Co-Authored-By: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
----
- scipy/linalg/_generate_pyx.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scipy/linalg/_generate_pyx.py b/scipy/linalg/_generate_pyx.py
-index 0fac032040..4a4de92bd4 100644
---- a/scipy/linalg/_generate_pyx.py
-+++ b/scipy/linalg/_generate_pyx.py
-@@ -689,7 +689,7 @@ def generate_decl_c(name, return_type, argnames, argtypes, accelerate,
-     if name in WRAPPED_FUNCS:
-         argnames = ['out'] + argnames
-         c_argtypes = [c_return_type] + c_argtypes
--        c_return_type = 'void'
-+        c_return_type = 'int'
-     blas_macro, blas_name = get_blas_macro_and_name(name, accelerate, ilp64)
-     c_args = ', '.join(f'{t} *{n}' for t, n in zip(c_argtypes, argnames))
-     return f"{c_return_type} {blas_macro}({blas_name})({c_args});\n"
--- 
-2.50.1 (Apple Git-155)
-

From 9781e96f0b3b170edac11d3e7da7bff079216a7c Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 00:38:36 +0530
Subject: [PATCH 02/48] Drop f2c binary WASM compilation

---
 packages/scipy/meta.yaml | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index 54846d0e..bb734a50 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -58,11 +58,6 @@ build:
   # pyodide-build/pyodide_build/_f2c_fixes.py.
   script: |
     set -x
-    git clone https://github.com/hoodmane/f2c.git --depth 1
-    (cd f2c/src && cp makefile.u makefile && sed -i "s/gram.c:/gram.c1:/" makefile && make)
-    export F2C_PATH=$(pwd)/f2c/src/f2c
-
-    echo F2C_PATH: $F2C_PATH
     export NPY_BLAS_LIBS="-I$WASM_LIBRARY_DIR/include $WASM_LIBRARY_DIR/lib/libopenblas.so"
     export NPY_LAPACK_LIBS="-I$WASM_LIBRARY_DIR/include $WASM_LIBRARY_DIR/lib/libopenblas.so"
 

From 62b0fd80fc2e9ea96a5670743f2a0567ca158373 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 00:38:52 +0530
Subject: [PATCH 03/48] Remove comment about f2c fixes

---
 packages/scipy/meta.yaml | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index bb734a50..e95eca0a 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -50,12 +50,6 @@ build:
   # Disable when running tests, enable when a PR is ready, i.e., building for distribution.
   backend-flags: |
     build-dir=build
-
-  # IMPORTANT: Other locations important in scipy build process:
-  # There are two files built in the "capture" pass that need patching:
-  #    _blas_subroutines.h, and _cython
-  # Scipy has a bunch of custom logic implemented in
-  # pyodide-build/pyodide_build/_f2c_fixes.py.
   script: |
     set -x
     export NPY_BLAS_LIBS="-I$WASM_LIBRARY_DIR/include $WASM_LIBRARY_DIR/lib/libopenblas.so"

From d0692e0cb20c74c92998f67f66fd4f1f53a1fb67 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 00:39:10 +0530
Subject: [PATCH 04/48] gfortran shouldn't be needed as an executable

---
 packages/scipy/meta.yaml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index e95eca0a..bc6570b4 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -119,8 +119,6 @@ requirements:
     - libboost
   run:
     - numpy
-  executable:
-    - gfortran
   constraint:
     # Getting: Error: Dynamic linking error: cannot resolve symbol pow_di
     - meson < 1.10

From eccae9e1eac49e0a1c253e417a41e5758a0fb588 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 00:40:15 +0530
Subject: [PATCH 05/48] Use `_without-fortran` Meson option

---
 packages/scipy/meta.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index bc6570b4..094d24c9 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -50,6 +50,7 @@ build:
   # Disable when running tests, enable when a PR is ready, i.e., building for distribution.
   backend-flags: |
     build-dir=build
+    setup-args=-D_without-fortran=true
   script: |
     set -x
     export NPY_BLAS_LIBS="-I$WASM_LIBRARY_DIR/include $WASM_LIBRARY_DIR/lib/libopenblas.so"

From 20c5ba263ea170bcdbe74f74b57f54e75ede4998 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 00:40:35 +0530
Subject: [PATCH 06/48] Remove test `scipy.odr` import

---
 packages/scipy/meta.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index 094d24c9..de8b2c32 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -146,7 +146,6 @@ test:
     - scipy.linalg.interpolative
     - scipy.misc
     - scipy.ndimage
-    - scipy.odr
     - scipy.optimize
     - scipy.signal
     - scipy.signal.windows

From 45872960a65bfe5564c75ed6db8a59072a597b05 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 00:43:06 +0530
Subject: [PATCH 07/48] Add recipe for semicolon-lapack + patches

---
 packages/libsemilapack/meta.yaml | 44 ++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 packages/libsemilapack/meta.yaml

diff --git a/packages/libsemilapack/meta.yaml b/packages/libsemilapack/meta.yaml
new file mode 100644
index 00000000..fb8e9102
--- /dev/null
+++ b/packages/libsemilapack/meta.yaml
@@ -0,0 +1,44 @@
+package:
+  name: libsemilapack
+  version: "0.01.2-pre"
+  tag:
+    - library
+    - shared_library
+source:
+  url: https://github.com/ilayn/semicolon-lapack/archive/refs/tags/v0.01.2-pre.tar.gz
+  sha256: 447f49d333fadf0168a51976865c3d702bef0826e6c72cf29dd14ee8c9f903ef
+
+build:
+  type: shared_library
+  script: |
+    # wasm-ld cannot build shared libraries through Meson, so the Fortran-ABI
+    # shim must be a plain (static) library on Emscripten.
+    sed -i 's/shared_library(/library(/' src/fortran_shim/meson.build
+
+    CROSS=$(python -c 'import pyodide_build, os; print(os.path.join(os.path.dirname(pyodide_build.__file__), "tools", "emscripten.meson.cross"))')
+    export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"
+
+    CC=emcc CXX=em++ AR=emar \
+    meson setup builddir --cross-file "$CROSS" \
+      -Dblas=blis \
+      -Dfabi_shim=true \
+      -Dtests=false \
+      --default-library=static \
+      --prefix="${WASM_LIBRARY_DIR}"
+    ninja -C builddir
+    ninja -C builddir install
+
+    mkdir -p dist
+    emcc ${WASM_LIBRARY_DIR}/lib/libsemilapack.a \
+        ${WASM_LIBRARY_DIR}/lib/libsemilapack_fortran.a \
+        ${SIDE_MODULE_LDFLAGS} \
+        -o dist/libsemilapack.so
+
+    cp dist/libsemilapack.so ${WASM_LIBRARY_DIR}/lib/libsemilapack.so
+requirements:
+  host:
+    - libblis
+about:
+  home: https://github.com/ilayn/semicolon-lapack
+  license: BSD-3-Clause
+  summary: LAPACK linear algebra routines implemented in C

From 2b292027431236db7ec3fd4ccb4c1c5ed2eb64d3 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 00:43:44 +0530
Subject: [PATCH 08/48] Use BLIS and libsemilapack for SciPy

---
 packages/scipy/meta.yaml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index de8b2c32..8bda94fb 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -51,6 +51,8 @@ build:
   backend-flags: |
     build-dir=build
     setup-args=-D_without-fortran=true
+    setup-args=-Dblas=blis
+    setup-args=-Dlapack=semilapack
   script: |
     set -x
     export NPY_BLAS_LIBS="-I$WASM_LIBRARY_DIR/include $WASM_LIBRARY_DIR/lib/libopenblas.so"
@@ -99,6 +101,7 @@ build:
 
     # Input error causes "duplicate symbol" linker errors. Empty out the file.
     echo "" > scipy/sparse/linalg/_dsolve/SuperLU/SRC/input_error.c
+    export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"
 
     # https://github.com/mesonbuild/meson/blob/e542901af6e30865715d3c3c18f703910a096ec0/mesonbuild/backend/ninjabackend.py#L94
     # Prevent from using response file. The response file that meson generates is not compatible to pyodide-build
@@ -116,7 +119,8 @@ build:
 requirements:
   host:
     - numpy
-    - libopenblas
+    - libblis
+    - libsemilapack
     - libboost
   run:
     - numpy

From c086628a41df9c504b66fe7f2d855e954730775a Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 00:44:13 +0530
Subject: [PATCH 09/48] Drop all old SciPy sed commands

---
 packages/scipy/meta.yaml | 46 ----------------------------------------
 1 file changed, 46 deletions(-)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index 8bda94fb..64fa7b4c 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -55,52 +55,6 @@ build:
     setup-args=-Dlapack=semilapack
   script: |
     set -x
-    export NPY_BLAS_LIBS="-I$WASM_LIBRARY_DIR/include $WASM_LIBRARY_DIR/lib/libopenblas.so"
-    export NPY_LAPACK_LIBS="-I$WASM_LIBRARY_DIR/include $WASM_LIBRARY_DIR/lib/libopenblas.so"
-
-    sed -i 's/void DQA/int DQA/g' scipy/integrate/__quadpack.h
-
-    # Change many functions that return void into functions that return int
-    find scipy -name "*.c*" -type f | xargs sed -i 's/extern void F_FUNC/extern int F_FUNC/g'
-
-    sed -i 's/void F_FUNC/int F_FUNC/g' scipy/odr/__odrpack.c
-    sed -i 's/^void/int/g' scipy/odr/odrpack.h
-    sed -i 's/^void/int/g' scipy/odr/__odrpack.c
-
-    # sed -i 's/void F_FUNC/int F_FUNC/g' scipy/linalg/_lapack_subroutines.h
-    sed -i 's/void/int/g' scipy/linalg/cython_blas_signatures.txt
-    sed -i 's/void/int/g' scipy/linalg/cython_lapack_signatures.txt
-    sed -i 's/void BLAS_FUNC/int BLAS_FUNC/g' scipy/linalg/src/_common_array_utils.h
-    sed -i 's/^void BLAS_FUNC/int BLAS_FUNC/g' scipy/linalg/src/_common_array_utils.hh
-
-    # Change fortran functions called in C code to return int instead of void
-    # This adhoc regex checks function names ending with _ such as `void zgetrs_(`
-    sed -i 's/void BLAS_FUNC/int BLAS_FUNC/g' scipy/sparse/linalg/_propack/PROPACK/src/include/blaslapack_declarations.h
-    sed -i 's/void ARNAUD_BLAS/int ARNAUD_BLAS/g' scipy/sparse/linalg/_eigen/arpack/arnaud/src/blaslapack_declarations.h
-    sed -i 's/void BLAS_FUNC/int BLAS_FUNC/g' scipy/integrate/src/blaslapack_declarations.h
-    sed -i 's/void[[:space:]]*BLAS_FUNC/int BLAS_FUNC/g' scipy/optimize/src/blaslapack_declarations.h
-
-    sed -i 's/^void/int/g' scipy/interpolate/src/_fitpackmodule.c
-    sed -i 's/void BLAS_FUNC/int BLAS_FUNC/g' scipy/interpolate/src/__fitpack.h
-
-    sed -i 's/extern void/extern int/g' scipy/sparse/linalg/_dsolve/SuperLU/SRC/*.{c,h}
-    sed -i 's/PUBLIC void/PUBLIC int/g' scipy/sparse/linalg/_dsolve/SuperLU/SRC/*.{c,h}
-    sed -i 's/^void/int/g' scipy/sparse/linalg/_dsolve/SuperLU/SRC/*.{c,h}
-    sed -i 's/^void/int/g' scipy/sparse/linalg/_dsolve/*.{c,h}
-    sed -i 's/void \(.\)print/int \1/g' scipy/sparse/linalg/_dsolve/SuperLU/SRC/*.{c,h}
-    sed -i 's/TYPE_GENERIC_FUNC(\(.*\), void)/TYPE_GENERIC_FUNC(\1, int)/g' scipy/sparse/linalg/_dsolve/_superluobject.h
-
-    sed -i 's/^void/int/g' scipy/optimize/_trlib/trlib_private.h
-    sed -i 's/^void/int/g' scipy/_build_utils/src/wrap_dummy_g77_abi.c
-    sed -i 's/, int)/)/g' scipy/optimize/_trlib/trlib_private.h
-    sed -i 's/, 1)/)/g' scipy/optimize/_trlib/trlib_private.h
-
-    sed -i 's/^void/int/g' scipy/spatial/qhull_misc.h
-    sed -i 's/, size_t)/)/g' scipy/spatial/qhull_misc.h
-    sed -i 's/,1)/)/g' scipy/spatial/qhull_misc.h
-
-    # Input error causes "duplicate symbol" linker errors. Empty out the file.
-    echo "" > scipy/sparse/linalg/_dsolve/SuperLU/SRC/input_error.c
     export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"
 
     # https://github.com/mesonbuild/meson/blob/e542901af6e30865715d3c3c18f703910a096ec0/mesonbuild/backend/ninjabackend.py#L94

From 785a8ec541e7233471c223c702870fea3f680814 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 00:44:50 +0530
Subject: [PATCH 10/48] Maybe the Meson<1.10 constraint is resolved now?

---
 packages/scipy/meta.yaml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index 64fa7b4c..dc6b86a8 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -78,9 +78,6 @@ requirements:
     - libboost
   run:
     - numpy
-  constraint:
-    # Getting: Error: Dynamic linking error: cannot resolve symbol pow_di
-    - meson < 1.10
 test:
   imports:
     - scipy

From 7b907c6b12db84f7ff532479874418c8350999e8 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 01:14:12 +0530
Subject: [PATCH 11/48] Fix meson option to detect libsemilapack

---
 packages/scipy/meta.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index dc6b86a8..13dc6f2c 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -52,7 +52,7 @@ build:
     build-dir=build
     setup-args=-D_without-fortran=true
     setup-args=-Dblas=blis
-    setup-args=-Dlapack=semilapack
+    setup-args=-Dlapack=semicolon-lapack
   script: |
     set -x
     export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"

From 8d980f656ef13601f9df696710b3a3dc180ff8bf Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 01:17:36 +0530
Subject: [PATCH 12/48] Fix cross file passing to libsemilapack

---
 packages/libsemilapack/meta.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/packages/libsemilapack/meta.yaml b/packages/libsemilapack/meta.yaml
index fb8e9102..47b16d8b 100644
--- a/packages/libsemilapack/meta.yaml
+++ b/packages/libsemilapack/meta.yaml
@@ -15,11 +15,10 @@ build:
     # shim must be a plain (static) library on Emscripten.
     sed -i 's/shared_library(/library(/' src/fortran_shim/meson.build
 
-    CROSS=$(python -c 'import pyodide_build, os; print(os.path.join(os.path.dirname(pyodide_build.__file__), "tools", "emscripten.meson.cross"))')
     export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"
 
     CC=emcc CXX=em++ AR=emar \
-    meson setup builddir --cross-file "$CROSS" \
+    meson setup builddir --cross-file "${MESON_CROSS_FILE}" \
       -Dblas=blis \
       -Dfabi_shim=true \
       -Dtests=false \

From 54da58b2d7b884e795eebc12161e83c873fba0a6 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 10:32:47 +0530
Subject: [PATCH 13/48] ABI normalisation for BLIS's f2c-ed ints

---
 packages/libblis/meta.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/packages/libblis/meta.yaml b/packages/libblis/meta.yaml
index 834ea736..27ea39e5 100644
--- a/packages/libblis/meta.yaml
+++ b/packages/libblis/meta.yaml
@@ -19,6 +19,12 @@ source:
 build:
   type: shared_library
   script: |
+    for f in $(grep -rlE '/\* Subroutine \*/ int PASTEF77' frame/compat/f2c/); do
+      sed -i 's|/\* Subroutine \*/ int PASTEF77|/* Subroutine */ void PASTEF77|g' "$f"
+      sed -i 's|return 0;|return;|g' "$f"
+      h="${f%.c}.h"
+      [ -f "$h" ] && sed -i 's|BLIS_EXPORT_BLAS int PASTEF77|BLIS_EXPORT_BLAS void PASTEF77|g' "$h"
+    done
     CC=emcc AR=emar RANLIB=emranlib \
       ./configure \
         --disable-threading \

From c4738be7c235c8e7704d2a57a0b4d925a94094d6 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 10:33:21 +0530
Subject: [PATCH 14/48] Normalise BLIS lsame_ hidden length unused params

---
 packages/libblis/meta.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/packages/libblis/meta.yaml b/packages/libblis/meta.yaml
index 27ea39e5..e8b0dd8f 100644
--- a/packages/libblis/meta.yaml
+++ b/packages/libblis/meta.yaml
@@ -25,6 +25,12 @@ build:
       h="${f%.c}.h"
       [ -f "$h" ] && sed -i 's|BLIS_EXPORT_BLAS int PASTEF77|BLIS_EXPORT_BLAS void PASTEF77|g' "$h"
     done
+    sed -i -E 's/(PASTEF77\(lsame\)\(const char \*ca, const char \*cb), (long|int) ca_len, (long|int) cb_len\)/\1)/' \
+      frame/compat/f2c/bla_lsame.c frame/compat/f2c/bla_lsame.h
+    # f2c line-wraps long calls, so `(ftnlen)1` may be split across lines
+    # (e.g. `(\n ftnlen)1`); tolerate whitespace inside and around it.
+    perl -0777 -pi -e 's/PASTEF77\(lsame\)\((.*?),\s*\(\s*ftnlen\s*\)\s*1\s*,\s*\(\s*ftnlen\s*\)\s*1\s*\)/PASTEF77(lsame)($1)/gs' \
+      $(grep -rlE 'PASTEF77\(lsame\)\(' frame/)
     CC=emcc AR=emar RANLIB=emranlib \
       ./configure \
         --disable-threading \

From 4c4b4e98d0d8018476b29ef433a5467ebdca9e84 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 10:36:12 +0530
Subject: [PATCH 15/48] BLIS's xerbla_array int vs void alignment

---
 packages/libblis/meta.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/packages/libblis/meta.yaml b/packages/libblis/meta.yaml
index e8b0dd8f..5d8f074f 100644
--- a/packages/libblis/meta.yaml
+++ b/packages/libblis/meta.yaml
@@ -31,6 +31,13 @@ build:
     # (e.g. `(\n ftnlen)1`); tolerate whitespace inside and around it.
     perl -0777 -pi -e 's/PASTEF77\(lsame\)\((.*?),\s*\(\s*ftnlen\s*\)\s*1\s*,\s*\(\s*ftnlen\s*\)\s*1\s*\)/PASTEF77(lsame)($1)/gs' \
       $(grep -rlE 'PASTEF77\(lsame\)\(' frame/)
+    sed -i -E 's/int PASTEF77\(xerbla_array\)\((const bla_character \*srname_array), (const bla_integer) srname_len, (const bla_integer \*info)\)/void PASTEF77(xerbla_array)(\1, \2 *srname_len, \3)/' \
+      frame/compat/f2c/bla_xerbla_array.c frame/compat/f2c/bla_xerbla_array.h
+    sed -i -e 's/bli_min( srname_len,/bli_min( *srname_len,/' \
+           -e 's/( ftnlen )srname_len/( ftnlen )*srname_len/' \
+           -e 's/return 0;/return;/' \
+      frame/compat/f2c/bla_xerbla_array.c
+
     CC=emcc AR=emar RANLIB=emranlib \
       ./configure \
         --disable-threading \

From 65812330b5fe6cd7beed0e4c2e57f99960ef9f59 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 10:59:52 +0530
Subject: [PATCH 16/48] getrf/getri shouldn't be `CBLAS_INT`s, should be
 `void`s

---
 packages/scipy/meta.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index 13dc6f2c..fde195f2 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -57,6 +57,7 @@ build:
     set -x
     export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"
 
+    sed -i 's/^CBLAS_INT$/void/' scipy/linalg/src/_common_array_utils.hh
     # https://github.com/mesonbuild/meson/blob/e542901af6e30865715d3c3c18f703910a096ec0/mesonbuild/backend/ninjabackend.py#L94
     # Prevent from using response file. The response file that meson generates is not compatible to pyodide-build
     export MESON_RSP_THRESHOLD=131072

From 587e4a8c7bc29a507d75ac563e6879a992d87924 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 11:00:12 +0530
Subject: [PATCH 17/48] Fix signature mismatches for bundled trlib

---
 packages/scipy/meta.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index fde195f2..8c28688d 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -58,6 +58,10 @@ build:
     export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"
 
     sed -i 's/^CBLAS_INT$/void/' scipy/linalg/src/_common_array_utils.hh
+    sed -i -e '/BLAS_FUNC(dlagtm)/ s/, int);/);/' \
+           -e '/BLAS_FUNC(dlagtm)/ s/, 1);/);/' \
+      scipy/optimize/_trlib/trlib_private.h
+
     # https://github.com/mesonbuild/meson/blob/e542901af6e30865715d3c3c18f703910a096ec0/mesonbuild/backend/ninjabackend.py#L94
     # Prevent from using response file. The response file that meson generates is not compatible to pyodide-build
     export MESON_RSP_THRESHOLD=131072

From 674db1437e1264ff4129831a37e0d7803fd29be2 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 11:01:13 +0530
Subject: [PATCH 18/48] Expose `cblas_dger` and family to LAPACK

---
 packages/libsemilapack/meta.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/libsemilapack/meta.yaml b/packages/libsemilapack/meta.yaml
index 47b16d8b..0994f11d 100644
--- a/packages/libsemilapack/meta.yaml
+++ b/packages/libsemilapack/meta.yaml
@@ -30,6 +30,7 @@ build:
     mkdir -p dist
     emcc ${WASM_LIBRARY_DIR}/lib/libsemilapack.a \
         ${WASM_LIBRARY_DIR}/lib/libsemilapack_fortran.a \
+        ${WASM_LIBRARY_DIR}/lib/libblis.so \
         ${SIDE_MODULE_LDFLAGS} \
         -o dist/libsemilapack.so
 

From 6fa67e2adc232abeff4471084e7bb092db51bf6a Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 11:02:15 +0530
Subject: [PATCH 19/48] Add BLIS as a runtime dep for libsemilapack?

---
 packages/libsemilapack/meta.yaml | 4 ++++
 uv.lock                          | 3 +++
 2 files changed, 7 insertions(+)
 create mode 100644 uv.lock

diff --git a/packages/libsemilapack/meta.yaml b/packages/libsemilapack/meta.yaml
index 0994f11d..6843bd56 100644
--- a/packages/libsemilapack/meta.yaml
+++ b/packages/libsemilapack/meta.yaml
@@ -38,6 +38,10 @@ build:
 requirements:
   host:
     - libblis
+  # TODO: explore whether libblis is needed at runtime, or if the CBLAS symbols
+  # can be resolved at build time and the libblis.so dependency dropped
+  run:
+    - libblis
 about:
   home: https://github.com/ilayn/semicolon-lapack
   license: BSD-3-Clause
diff --git a/uv.lock b/uv.lock
new file mode 100644
index 00000000..a5bc5147
--- /dev/null
+++ b/uv.lock
@@ -0,0 +1,3 @@
+version = 1
+revision = 3
+requires-python = ">=3.14"

From d165a3bd956fce2e1fafae1b11f08a9ce8121772 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 11:04:01 +0530
Subject: [PATCH 20/48] Restore qmax arg in dlasq2/dlasq3

---
 packages/libsemilapack/meta.yaml              |   2 +
 ...tore-qmax-parameter-to-dlasq3-slasq3.patch | 162 ++++++++++++++++++
 2 files changed, 164 insertions(+)
 create mode 100644 packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch

diff --git a/packages/libsemilapack/meta.yaml b/packages/libsemilapack/meta.yaml
index 6843bd56..d3a637e5 100644
--- a/packages/libsemilapack/meta.yaml
+++ b/packages/libsemilapack/meta.yaml
@@ -7,6 +7,8 @@ package:
 source:
   url: https://github.com/ilayn/semicolon-lapack/archive/refs/tags/v0.01.2-pre.tar.gz
   sha256: 447f49d333fadf0168a51976865c3d702bef0826e6c72cf29dd14ee8c9f903ef
+  patches:
+    - patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch
 
 build:
   type: shared_library
diff --git a/packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch b/packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch
new file mode 100644
index 00000000..0ef20cbb
--- /dev/null
+++ b/packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch
@@ -0,0 +1,162 @@
+diff --git a/src/d/dlasq2.c b/src/d/dlasq2.c
+index 926a7c0..54734f1 100644
+--- a/src/d/dlasq2.c
++++ b/src/d/dlasq2.c
+@@ -367,7 +367,7 @@ L100:
+             }
+ 
+             /* While submatrix unfinished take a good dqds step. */
+-            dlasq3(i0, &n0, Z, &pp, &dmin, &sigma, &desig, &nfail,
++            dlasq3(i0, &n0, Z, &pp, &dmin, &sigma, &desig, &qmax, &nfail,
+                    &iter, &ndiv, ieee, &ttype, &dmin1, &dmin2, &dn, &dn1,
+                    &dn2, &g, &tau);
+ 
+diff --git a/src/d/dlasq3.c b/src/d/dlasq3.c
+index 7266792..dc414bd 100644
+--- a/src/d/dlasq3.c
++++ b/src/d/dlasq3.c
+@@ -22,7 +22,7 @@
+  * @param[out]    dmin   Minimum value of d.
+  * @param[out]    sigma  Sum of shifts used in current segment.
+  * @param[in,out] desig  Lower order part of SIGMA.
+- * @param[in]     qmax   Maximum value of q.
++ * @param[in,out] qmax   Maximum value of q.
+  * @param[in,out] nfail  Increment NFAIL by 1 each time the shift was too big.
+  * @param[in,out] iter   Increment ITER by 1 for each iteration.
+  * @param[in,out] ndiv   Increment NDIV by 1 for each division.
+@@ -38,7 +38,7 @@
+  * @param[in,out] tau    This is the shift.
+  */
+ void dlasq3(const INT i0, INT* n0, f64* restrict Z,
+-            INT* pp, f64* dmin, f64* sigma, f64* desig,
++            INT* pp, f64* dmin, f64* sigma, f64* desig, f64* qmax,
+             INT* nfail, INT* iter, INT* ndiv,
+             const INT ieee, INT* ttype, f64* dmin1, f64* dmin2,
+             f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau)
+@@ -161,6 +161,8 @@ compute_shift:
+                 Z[4 * (*n0) - *pp + 3] = fmin(fmin(Z[4 * (*n0) - *pp + 3],
+                                                      Z[4 * i0 - *pp + 3]),
+                                                 Z[4 * i0 - *pp + 7]);
++                *qmax = fmax(fmax(*qmax, Z[4 * i0 + *pp]),
++                             Z[4 * i0 + *pp + 4]);
+                 *dmin = -ZERO;
+             }
+         }
+diff --git a/src/fortran_shim/shim_double.c b/src/fortran_shim/shim_double.c
+index c4521a4..2422c8c 100644
+--- a/src/fortran_shim/shim_double.c
++++ b/src/fortran_shim/shim_double.c
+@@ -251,7 +251,7 @@ void dlasdt_(INT* n, INT* lvl, INT* nd, INT* inode, INT* ndiml, INT* ndimr, INT*
+ void dlaset_(char* uplo, INT* m, INT* n, f64* alpha, f64* beta, f64* A, INT* lda);
+ void dlasq1_(INT* n, f64* D, f64* E, f64* work, INT* info);
+ void dlasq2_(INT* n, f64* Z, INT* info);
+-void dlasq3_(INT* i0, INT* n0, f64* Z, INT* pp, f64* dmin, f64* sigma, f64* desig, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau);
++void dlasq3_(INT* i0, INT* n0, f64* Z, INT* pp, f64* dmin, f64* sigma, f64* desig, f64* qmax, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau);
+ void dlasq4_(INT* i0, INT* n0, f64* Z, INT* pp, INT* n0in, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* tau, INT* ttype, f64* g);
+ void dlasq5_(INT* i0, INT* n0, f64* Z, INT* pp, f64* tau, f64* sigma, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dnm1, f64* dnm2, INT* ieee, f64* eps);
+ void dlasq6_(INT* i0, INT* n0, f64* Z, INT* pp, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dnm1, f64* dnm2);
+@@ -1762,8 +1762,8 @@ void dlasq2_(INT* n, f64* Z, INT* info) {
+     dlasq2(*n, Z, info);
+ }
+ 
+-void dlasq3_(INT* i0, INT* n0, f64* Z, INT* pp, f64* dmin, f64* sigma, f64* desig, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau) {
+-    dlasq3(*i0, n0, Z, pp, dmin, sigma, desig, nfail, iter, ndiv, *ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau);
++void dlasq3_(INT* i0, INT* n0, f64* Z, INT* pp, f64* dmin, f64* sigma, f64* desig, f64* qmax, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau) {
++    dlasq3(*i0, n0, Z, pp, dmin, sigma, desig, qmax, nfail, iter, ndiv, *ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau);
+ }
+ 
+ void dlasq4_(INT* i0, INT* n0, f64* Z, INT* pp, INT* n0in, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* tau, INT* ttype, f64* g) {
+diff --git a/src/fortran_shim/shim_single.c b/src/fortran_shim/shim_single.c
+index 6930a68..545cfb7 100644
+--- a/src/fortran_shim/shim_single.c
++++ b/src/fortran_shim/shim_single.c
+@@ -251,7 +251,7 @@ void slasdt_(INT* n, INT* lvl, INT* nd, INT* inode, INT* ndiml, INT* ndimr, INT*
+ void slaset_(char* uplo, INT* m, INT* n, f32* alpha, f32* beta, f32* A, INT* lda);
+ void slasq1_(INT* n, f32* D, f32* E, f32* work, INT* info);
+ void slasq2_(INT* n, f32* Z, INT* info);
+-void slasq3_(INT* i0, INT* n0, f32* Z, INT* pp, f32* dmin, f32* sigma, f32* desig, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau);
++void slasq3_(INT* i0, INT* n0, f32* Z, INT* pp, f32* dmin, f32* sigma, f32* desig, f32* qmax, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau);
+ void slasq4_(INT* i0, INT* n0, f32* Z, INT* pp, INT* n0in, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* tau, INT* ttype, f32* g);
+ void slasq5_(INT* i0, INT* n0, f32* Z, INT* pp, f32* tau, f32* sigma, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dnm1, f32* dnm2, INT* ieee, f32* eps);
+ void slasq6_(INT* i0, INT* n0, f32* Z, INT* pp, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dnm1, f32* dnm2);
+@@ -1759,8 +1759,8 @@ void slasq2_(INT* n, f32* Z, INT* info) {
+     slasq2(*n, Z, info);
+ }
+ 
+-void slasq3_(INT* i0, INT* n0, f32* Z, INT* pp, f32* dmin, f32* sigma, f32* desig, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau) {
+-    slasq3(*i0, n0, Z, pp, dmin, sigma, desig, nfail, iter, ndiv, *ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau);
++void slasq3_(INT* i0, INT* n0, f32* Z, INT* pp, f32* dmin, f32* sigma, f32* desig, f32* qmax, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau) {
++    slasq3(*i0, n0, Z, pp, dmin, sigma, desig, qmax, nfail, iter, ndiv, *ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau);
+ }
+ 
+ void slasq4_(INT* i0, INT* n0, f32* Z, INT* pp, INT* n0in, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* tau, INT* ttype, f32* g) {
+diff --git a/src/include/semicolon_lapack_double.h b/src/include/semicolon_lapack_double.h
+index 1756315..7a865de 100644
+--- a/src/include/semicolon_lapack_double.h
++++ b/src/include/semicolon_lapack_double.h
+@@ -257,7 +257,7 @@ SEMICOLON_API void dlasdt(const INT n, INT* lvl, INT* nd, INT* restrict inode, I
+ SEMICOLON_API void dlaset(const char* uplo, const INT m, const INT n, const f64 alpha, const f64 beta, f64* restrict A, const INT lda);
+ SEMICOLON_API void dlasq1(const INT n, f64* restrict D, f64* restrict E, f64* restrict work, INT* info);
+ SEMICOLON_API void dlasq2(const INT n, f64* restrict Z, INT* info);
+-SEMICOLON_API void dlasq3(const INT i0, INT* n0, f64* restrict Z, INT* pp, f64* dmin, f64* sigma, f64* desig, INT* nfail, INT* iter, INT* ndiv, const INT ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau);
++SEMICOLON_API void dlasq3(const INT i0, INT* n0, f64* restrict Z, INT* pp, f64* dmin, f64* sigma, f64* desig, f64* qmax, INT* nfail, INT* iter, INT* ndiv, const INT ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau);
+ SEMICOLON_API void dlasq4(const INT i0, const INT n0, const f64* restrict Z, const INT pp, const INT n0in, const f64 dmin, const f64 dmin1, const f64 dmin2, const f64 dn, const f64 dn1, const f64 dn2, f64* tau, INT* ttype, f64* g);
+ SEMICOLON_API void dlasq5(const INT i0, const INT n0, f64* restrict Z, const INT pp, f64* tau, f64 sigma, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dnm1, f64* dnm2, const INT ieee, const f64 eps);
+ SEMICOLON_API void dlasq6(const INT i0, const INT n0, f64* restrict Z, const INT pp, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dnm1, f64* dnm2);
+diff --git a/src/include/semicolon_lapack_single.h b/src/include/semicolon_lapack_single.h
+index 47da47d..62de006 100644
+--- a/src/include/semicolon_lapack_single.h
++++ b/src/include/semicolon_lapack_single.h
+@@ -257,7 +257,7 @@ SEMICOLON_API void slasdt(const INT n, INT* lvl, INT* nd, INT* restrict inode, I
+ SEMICOLON_API void slaset(const char* uplo, const INT m, const INT n, const f32 alpha, const f32 beta, f32* restrict A, const INT lda);
+ SEMICOLON_API void slasq1(const INT n, f32* restrict D, f32* restrict E, f32* restrict work, INT* info);
+ SEMICOLON_API void slasq2(const INT n, f32* restrict Z, INT* info);
+-SEMICOLON_API void slasq3(const INT i0, INT* n0, f32* restrict Z, INT* pp, f32* dmin, f32* sigma, f32* desig, INT* nfail, INT* iter, INT* ndiv, const INT ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau);
++SEMICOLON_API void slasq3(const INT i0, INT* n0, f32* restrict Z, INT* pp, f32* dmin, f32* sigma, f32* desig, f32* qmax, INT* nfail, INT* iter, INT* ndiv, const INT ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau);
+ SEMICOLON_API void slasq4(const INT i0, const INT n0, const f32* restrict Z, const INT pp, const INT n0in, const f32 dmin, const f32 dmin1, const f32 dmin2, const f32 dn, const f32 dn1, const f32 dn2, f32* tau, INT* ttype, f32* g);
+ SEMICOLON_API void slasq5(const INT i0, const INT n0, f32* restrict Z, const INT pp, f32* tau, f32 sigma, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dnm1, f32* dnm2, const INT ieee, const f32 eps);
+ SEMICOLON_API void slasq6(const INT i0, const INT n0, f32* restrict Z, const INT pp, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dnm1, f32* dnm2);
+diff --git a/src/s/slasq2.c b/src/s/slasq2.c
+index 7559914..61774b1 100644
+--- a/src/s/slasq2.c
++++ b/src/s/slasq2.c
+@@ -369,7 +369,7 @@ L100:
+             }
+ 
+             /* While submatrix unfinished take a good dqds step. */
+-            slasq3(i0, &n0, Z, &pp, &dmin, &sigma, &desig, &nfail,
++            slasq3(i0, &n0, Z, &pp, &dmin, &sigma, &desig, &qmax, &nfail,
+                    &iter, &ndiv, ieee, &ttype, &dmin1, &dmin2, &dn, &dn1,
+                    &dn2, &g, &tau);
+ 
+diff --git a/src/s/slasq3.c b/src/s/slasq3.c
+index 03b758c..85718f2 100644
+--- a/src/s/slasq3.c
++++ b/src/s/slasq3.c
+@@ -22,7 +22,7 @@
+  * @param[out]    dmin   Minimum value of d.
+  * @param[out]    sigma  Sum of shifts used in current segment.
+  * @param[in,out] desig  Lower order part of SIGMA.
+- * @param[in]     qmax   Maximum value of q.
++ * @param[in,out] qmax   Maximum value of q.
+  * @param[in,out] nfail  Increment NFAIL by 1 each time the shift was too big.
+  * @param[in,out] iter   Increment ITER by 1 for each iteration.
+  * @param[in,out] ndiv   Increment NDIV by 1 for each division.
+@@ -38,7 +38,7 @@
+  * @param[in,out] tau    This is the shift.
+  */
+ void slasq3(const INT i0, INT* n0, f32* restrict Z,
+-            INT* pp, f32* dmin, f32* sigma, f32* desig,
++            INT* pp, f32* dmin, f32* sigma, f32* desig, f32* qmax,
+             INT* nfail, INT* iter, INT* ndiv,
+             const INT ieee, INT* ttype, f32* dmin1, f32* dmin2,
+             f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau)
+@@ -161,6 +161,8 @@ compute_shift:
+                 Z[4 * (*n0) - *pp + 3] = fminf(fminf(Z[4 * (*n0) - *pp + 3],
+                                                      Z[4 * i0 - *pp + 3]),
+                                                 Z[4 * i0 - *pp + 7]);
++                *qmax = fmaxf(fmaxf(*qmax, Z[4 * i0 + *pp]),
++                              Z[4 * i0 + *pp + 4]);
+                 *dmin = -ZERO;
+             }
+         }

From a1c77a4ee88dcf3bc0060ebe05522cf4a1f698d4 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 11:10:09 +0530
Subject: [PATCH 21/48] Move BLIS sed commands into a patch instead

---
 packages/libblis/meta.yaml                    |   20 +-
 ...-ABI-void-returns-lsame-xerbla_array.patch | 3895 +++++++++++++++++
 2 files changed, 3896 insertions(+), 19 deletions(-)
 create mode 100644 packages/libblis/patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch

diff --git a/packages/libblis/meta.yaml b/packages/libblis/meta.yaml
index 5d8f074f..ed5eafa5 100644
--- a/packages/libblis/meta.yaml
+++ b/packages/libblis/meta.yaml
@@ -15,29 +15,11 @@ source:
     # functions in the BLIS f2c compat layer. The patch is needed for SciPy's test
     # suite to pass.
     - patches/0002-CBLAS-interface-for-crotg-zrotg-zdrot-and-csrot.patch
+    - patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch
 
 build:
   type: shared_library
   script: |
-    for f in $(grep -rlE '/\* Subroutine \*/ int PASTEF77' frame/compat/f2c/); do
-      sed -i 's|/\* Subroutine \*/ int PASTEF77|/* Subroutine */ void PASTEF77|g' "$f"
-      sed -i 's|return 0;|return;|g' "$f"
-      h="${f%.c}.h"
-      [ -f "$h" ] && sed -i 's|BLIS_EXPORT_BLAS int PASTEF77|BLIS_EXPORT_BLAS void PASTEF77|g' "$h"
-    done
-    sed -i -E 's/(PASTEF77\(lsame\)\(const char \*ca, const char \*cb), (long|int) ca_len, (long|int) cb_len\)/\1)/' \
-      frame/compat/f2c/bla_lsame.c frame/compat/f2c/bla_lsame.h
-    # f2c line-wraps long calls, so `(ftnlen)1` may be split across lines
-    # (e.g. `(\n ftnlen)1`); tolerate whitespace inside and around it.
-    perl -0777 -pi -e 's/PASTEF77\(lsame\)\((.*?),\s*\(\s*ftnlen\s*\)\s*1\s*,\s*\(\s*ftnlen\s*\)\s*1\s*\)/PASTEF77(lsame)($1)/gs' \
-      $(grep -rlE 'PASTEF77\(lsame\)\(' frame/)
-    sed -i -E 's/int PASTEF77\(xerbla_array\)\((const bla_character \*srname_array), (const bla_integer) srname_len, (const bla_integer \*info)\)/void PASTEF77(xerbla_array)(\1, \2 *srname_len, \3)/' \
-      frame/compat/f2c/bla_xerbla_array.c frame/compat/f2c/bla_xerbla_array.h
-    sed -i -e 's/bli_min( srname_len,/bli_min( *srname_len,/' \
-           -e 's/( ftnlen )srname_len/( ftnlen )*srname_len/' \
-           -e 's/return 0;/return;/' \
-      frame/compat/f2c/bla_xerbla_array.c
-
     CC=emcc AR=emar RANLIB=emranlib \
       ./configure \
         --disable-threading \
diff --git a/packages/libblis/patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch b/packages/libblis/patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch
new file mode 100644
index 00000000..709c4b45
--- /dev/null
+++ b/packages/libblis/patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch
@@ -0,0 +1,3895 @@
+diff --git a/frame/compat/check/bla_gemm3m_check.h b/frame/compat/check/bla_gemm3m_check.h
+index e6c4e38..2f2d9d8 100644
+--- a/frame/compat/check/bla_gemm3m_check.h
++++ b/frame/compat/check/bla_gemm3m_check.h
+@@ -43,12 +43,12 @@
+ 	f77_int ta,    tb; \
+ 	f77_int nrowa, nrowb; \
+ \
+-	nota  = PASTEF77(lsame)( transa, "N", (ftnlen)1, (ftnlen)1 ); \
+-	notb  = PASTEF77(lsame)( transb, "N", (ftnlen)1, (ftnlen)1 ); \
+-	conja = PASTEF77(lsame)( transa, "C", (ftnlen)1, (ftnlen)1 ); \
+-	conjb = PASTEF77(lsame)( transb, "C", (ftnlen)1, (ftnlen)1 ); \
+-	ta    = PASTEF77(lsame)( transa, "T", (ftnlen)1, (ftnlen)1 ); \
+-	tb    = PASTEF77(lsame)( transb, "T", (ftnlen)1, (ftnlen)1 ); \
++	nota  = PASTEF77(lsame)( transa, "N"); \
++	notb  = PASTEF77(lsame)( transb, "N"); \
++	conja = PASTEF77(lsame)( transa, "C"); \
++	conjb = PASTEF77(lsame)( transb, "C"); \
++	ta    = PASTEF77(lsame)( transa, "T"); \
++	tb    = PASTEF77(lsame)( transb, "T"); \
+ \
+ 	if ( nota ) { nrowa = *m; } \
+ 	else        { nrowa = *k; } \
+diff --git a/frame/compat/check/bla_gemm_check.h b/frame/compat/check/bla_gemm_check.h
+index 7c9434e..4f5cf08 100644
+--- a/frame/compat/check/bla_gemm_check.h
++++ b/frame/compat/check/bla_gemm_check.h
+@@ -42,12 +42,12 @@
+ 	f77_int ta,    tb; \
+ 	f77_int nrowa, nrowb; \
+ \
+-	nota  = PASTEF77(lsame)( transa, "N", (ftnlen)1, (ftnlen)1 ); \
+-	notb  = PASTEF77(lsame)( transb, "N", (ftnlen)1, (ftnlen)1 ); \
+-	conja = PASTEF77(lsame)( transa, "C", (ftnlen)1, (ftnlen)1 ); \
+-	conjb = PASTEF77(lsame)( transb, "C", (ftnlen)1, (ftnlen)1 ); \
+-	ta    = PASTEF77(lsame)( transa, "T", (ftnlen)1, (ftnlen)1 ); \
+-	tb    = PASTEF77(lsame)( transb, "T", (ftnlen)1, (ftnlen)1 ); \
++	nota  = PASTEF77(lsame)( transa, "N"); \
++	notb  = PASTEF77(lsame)( transb, "N"); \
++	conja = PASTEF77(lsame)( transa, "C"); \
++	conjb = PASTEF77(lsame)( transb, "C"); \
++	ta    = PASTEF77(lsame)( transa, "T"); \
++	tb    = PASTEF77(lsame)( transb, "T"); \
+ \
+ 	if ( nota ) { nrowa = *m; } \
+ 	else        { nrowa = *k; } \
+diff --git a/frame/compat/check/bla_gemmt_check.h b/frame/compat/check/bla_gemmt_check.h
+index 0a75424..266837c 100644
+--- a/frame/compat/check/bla_gemmt_check.h
++++ b/frame/compat/check/bla_gemmt_check.h
+@@ -43,15 +43,15 @@
+ 	f77_int lower, upper; \
+ 	f77_int nrowa, nrowb; \
+ \
+-	nota  = PASTEF77(lsame)( transa, "N", (ftnlen)1, (ftnlen)1 ); \
+-	notb  = PASTEF77(lsame)( transb, "N", (ftnlen)1, (ftnlen)1 ); \
+-	conja = PASTEF77(lsame)( transa, "C", (ftnlen)1, (ftnlen)1 ); \
+-	conjb = PASTEF77(lsame)( transb, "C", (ftnlen)1, (ftnlen)1 ); \
+-	ta    = PASTEF77(lsame)( transa, "T", (ftnlen)1, (ftnlen)1 ); \
+-	tb    = PASTEF77(lsame)( transb, "T", (ftnlen)1, (ftnlen)1 ); \
++	nota  = PASTEF77(lsame)( transa, "N"); \
++	notb  = PASTEF77(lsame)( transb, "N"); \
++	conja = PASTEF77(lsame)( transa, "C"); \
++	conjb = PASTEF77(lsame)( transb, "C"); \
++	ta    = PASTEF77(lsame)( transa, "T"); \
++	tb    = PASTEF77(lsame)( transb, "T"); \
+ \
+-	lower = PASTEF77(lsame)( uploc,  "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploc,  "U", (ftnlen)1, (ftnlen)1 ); \
++	lower = PASTEF77(lsame)( uploc,  "L"); \
++	upper = PASTEF77(lsame)( uploc,  "U"); \
+ \
+ 	if ( nota ) { nrowa = *m; } \
+ 	else        { nrowa = *k; } \
+diff --git a/frame/compat/check/bla_gemv_check.h b/frame/compat/check/bla_gemv_check.h
+index e5f319a..5367d9e 100644
+--- a/frame/compat/check/bla_gemv_check.h
++++ b/frame/compat/check/bla_gemv_check.h
+@@ -39,9 +39,9 @@
+ 	f77_int info = 0; \
+ 	f77_int nota, ta, conja; \
+ \
+-	nota  = PASTEF77(lsame)( transa, "N", (ftnlen)1, (ftnlen)1 ); \
+-	ta    = PASTEF77(lsame)( transa, "T", (ftnlen)1, (ftnlen)1 ); \
+-	conja = PASTEF77(lsame)( transa, "C", (ftnlen)1, (ftnlen)1 ); \
++	nota  = PASTEF77(lsame)( transa, "N"); \
++	ta    = PASTEF77(lsame)( transa, "T"); \
++	conja = PASTEF77(lsame)( transa, "C"); \
+ \
+ 	if      ( !nota && !ta && !conja ) \
+ 		info = 1; \
+diff --git a/frame/compat/check/bla_hemm_check.h b/frame/compat/check/bla_hemm_check.h
+index 0bd02db..f38345b 100644
+--- a/frame/compat/check/bla_hemm_check.h
++++ b/frame/compat/check/bla_hemm_check.h
+@@ -41,10 +41,10 @@
+ 	f77_int lower, upper; \
+ 	f77_int nrowa; \
+ \
+-	left  = PASTEF77(lsame)( sidea, "L", (ftnlen)1, (ftnlen)1 ); \
+-	right = PASTEF77(lsame)( sidea, "R", (ftnlen)1, (ftnlen)1 ); \
+-	lower = PASTEF77(lsame)( uploa, "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploa, "U", (ftnlen)1, (ftnlen)1 ); \
++	left  = PASTEF77(lsame)( sidea, "L"); \
++	right = PASTEF77(lsame)( sidea, "R"); \
++	lower = PASTEF77(lsame)( uploa, "L"); \
++	upper = PASTEF77(lsame)( uploa, "U"); \
+ \
+ 	if ( left ) { nrowa = *m; } \
+ 	else        { nrowa = *n; } \
+diff --git a/frame/compat/check/bla_hemv_check.h b/frame/compat/check/bla_hemv_check.h
+index 0764000..b2fcdb2 100644
+--- a/frame/compat/check/bla_hemv_check.h
++++ b/frame/compat/check/bla_hemv_check.h
+@@ -39,8 +39,8 @@
+ 	f77_int info = 0; \
+ 	f77_int lower, upper; \
+ \
+-	lower = PASTEF77(lsame)( uploa, "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploa, "U", (ftnlen)1, (ftnlen)1 ); \
++	lower = PASTEF77(lsame)( uploa, "L"); \
++	upper = PASTEF77(lsame)( uploa, "U"); \
+ \
+ 	if      ( !lower && !upper ) \
+ 		info = 1; \
+diff --git a/frame/compat/check/bla_her2_check.h b/frame/compat/check/bla_her2_check.h
+index 97ac9f1..50dd87e 100644
+--- a/frame/compat/check/bla_her2_check.h
++++ b/frame/compat/check/bla_her2_check.h
+@@ -39,8 +39,8 @@
+ 	f77_int info = 0; \
+ 	f77_int lower, upper; \
+ \
+-	lower = PASTEF77(lsame)( uploa, "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploa, "U", (ftnlen)1, (ftnlen)1 ); \
++	lower = PASTEF77(lsame)( uploa, "L"); \
++	upper = PASTEF77(lsame)( uploa, "U"); \
+ \
+ 	if      ( !lower && !upper ) \
+ 		info = 1; \
+diff --git a/frame/compat/check/bla_her2k_check.h b/frame/compat/check/bla_her2k_check.h
+index ebe80d7..6ce89bb 100644
+--- a/frame/compat/check/bla_her2k_check.h
++++ b/frame/compat/check/bla_her2k_check.h
+@@ -41,10 +41,10 @@
+ 	f77_int lower, upper; \
+ 	f77_int nrowa; \
+ \
+-	nota  = PASTEF77(lsame)( trans, "N", (ftnlen)1, (ftnlen)1 ); \
+-	conja = PASTEF77(lsame)( trans, "C", (ftnlen)1, (ftnlen)1 ); \
+-	lower = PASTEF77(lsame)( uploa, "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploa, "U", (ftnlen)1, (ftnlen)1 ); \
++	nota  = PASTEF77(lsame)( trans, "N"); \
++	conja = PASTEF77(lsame)( trans, "C"); \
++	lower = PASTEF77(lsame)( uploa, "L"); \
++	upper = PASTEF77(lsame)( uploa, "U"); \
+ \
+ 	if ( nota ) { nrowa = *m; } \
+ 	else        { nrowa = *k; } \
+diff --git a/frame/compat/check/bla_her_check.h b/frame/compat/check/bla_her_check.h
+index 5271b65..f3e1535 100644
+--- a/frame/compat/check/bla_her_check.h
++++ b/frame/compat/check/bla_her_check.h
+@@ -39,8 +39,8 @@
+ 	f77_int info = 0; \
+ 	f77_int lower, upper; \
+ \
+-	lower = PASTEF77(lsame)( uploa, "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploa, "U", (ftnlen)1, (ftnlen)1 ); \
++	lower = PASTEF77(lsame)( uploa, "L"); \
++	upper = PASTEF77(lsame)( uploa, "U"); \
+ \
+ 	if      ( !lower && !upper ) \
+ 		info = 1; \
+diff --git a/frame/compat/check/bla_herk_check.h b/frame/compat/check/bla_herk_check.h
+index 3b1c04e..a41cf63 100644
+--- a/frame/compat/check/bla_herk_check.h
++++ b/frame/compat/check/bla_herk_check.h
+@@ -41,10 +41,10 @@
+ 	f77_int lower, upper; \
+ 	f77_int nrowa; \
+ \
+-	nota  = PASTEF77(lsame)( transa, "N", (ftnlen)1, (ftnlen)1 ); \
+-	conja = PASTEF77(lsame)( transa, "C", (ftnlen)1, (ftnlen)1 ); \
+-	lower = PASTEF77(lsame)( uploc,  "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploc,  "U", (ftnlen)1, (ftnlen)1 ); \
++	nota  = PASTEF77(lsame)( transa, "N"); \
++	conja = PASTEF77(lsame)( transa, "C"); \
++	lower = PASTEF77(lsame)( uploc,  "L"); \
++	upper = PASTEF77(lsame)( uploc,  "U"); \
+ \
+ 	if ( nota ) { nrowa = *m; } \
+ 	else        { nrowa = *k; } \
+diff --git a/frame/compat/check/bla_syr2k_check.h b/frame/compat/check/bla_syr2k_check.h
+index cd5fc96..671a56a 100644
+--- a/frame/compat/check/bla_syr2k_check.h
++++ b/frame/compat/check/bla_syr2k_check.h
+@@ -45,11 +45,11 @@
+ 	static char* dt_cst = dt_str; \
+ \
+ 	is_r  = ( dt_cst[0] == 's' || dt_cst[0] == 'd' ); \
+-	nota  = PASTEF77(lsame)( trans, "N", (ftnlen)1, (ftnlen)1 ); \
+-	ta    = PASTEF77(lsame)( trans, "T", (ftnlen)1, (ftnlen)1 ); \
+-	cta   = PASTEF77(lsame)( trans, "C", (ftnlen)1, (ftnlen)1 ); \
+-	lower = PASTEF77(lsame)( uploa, "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploa, "U", (ftnlen)1, (ftnlen)1 ); \
++	nota  = PASTEF77(lsame)( trans, "N"); \
++	ta    = PASTEF77(lsame)( trans, "T"); \
++	cta   = PASTEF77(lsame)( trans, "C"); \
++	lower = PASTEF77(lsame)( uploa, "L"); \
++	upper = PASTEF77(lsame)( uploa, "U"); \
+ \
+ 	if ( nota ) { nrowa = *m; } \
+ 	else        { nrowa = *k; } \
+diff --git a/frame/compat/check/bla_syrk_check.h b/frame/compat/check/bla_syrk_check.h
+index d0e915f..bb34706 100644
+--- a/frame/compat/check/bla_syrk_check.h
++++ b/frame/compat/check/bla_syrk_check.h
+@@ -45,11 +45,11 @@
+ 	static char* dt_cst = dt_str; \
+ \
+ 	is_r  = ( dt_cst[0] == 's' || dt_cst[0] == 'd' ); \
+-	nota  = PASTEF77(lsame)( transa, "N", (ftnlen)1, (ftnlen)1 ); \
+-	ta    = PASTEF77(lsame)( transa, "T", (ftnlen)1, (ftnlen)1 ); \
+-	cta   = PASTEF77(lsame)( transa, "C", (ftnlen)1, (ftnlen)1 ); \
+-	lower = PASTEF77(lsame)( uploc,  "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploc,  "U", (ftnlen)1, (ftnlen)1 ); \
++	nota  = PASTEF77(lsame)( transa, "N"); \
++	ta    = PASTEF77(lsame)( transa, "T"); \
++	cta   = PASTEF77(lsame)( transa, "C"); \
++	lower = PASTEF77(lsame)( uploc,  "L"); \
++	upper = PASTEF77(lsame)( uploc,  "U"); \
+ \
+ 	if ( nota ) { nrowa = *m; } \
+ 	else        { nrowa = *k; } \
+diff --git a/frame/compat/check/bla_trmm_check.h b/frame/compat/check/bla_trmm_check.h
+index 29bc67b..6dc2c15 100644
+--- a/frame/compat/check/bla_trmm_check.h
++++ b/frame/compat/check/bla_trmm_check.h
+@@ -43,15 +43,15 @@
+ 	f77_int unita, nonua; \
+ 	f77_int nrowa; \
+ \
+-	left  = PASTEF77(lsame)( sidea,  "L", (ftnlen)1, (ftnlen)1 ); \
+-	right = PASTEF77(lsame)( sidea,  "R", (ftnlen)1, (ftnlen)1 ); \
+-	lower = PASTEF77(lsame)( uploa,  "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploa,  "U", (ftnlen)1, (ftnlen)1 ); \
+-	nota  = PASTEF77(lsame)( transa, "N", (ftnlen)1, (ftnlen)1 ); \
+-	ta    = PASTEF77(lsame)( transa, "T", (ftnlen)1, (ftnlen)1 ); \
+-	conja = PASTEF77(lsame)( transa, "C", (ftnlen)1, (ftnlen)1 ); \
+-	unita = PASTEF77(lsame)( diaga,  "U", (ftnlen)1, (ftnlen)1 ); \
+-	nonua = PASTEF77(lsame)( diaga,  "N", (ftnlen)1, (ftnlen)1 ); \
++	left  = PASTEF77(lsame)( sidea,  "L"); \
++	right = PASTEF77(lsame)( sidea,  "R"); \
++	lower = PASTEF77(lsame)( uploa,  "L"); \
++	upper = PASTEF77(lsame)( uploa,  "U"); \
++	nota  = PASTEF77(lsame)( transa, "N"); \
++	ta    = PASTEF77(lsame)( transa, "T"); \
++	conja = PASTEF77(lsame)( transa, "C"); \
++	unita = PASTEF77(lsame)( diaga,  "U"); \
++	nonua = PASTEF77(lsame)( diaga,  "N"); \
+ \
+ 	if ( left ) { nrowa = *m; } \
+ 	else        { nrowa = *n; } \
+diff --git a/frame/compat/check/bla_trmv_check.h b/frame/compat/check/bla_trmv_check.h
+index 34d8a5f..b9fe6f0 100644
+--- a/frame/compat/check/bla_trmv_check.h
++++ b/frame/compat/check/bla_trmv_check.h
+@@ -41,13 +41,13 @@
+ 	f77_int nota, ta, conja; \
+ 	f77_int unita, nonua; \
+ \
+-	lower = PASTEF77(lsame)( uploa,  "L", (ftnlen)1, (ftnlen)1 ); \
+-	upper = PASTEF77(lsame)( uploa,  "U", (ftnlen)1, (ftnlen)1 ); \
+-	nota  = PASTEF77(lsame)( transa, "N", (ftnlen)1, (ftnlen)1 ); \
+-	ta    = PASTEF77(lsame)( transa, "T", (ftnlen)1, (ftnlen)1 ); \
+-	conja = PASTEF77(lsame)( transa, "C", (ftnlen)1, (ftnlen)1 ); \
+-	unita = PASTEF77(lsame)( diaga,  "U", (ftnlen)1, (ftnlen)1 ); \
+-	nonua = PASTEF77(lsame)( diaga,  "N", (ftnlen)1, (ftnlen)1 ); \
++	lower = PASTEF77(lsame)( uploa,  "L"); \
++	upper = PASTEF77(lsame)( uploa,  "U"); \
++	nota  = PASTEF77(lsame)( transa, "N"); \
++	ta    = PASTEF77(lsame)( transa, "T"); \
++	conja = PASTEF77(lsame)( transa, "C"); \
++	unita = PASTEF77(lsame)( diaga,  "U"); \
++	nonua = PASTEF77(lsame)( diaga,  "N"); \
+ \
+ 	if      ( !lower && !upper ) \
+ 		info = 1; \
+diff --git a/frame/compat/f2c/bla_gbmv.c b/frame/compat/f2c/bla_gbmv.c
+index 0edc7cb..c791927 100644
+--- a/frame/compat/f2c/bla_gbmv.c
++++ b/frame/compat/f2c/bla_gbmv.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(c,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_scomplex *alpha, const bla_scomplex *a, const bla_integer *lda, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(c,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_scomplex *alpha, const bla_scomplex *a, const bla_integer *lda, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6;
+@@ -56,7 +56,7 @@
+     bla_integer lenx, leny, i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical noconj;
+     bla_integer kup1;
+ 
+@@ -203,8 +203,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "T", (
+-	    ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (ftnlen)1)
++    if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans, "T") && ! PASTEF77(lsame)(trans, "C")
+ 	    ) {
+ 	info = 1;
+     } else if (*m < 0) {
+@@ -224,22 +223,22 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("CGBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*m == 0 || *n == 0 || (bli_creal(*alpha) == 0.f && bli_cimag(*alpha) == 0.f && (bli_creal(*beta)
+ 	    == 1.f && bli_cimag(*beta) == 0.f))) {
+-	return 0;
++	return;
+     }
+ 
+-    noconj = PASTEF77(lsame)(trans, "T", (ftnlen)1, (ftnlen)1);
++    noconj = PASTEF77(lsame)(trans, "T");
+ 
+ /*     Set  LENX  and  LENY, the lengths of the vectors x and y, and set */
+ /*     up the start points in  X  and  Y. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 	lenx = *n;
+ 	leny = *m;
+     } else {
+@@ -305,10 +304,10 @@
+ 	}
+     }
+     if (bli_creal(*alpha) == 0.f && bli_cimag(*alpha) == 0.f) {
+-	return 0;
++	return;
+     }
+     kup1 = *ku + 1;
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  y := alpha*A*x + y. */
+ 
+@@ -471,7 +470,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of CGBMV . */
+ 
+@@ -482,7 +481,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_double *alpha, const bla_double *a, const bla_integer *lda, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(d,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_double *alpha, const bla_double *a, const bla_integer *lda, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6;
+@@ -493,7 +492,7 @@
+     bla_integer lenx, leny, i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_integer kup1;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -635,8 +634,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "T", (
+-	    ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (ftnlen)1)
++    if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans, "T") && ! PASTEF77(lsame)(trans, "C")
+ 	    ) {
+ 	info = 1;
+     } else if (*m < 0) {
+@@ -656,19 +654,19 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("DGBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*m == 0 || *n == 0 || (*alpha == 0. && *beta == 1.)) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set  LENX  and  LENY, the lengths of the vectors x and y, and set */
+ /*     up the start points in  X  and  Y. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 	lenx = *n;
+ 	leny = *m;
+     } else {
+@@ -726,10 +724,10 @@
+ 	}
+     }
+     if (*alpha == 0.) {
+-	return 0;
++	return;
+     }
+     kup1 = *ku + 1;
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  y := alpha*A*x + y. */
+ 
+@@ -827,7 +825,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of DGBMV . */
+ 
+@@ -838,7 +836,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_real *alpha, const bla_real *a, const bla_integer *lda, const bla_real *x, const bla_integer * incx, const bla_real *beta, bla_real *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(s,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_real *alpha, const bla_real *a, const bla_integer *lda, const bla_real *x, const bla_integer * incx, const bla_real *beta, bla_real *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6;
+@@ -849,7 +847,7 @@
+     bla_integer lenx, leny, i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_integer kup1;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -991,8 +989,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "T", (
+-	    ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (ftnlen)1)
++    if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans, "T") && ! PASTEF77(lsame)(trans, "C")
+ 	    ) {
+ 	info = 1;
+     } else if (*m < 0) {
+@@ -1012,19 +1009,19 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("SGBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*m == 0 || *n == 0 || (*alpha == 0.f && *beta == 1.f)) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set  LENX  and  LENY, the lengths of the vectors x and y, and set */
+ /*     up the start points in  X  and  Y. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 	lenx = *n;
+ 	leny = *m;
+     } else {
+@@ -1082,10 +1079,10 @@
+ 	}
+     }
+     if (*alpha == 0.f) {
+-	return 0;
++	return;
+     }
+     kup1 = *ku + 1;
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  y := alpha*A*x + y. */
+ 
+@@ -1183,7 +1180,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of SGBMV . */
+ 
+@@ -1194,7 +1191,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(z,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_dcomplex *alpha, const bla_dcomplex *a, const bla_integer *lda, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *beta, bla_dcomplex * y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(z,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_dcomplex *alpha, const bla_dcomplex *a, const bla_integer *lda, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *beta, bla_dcomplex * y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5, i__6;
+@@ -1209,7 +1206,7 @@
+     bla_integer lenx, leny, i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical noconj;
+     bla_integer kup1;
+ 
+@@ -1356,8 +1353,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "T", (
+-	    ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (ftnlen)1)
++    if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans, "T") && ! PASTEF77(lsame)(trans, "C")
+ 	    ) {
+ 	info = 1;
+     } else if (*m < 0) {
+@@ -1377,22 +1373,22 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("ZGBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*m == 0 || *n == 0 || (bli_zreal(*alpha) == 0. && bli_zimag(*alpha) == 0. && (bli_zreal(*beta) ==
+ 	    1. && bli_zimag(*beta) == 0.))) {
+-	return 0;
++	return;
+     }
+ 
+-    noconj = PASTEF77(lsame)(trans, "T", (ftnlen)1, (ftnlen)1);
++    noconj = PASTEF77(lsame)(trans, "T");
+ 
+ /*     Set  LENX  and  LENY, the lengths of the vectors x and y, and set */
+ /*     up the start points in  X  and  Y. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 	lenx = *n;
+ 	leny = *m;
+     } else {
+@@ -1458,10 +1454,10 @@
+ 	}
+     }
+     if (bli_zreal(*alpha) == 0. && bli_zimag(*alpha) == 0.) {
+-	return 0;
++	return;
+     }
+     kup1 = *ku + 1;
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  y := alpha*A*x + y. */
+ 
+@@ -1624,7 +1620,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of ZGBMV . */
+ 
+diff --git a/frame/compat/f2c/bla_gbmv.h b/frame/compat/f2c/bla_gbmv.h
+index 67b9e5c..672aea4 100644
+--- a/frame/compat/f2c/bla_gbmv.h
++++ b/frame/compat/f2c/bla_gbmv.h
+@@ -34,9 +34,9 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(c,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_scomplex *alpha, const bla_scomplex *a, const bla_integer *lda, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy);
+-BLIS_EXPORT_BLAS int PASTEF77(d,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_double *alpha, const bla_double *a, const bla_integer *lda, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy);
+-BLIS_EXPORT_BLAS int PASTEF77(s,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_real *alpha, const bla_real *a, const bla_integer *lda, const bla_real *x, const bla_integer * incx, const bla_real *beta, bla_real *y, const bla_integer *incy);
+-BLIS_EXPORT_BLAS int PASTEF77(z,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_dcomplex *alpha, const bla_dcomplex *a, const bla_integer *lda, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *beta, bla_dcomplex * y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(c,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_scomplex *alpha, const bla_scomplex *a, const bla_integer *lda, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(d,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_double *alpha, const bla_double *a, const bla_integer *lda, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(s,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_real *alpha, const bla_real *a, const bla_integer *lda, const bla_real *x, const bla_integer * incx, const bla_real *beta, bla_real *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(z,gbmv)(const bla_character *trans, const bla_integer *m, const bla_integer *n, const bla_integer *kl, const bla_integer *ku, const bla_dcomplex *alpha, const bla_dcomplex *a, const bla_integer *lda, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *beta, bla_dcomplex * y, const bla_integer *incy);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_hbmv.c b/frame/compat/f2c/bla_hbmv.c
+index 6c3f45f..c5a7e72 100644
+--- a/frame/compat/f2c/bla_hbmv.c
++++ b/frame/compat/f2c/bla_hbmv.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(c,hbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_scomplex * alpha, const bla_scomplex *a, const bla_integer *lda, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(c,hbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_scomplex * alpha, const bla_scomplex *a, const bla_integer *lda, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+@@ -57,7 +57,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -204,8 +204,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -220,14 +219,14 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("CHBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || (bli_creal(*alpha) == 0.f && bli_cimag(*alpha) == 0.f && (bli_creal(*beta) == 1.f &&
+ 	    bli_cimag(*beta) == 0.f))) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in  X  and  Y. */
+@@ -291,9 +290,9 @@
+ 	}
+     }
+     if (bli_creal(*alpha) == 0.f && bli_cimag(*alpha) == 0.f) {
+-	return 0;
++	return;
+     }
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  y  when upper triangle of A is stored. */
+ 
+@@ -476,7 +475,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of CHBMV . */
+ 
+@@ -487,7 +486,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(z,hbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_dcomplex *alpha, const bla_dcomplex *a, const bla_integer *lda, const bla_dcomplex *x, const bla_integer * incx, const bla_dcomplex *beta, bla_dcomplex *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(z,hbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_dcomplex *alpha, const bla_dcomplex *a, const bla_integer *lda, const bla_dcomplex *x, const bla_integer * incx, const bla_dcomplex *beta, bla_dcomplex *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+@@ -503,7 +502,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -650,8 +649,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -666,14 +664,14 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("ZHBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || (bli_zreal(*alpha) == 0. && bli_zimag(*alpha) == 0. && (bli_zreal(*beta) == 1. &&
+ 	    bli_zimag(*beta) == 0.))) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in  X  and  Y. */
+@@ -737,9 +735,9 @@
+ 	}
+     }
+     if (bli_zreal(*alpha) == 0. && bli_zimag(*alpha) == 0.) {
+-	return 0;
++	return;
+     }
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  y  when upper triangle of A is stored. */
+ 
+@@ -922,7 +920,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of ZHBMV . */
+ 
+diff --git a/frame/compat/f2c/bla_hbmv.h b/frame/compat/f2c/bla_hbmv.h
+index cf610ba..fbbdfb4 100644
+--- a/frame/compat/f2c/bla_hbmv.h
++++ b/frame/compat/f2c/bla_hbmv.h
+@@ -34,7 +34,7 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(c,hbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_scomplex *alpha, const bla_scomplex *a, const bla_integer *lda, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy);
+-BLIS_EXPORT_BLAS int PASTEF77(z,hbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_dcomplex *alpha, const bla_dcomplex *a, const bla_integer *lda, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *beta, bla_dcomplex *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(c,hbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_scomplex *alpha, const bla_scomplex *a, const bla_integer *lda, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(z,hbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_dcomplex *alpha, const bla_dcomplex *a, const bla_integer *lda, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *beta, bla_dcomplex *y, const bla_integer *incy);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_hpmv.c b/frame/compat/f2c/bla_hpmv.c
+index a2b9ab1..116aae7 100644
+--- a/frame/compat/f2c/bla_hpmv.c
++++ b/frame/compat/f2c/bla_hpmv.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(c,hpmv)(const bla_character *uplo, const bla_integer *n, const bla_scomplex *alpha, const bla_scomplex * ap, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(c,hpmv)(const bla_character *uplo, const bla_integer *n, const bla_scomplex *alpha, const bla_scomplex * ap, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4, i__5;
+@@ -57,7 +57,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -168,8 +168,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -180,14 +179,14 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("CHPMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || (bli_creal(*alpha) == 0.f && bli_cimag(*alpha) == 0.f && (bli_creal(*beta) == 1.f &&
+ 	    bli_cimag(*beta) == 0.f))) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in  X  and  Y. */
+@@ -251,10 +250,10 @@
+ 	}
+     }
+     if (bli_creal(*alpha) == 0.f && bli_cimag(*alpha) == 0.f) {
+-	return 0;
++	return;
+     }
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  y  when AP contains the upper triangle. */
+ 
+@@ -428,7 +427,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of CHPMV . */
+ 
+@@ -439,7 +438,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(z,hpmv)(const bla_character *uplo, const bla_integer *n, const bla_dcomplex *alpha, const bla_dcomplex *ap, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *beta, bla_dcomplex *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(z,hpmv)(const bla_character *uplo, const bla_integer *n, const bla_dcomplex *alpha, const bla_dcomplex *ap, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *beta, bla_dcomplex *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4, i__5;
+@@ -455,7 +454,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -566,8 +565,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -578,14 +576,14 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("ZHPMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || (bli_zreal(*alpha) == 0. && bli_zimag(*alpha) == 0. && (bli_zreal(*beta) == 1. &&
+ 	    bli_zimag(*beta) == 0.))) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in  X  and  Y. */
+@@ -649,10 +647,10 @@
+ 	}
+     }
+     if (bli_zreal(*alpha) == 0. && bli_zimag(*alpha) == 0.) {
+-	return 0;
++	return;
+     }
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  y  when AP contains the upper triangle. */
+ 
+@@ -826,7 +824,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of ZHPMV . */
+ 
+diff --git a/frame/compat/f2c/bla_hpmv.h b/frame/compat/f2c/bla_hpmv.h
+index 24b1a19..17674e7 100644
+--- a/frame/compat/f2c/bla_hpmv.h
++++ b/frame/compat/f2c/bla_hpmv.h
+@@ -34,7 +34,7 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(c,hpmv)(const bla_character *uplo, const bla_integer *n, const bla_scomplex *alpha, const bla_scomplex *ap, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy);
+-BLIS_EXPORT_BLAS int PASTEF77(z,hpmv)(const bla_character *uplo, const bla_integer *n, const bla_dcomplex *alpha, const bla_dcomplex *ap, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *beta, bla_dcomplex *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(c,hpmv)(const bla_character *uplo, const bla_integer *n, const bla_scomplex *alpha, const bla_scomplex *ap, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *beta, bla_scomplex *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(z,hpmv)(const bla_character *uplo, const bla_integer *n, const bla_dcomplex *alpha, const bla_dcomplex *ap, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *beta, bla_dcomplex *y, const bla_integer *incy);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_hpr.c b/frame/compat/f2c/bla_hpr.c
+index 43f2934..a2edcd4 100644
+--- a/frame/compat/f2c/bla_hpr.c
++++ b/frame/compat/f2c/bla_hpr.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(c,hpr)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_scomplex *x, const bla_integer *incx, bla_scomplex *ap)
++/* Subroutine */ void PASTEF77(c,hpr)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_scomplex *x, const bla_integer *incx, bla_scomplex *ap)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4, i__5;
+@@ -57,7 +57,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -155,8 +155,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -165,13 +164,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("CHPR  ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || *alpha == 0.f) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set the start point in X if the increment is not unity. */
+@@ -186,7 +185,7 @@
+ /*     are accessed sequentially with one pass through AP. */
+ 
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  A  when upper triangle is stored in AP. */
+ 
+@@ -342,7 +341,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of CHPR  . */
+ 
+@@ -353,7 +352,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(z,hpr)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_dcomplex *x, const bla_integer *incx, bla_dcomplex *ap)
++/* Subroutine */ void PASTEF77(z,hpr)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_dcomplex *x, const bla_integer *incx, bla_dcomplex *ap)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4, i__5;
+@@ -369,7 +368,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -467,8 +466,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -477,13 +475,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("ZHPR  ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || *alpha == 0.) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set the start point in X if the increment is not unity. */
+@@ -498,7 +496,7 @@
+ /*     are accessed sequentially with one pass through AP. */
+ 
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  A  when upper triangle is stored in AP. */
+ 
+@@ -654,7 +652,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of ZHPR  . */
+ 
+diff --git a/frame/compat/f2c/bla_hpr.h b/frame/compat/f2c/bla_hpr.h
+index 1d4bb56..036a67b 100644
+--- a/frame/compat/f2c/bla_hpr.h
++++ b/frame/compat/f2c/bla_hpr.h
+@@ -34,7 +34,7 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(c,hpr)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_scomplex *x, const bla_integer *incx, bla_scomplex *ap);
+-BLIS_EXPORT_BLAS int PASTEF77(z,hpr)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_dcomplex *x, const bla_integer *incx, bla_dcomplex *ap);
++BLIS_EXPORT_BLAS void PASTEF77(c,hpr)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_scomplex *x, const bla_integer *incx, bla_scomplex *ap);
++BLIS_EXPORT_BLAS void PASTEF77(z,hpr)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_dcomplex *x, const bla_integer *incx, bla_dcomplex *ap);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_hpr2.c b/frame/compat/f2c/bla_hpr2.c
+index db366fe..42825ba 100644
+--- a/frame/compat/f2c/bla_hpr2.c
++++ b/frame/compat/f2c/bla_hpr2.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(c,hpr2)(const bla_character *uplo, const bla_integer *n, const bla_scomplex *alpha, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *y, const bla_integer *incy, bla_scomplex *ap)
++/* Subroutine */ void PASTEF77(c,hpr2)(const bla_character *uplo, const bla_integer *n, const bla_scomplex *alpha, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *y, const bla_integer *incy, bla_scomplex *ap)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4, i__5, i__6;
+@@ -57,7 +57,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, iy, jx = 0, jy = 0, kx = 0, ky = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -167,8 +167,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -179,13 +178,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("CHPR2 ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || (bli_creal(*alpha) == 0.f && bli_cimag(*alpha) == 0.f)) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in X and Y if the increments are not both */
+@@ -210,7 +209,7 @@
+ /*     are accessed sequentially with one pass through AP. */
+ 
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  A  when upper triangle is stored in AP. */
+ 
+@@ -418,7 +417,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of CHPR2 . */
+ 
+@@ -429,7 +428,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(z,hpr2)(const bla_character *uplo, const bla_integer *n, const bla_dcomplex *alpha, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *y, const bla_integer *incy, bla_dcomplex *ap)
++/* Subroutine */ void PASTEF77(z,hpr2)(const bla_character *uplo, const bla_integer *n, const bla_dcomplex *alpha, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *y, const bla_integer *incy, bla_dcomplex *ap)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4, i__5, i__6;
+@@ -445,7 +444,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, iy, jx = 0, jy = 0, kx = 0, ky = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -555,8 +554,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -567,13 +565,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("ZHPR2 ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || (bli_zreal(*alpha) == 0. && bli_zimag(*alpha) == 0.)) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in X and Y if the increments are not both */
+@@ -598,7 +596,7 @@
+ /*     are accessed sequentially with one pass through AP. */
+ 
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  A  when upper triangle is stored in AP. */
+ 
+@@ -806,7 +804,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of ZHPR2 . */
+ 
+diff --git a/frame/compat/f2c/bla_hpr2.h b/frame/compat/f2c/bla_hpr2.h
+index 91bbe37..753d7d4 100644
+--- a/frame/compat/f2c/bla_hpr2.h
++++ b/frame/compat/f2c/bla_hpr2.h
+@@ -34,7 +34,7 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(c,hpr2)(const bla_character *uplo, const bla_integer *n, const bla_scomplex *alpha, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *y, const bla_integer *incy, bla_scomplex *ap);
+-BLIS_EXPORT_BLAS int PASTEF77(z,hpr2)(const bla_character *uplo, const bla_integer *n, const bla_dcomplex *alpha, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *y, const bla_integer *incy, bla_dcomplex *ap);
++BLIS_EXPORT_BLAS void PASTEF77(c,hpr2)(const bla_character *uplo, const bla_integer *n, const bla_scomplex *alpha, const bla_scomplex *x, const bla_integer *incx, const bla_scomplex *y, const bla_integer *incy, bla_scomplex *ap);
++BLIS_EXPORT_BLAS void PASTEF77(z,hpr2)(const bla_character *uplo, const bla_integer *n, const bla_dcomplex *alpha, const bla_dcomplex *x, const bla_integer *incx, const bla_dcomplex *y, const bla_integer *incy, bla_dcomplex *ap);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_lsame.c b/frame/compat/f2c/bla_lsame.c
+index 8fdc7df..4732009 100644
+--- a/frame/compat/f2c/bla_lsame.c
++++ b/frame/compat/f2c/bla_lsame.c
+@@ -43,9 +43,9 @@
+ 
+ 
+ #ifdef LAPACK_ILP64
+-long PASTEF77(lsame)(const char *ca, const char *cb, long ca_len, long cb_len)
++long PASTEF77(lsame)(const char *ca, const char *cb)
+ #else
+-int PASTEF77(lsame)(const char *ca, const char *cb, int ca_len, int cb_len)
++int PASTEF77(lsame)(const char *ca, const char *cb)
+ #endif
+ {
+     /* System generated locals */
+diff --git a/frame/compat/f2c/bla_lsame.h b/frame/compat/f2c/bla_lsame.h
+index 83acd7d..a143ea2 100644
+--- a/frame/compat/f2c/bla_lsame.h
++++ b/frame/compat/f2c/bla_lsame.h
+@@ -35,9 +35,9 @@
+ #if 1
+ 
+ #ifdef LAPACK_ILP64
+-long PASTEF77(lsame)(const char *ca, const char *cb, long ca_len, long cb_len);
++long PASTEF77(lsame)(const char *ca, const char *cb);
+ #else
+-BLIS_EXPORT_BLAS int PASTEF77(lsame)(const char *ca, const char *cb, int ca_len, int cb_len);
++BLIS_EXPORT_BLAS int PASTEF77(lsame)(const char *ca, const char *cb);
+ #endif
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_rot.c b/frame/compat/f2c/bla_rot.c
+index e120c5e..6fdae62 100644
+--- a/frame/compat/f2c/bla_rot.c
++++ b/frame/compat/f2c/bla_rot.c
+@@ -42,7 +42,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,rot)(const bla_integer *n, bla_real *sx, const bla_integer *incx, bla_real *sy, const bla_integer *incy, const bla_real *c__, const bla_real *s)
++/* Subroutine */ void PASTEF77(s,rot)(const bla_integer *n, bla_real *sx, const bla_integer *incx, bla_real *sy, const bla_integer *incy, const bla_real *c__, const bla_real *s)
+ {
+     /* System generated locals */
+     bla_integer i__1;
+@@ -64,7 +64,7 @@
+ 
+     /* Function Body */
+     if (*n <= 0) {
+-	return 0;
++	return;
+     }
+     if (*incx == 1 && *incy == 1) {
+ 	goto L20;
+@@ -90,7 +90,7 @@
+ 	iy += *incy;
+ /* L10: */
+     }
+-    return 0;
++    return;
+ 
+ /*       code for both increments equal to 1 */
+ 
+@@ -102,7 +102,7 @@ L20:
+ 	sx[i__] = stemp;
+ /* L30: */
+     }
+-    return 0;
++    return;
+ } /* srot_ */
+ 
+ /* drot.f -- translated by f2c (version 19991025).
+@@ -110,7 +110,7 @@ L20:
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,rot)(const bla_integer *n, bla_double *dx, const bla_integer *incx, bla_double *dy, const bla_integer *incy, const bla_double *c__, const bla_double *s)
++/* Subroutine */ void PASTEF77(d,rot)(const bla_integer *n, bla_double *dx, const bla_integer *incx, bla_double *dy, const bla_integer *incy, const bla_double *c__, const bla_double *s)
+ {
+     /* System generated locals */
+     bla_integer i__1;
+@@ -132,7 +132,7 @@ L20:
+ 
+     /* Function Body */
+     if (*n <= 0) {
+-	return 0;
++	return;
+     }
+     if (*incx == 1 && *incy == 1) {
+ 	goto L20;
+@@ -158,7 +158,7 @@ L20:
+ 	iy += *incy;
+ /* L10: */
+     }
+-    return 0;
++    return;
+ 
+ /*       code for both increments equal to 1 */
+ 
+@@ -170,7 +170,7 @@ L20:
+ 	dx[i__] = dtemp;
+ /* L30: */
+     }
+-    return 0;
++    return;
+ } /* drot_ */
+ 
+ /* csrot.f -- translated by f2c (version 19991025).
+@@ -178,7 +178,7 @@ L20:
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(cs,rot)(const bla_integer *n, bla_scomplex *cx, const bla_integer *incx, bla_scomplex *cy, const bla_integer *incy, const bla_real *c__, const bla_real *s)
++/* Subroutine */ void PASTEF77(cs,rot)(const bla_integer *n, bla_scomplex *cx, const bla_integer *incx, bla_scomplex *cy, const bla_integer *incy, const bla_real *c__, const bla_real *s)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4;
+@@ -201,7 +201,7 @@ L20:
+ 
+     /* Function Body */
+     if (*n <= 0) {
+-	return 0;
++	return;
+     }
+     if (*incx == 1 && *incy == 1) {
+ 	goto L20;
+@@ -239,7 +239,7 @@ L20:
+ 	iy += *incy;
+ /* L10: */
+     }
+-    return 0;
++    return;
+ 
+ /*       code for both increments equal to 1 */
+ 
+@@ -263,7 +263,7 @@ L20:
+ 	bli_tsets( c,c, (bli_creal(ctemp)), (bli_cimag(ctemp)), cx[i__2] );
+ /* L30: */
+     }
+-    return 0;
++    return;
+ } /* csrot_ */
+ 
+ /* zdrot.f -- translated by f2c (version 19991025).
+@@ -271,7 +271,7 @@ L20:
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(zd,rot)(const bla_integer *n, bla_dcomplex *zx, const bla_integer *incx, bla_dcomplex *zy, const bla_integer *incy, const bla_double *c__, const bla_double *s)
++/* Subroutine */ void PASTEF77(zd,rot)(const bla_integer *n, bla_dcomplex *zx, const bla_integer *incx, bla_dcomplex *zy, const bla_integer *incy, const bla_double *c__, const bla_double *s)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4;
+@@ -294,7 +294,7 @@ L20:
+ 
+     /* Function Body */
+     if (*n <= 0) {
+-	return 0;
++	return;
+     }
+     if (*incx == 1 && *incy == 1) {
+ 	goto L20;
+@@ -332,7 +332,7 @@ L20:
+ 	iy += *incy;
+ /* L10: */
+     }
+-    return 0;
++    return;
+ 
+ /*       code for both increments equal to 1 */
+ 
+@@ -356,7 +356,7 @@ L20:
+ 	bli_tsets( z,z, (bli_zreal(ztemp)), (bli_zimag(ztemp)), zx[i__2] );
+ /* L30: */
+     }
+-    return 0;
++    return;
+ } /* zdrot_ */
+ 
+ 
+@@ -371,7 +371,7 @@ L20:
+ 
+ 		http://www.netlib.org/f2c/libf2c.zip
+ */
+-/* Subroutine */ int PASTEF77(c,rot)(const bla_integer *n, bla_scomplex *cx, const bla_integer *incx, bla_scomplex *cy, const bla_integer *incy, const bla_real *c__, const bla_scomplex *s)
++/* Subroutine */ void PASTEF77(c,rot)(const bla_integer *n, bla_scomplex *cx, const bla_integer *incx, bla_scomplex *cy, const bla_integer *incy, const bla_real *c__, const bla_scomplex *s)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4;
+@@ -388,7 +388,7 @@ L20:
+ 
+     /* Function Body */
+     if (*n <= 0) {
+-	return 0;
++	return;
+     }
+     if (*incx == 1 && *incy == 1) {
+ 	goto L20;
+@@ -507,7 +507,7 @@ L20:
+ 	iy += *incy;
+ /* L10: */
+     }
+-    return 0;
++    return;
+ 
+ /*     Code for both increments equal to 1 */
+ 
+@@ -613,7 +613,7 @@ L20:
+ #endif
+ /* L30: */
+     }
+-    return 0;
++    return;
+ } /* crot_ */
+ 
+ 
+@@ -628,7 +628,7 @@ L20:
+ 
+ 		http://www.netlib.org/f2c/libf2c.zip
+ */
+-/* Subroutine */ int PASTEF77(z,rot)(const bla_integer *n, bla_dcomplex *cx, const bla_integer *incx, bla_dcomplex *cy, const bla_integer *incy, const bla_double *c__, const bla_dcomplex *s)
++/* Subroutine */ void PASTEF77(z,rot)(const bla_integer *n, bla_dcomplex *cx, const bla_integer *incx, bla_dcomplex *cy, const bla_integer *incy, const bla_double *c__, const bla_dcomplex *s)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4;
+@@ -645,7 +645,7 @@ L20:
+ 
+     /* Function Body */
+     if (*n <= 0) {
+-	return 0;
++	return;
+     }
+     if (*incx == 1 && *incy == 1) {
+ 	goto L20;
+@@ -764,7 +764,7 @@ L20:
+ 	iy += *incy;
+ /* L10: */
+     }
+-    return 0;
++    return;
+ 
+ /*     Code for both increments equal to 1 */
+ 
+@@ -870,7 +870,7 @@ L20:
+ #endif
+ /* L30: */
+     }
+-    return 0;
++    return;
+ } /* zrot_ */
+ 
+ 
+diff --git a/frame/compat/f2c/bla_rot.h b/frame/compat/f2c/bla_rot.h
+index 4e6aead..ec54b1a 100644
+--- a/frame/compat/f2c/bla_rot.h
++++ b/frame/compat/f2c/bla_rot.h
+@@ -34,11 +34,11 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(s,rot)(const bla_integer *n, bla_real *sx, const bla_integer *incx, bla_real *sy, const bla_integer *incy, const bla_real *c__, const bla_real *s);
+-BLIS_EXPORT_BLAS int PASTEF77(d,rot)(const bla_integer *n, bla_double *dx, const bla_integer *incx, bla_double *dy, const bla_integer *incy, const bla_double *c__, const bla_double *s);
+-BLIS_EXPORT_BLAS int PASTEF77(cs,rot)(const bla_integer *n, bla_scomplex *cx, const bla_integer *incx, bla_scomplex *cy, const bla_integer *incy, const bla_real *c__, const bla_real *s);
+-BLIS_EXPORT_BLAS int PASTEF77(zd,rot)(const bla_integer *n, bla_dcomplex *zx, const bla_integer *incx, bla_dcomplex *zy, const bla_integer *incy, const bla_double *c__, const bla_double *s);
+-BLIS_EXPORT_BLAS int PASTEF77(c,rot)(const bla_integer *n, bla_scomplex *cx, const bla_integer *incx, bla_scomplex *cy, const bla_integer *incy, const bla_real *c__, const bla_scomplex *s);
+-BLIS_EXPORT_BLAS int PASTEF77(z,rot)(const bla_integer *n, bla_dcomplex *cx, const bla_integer *incx, bla_dcomplex *cy, const bla_integer *incy, const bla_double *c__, const bla_dcomplex *s);
++BLIS_EXPORT_BLAS void PASTEF77(s,rot)(const bla_integer *n, bla_real *sx, const bla_integer *incx, bla_real *sy, const bla_integer *incy, const bla_real *c__, const bla_real *s);
++BLIS_EXPORT_BLAS void PASTEF77(d,rot)(const bla_integer *n, bla_double *dx, const bla_integer *incx, bla_double *dy, const bla_integer *incy, const bla_double *c__, const bla_double *s);
++BLIS_EXPORT_BLAS void PASTEF77(cs,rot)(const bla_integer *n, bla_scomplex *cx, const bla_integer *incx, bla_scomplex *cy, const bla_integer *incy, const bla_real *c__, const bla_real *s);
++BLIS_EXPORT_BLAS void PASTEF77(zd,rot)(const bla_integer *n, bla_dcomplex *zx, const bla_integer *incx, bla_dcomplex *zy, const bla_integer *incy, const bla_double *c__, const bla_double *s);
++BLIS_EXPORT_BLAS void PASTEF77(c,rot)(const bla_integer *n, bla_scomplex *cx, const bla_integer *incx, bla_scomplex *cy, const bla_integer *incy, const bla_real *c__, const bla_scomplex *s);
++BLIS_EXPORT_BLAS void PASTEF77(z,rot)(const bla_integer *n, bla_dcomplex *cx, const bla_integer *incx, bla_dcomplex *cy, const bla_integer *incy, const bla_double *c__, const bla_dcomplex *s);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_rotg.c b/frame/compat/f2c/bla_rotg.c
+index 48a40d4..1e31057 100644
+--- a/frame/compat/f2c/bla_rotg.c
++++ b/frame/compat/f2c/bla_rotg.c
+@@ -45,7 +45,7 @@
+ 
+ static bla_real sc_b4 = 1.f;
+ 
+-/* Subroutine */ int PASTEF77(s,rotg)(bla_real *sa, bla_real *sb, bla_real *c__, bla_real *s)
++/* Subroutine */ void PASTEF77(s,rotg)(bla_real *sa, bla_real *sb, bla_real *c__, bla_real *s)
+ {
+     /* System generated locals */
+     bla_real r__1, r__2;
+@@ -93,7 +93,7 @@ L10:
+ L20:
+     *sa = r__;
+     *sb = z__;
+-    return 0;
++    return;
+ } /* srotg_ */
+ 
+ /* drotg.f -- translated by f2c (version 19991025).
+@@ -105,7 +105,7 @@ L20:
+ 
+ static bla_double dc_b4 = 1.;
+ 
+-/* Subroutine */ int PASTEF77(d,rotg)(bla_double *da, bla_double *db, bla_double *c__, bla_double *s)
++/* Subroutine */ void PASTEF77(d,rotg)(bla_double *da, bla_double *db, bla_double *c__, bla_double *s)
+ {
+     /* System generated locals */
+     bla_double d__1, d__2;
+@@ -153,7 +153,7 @@ L10:
+ L20:
+     *da = r__;
+     *db = z__;
+-    return 0;
++    return;
+ } /* drotg_ */
+ 
+ /* crotg.f -- translated by f2c (version 19991025).
+@@ -161,7 +161,7 @@ L20:
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(c,rotg)(bla_scomplex *ca, bla_scomplex *cb, bla_real *c__, bla_scomplex *s)
++/* Subroutine */ void PASTEF77(c,rotg)(bla_scomplex *ca, bla_scomplex *cb, bla_real *c__, bla_scomplex *s)
+ {
+     /* System generated locals */
+     bla_real r__1, r__2;
+@@ -203,7 +203,7 @@ L10:
+     bli_tsets( c,c, (norm * bli_creal(alpha)), (norm * bli_cimag(alpha)), q__1 );
+     bli_tsets( c,c, bli_creal(q__1), bli_cimag(q__1), *ca );
+ L20:
+-    return 0;
++    return;
+ } /* crotg_ */
+ 
+ /* zrotg.f -- translated by f2c (version 19991025).
+@@ -211,7 +211,7 @@ L20:
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(z,rotg)(bla_dcomplex *ca, bla_dcomplex *cb, bla_double *c__, bla_dcomplex *s)
++/* Subroutine */ void PASTEF77(z,rotg)(bla_dcomplex *ca, bla_dcomplex *cb, bla_double *c__, bla_dcomplex *s)
+ {
+     /* System generated locals */
+     bla_double d__1, d__2;
+@@ -257,7 +257,7 @@ L10:
+     bli_tsets( z,z, (norm * bli_zreal(alpha)), (norm * bli_zimag(alpha)), z__1 );
+     bli_tsets( z,z, bli_zreal(z__1), bli_zimag(z__1), *ca );
+ L20:
+-    return 0;
++    return;
+ } /* zrotg_ */
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_rotg.h b/frame/compat/f2c/bla_rotg.h
+index e9cc9ce..3436b8a 100644
+--- a/frame/compat/f2c/bla_rotg.h
++++ b/frame/compat/f2c/bla_rotg.h
+@@ -34,9 +34,9 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(s,rotg)(bla_real *sa, bla_real *sb, bla_real *c__, bla_real *s);
+-BLIS_EXPORT_BLAS int PASTEF77(d,rotg)(bla_double *da, bla_double *db, bla_double *c__, bla_double *s);
+-BLIS_EXPORT_BLAS int PASTEF77(c,rotg)(bla_scomplex *ca, bla_scomplex *cb, bla_real *c__, bla_scomplex *s);
+-BLIS_EXPORT_BLAS int PASTEF77(z,rotg)(bla_dcomplex *ca, bla_dcomplex *cb, bla_double *c__, bla_dcomplex *s);
++BLIS_EXPORT_BLAS void PASTEF77(s,rotg)(bla_real *sa, bla_real *sb, bla_real *c__, bla_real *s);
++BLIS_EXPORT_BLAS void PASTEF77(d,rotg)(bla_double *da, bla_double *db, bla_double *c__, bla_double *s);
++BLIS_EXPORT_BLAS void PASTEF77(c,rotg)(bla_scomplex *ca, bla_scomplex *cb, bla_real *c__, bla_scomplex *s);
++BLIS_EXPORT_BLAS void PASTEF77(z,rotg)(bla_dcomplex *ca, bla_dcomplex *cb, bla_double *c__, bla_dcomplex *s);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_rotm.c b/frame/compat/f2c/bla_rotm.c
+index 003dea7..e9a8012 100644
+--- a/frame/compat/f2c/bla_rotm.c
++++ b/frame/compat/f2c/bla_rotm.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,rotm)(const bla_integer *n, bla_real *sx, const bla_integer *incx, bla_real *sy, const bla_integer *incy, const bla_real *sparam)
++/* Subroutine */ void PASTEF77(s,rotm)(const bla_integer *n, bla_real *sx, const bla_integer *incx, bla_real *sy, const bla_integer *incy, const bla_real *sparam)
+ {
+     /* Initialized data */
+ 
+@@ -199,7 +199,7 @@ L120:
+ /* L130: */
+     }
+ L140:
+-    return 0;
++    return;
+ } /* srotm_ */
+ 
+ /* drotm.f -- translated by f2c (version 19991025).
+@@ -207,7 +207,7 @@ L140:
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,rotm)(const bla_integer *n, bla_double *dx, const bla_integer *incx, bla_double *dy, const bla_integer *incy, const bla_double *dparam)
++/* Subroutine */ void PASTEF77(d,rotm)(const bla_integer *n, bla_double *dx, const bla_integer *incx, bla_double *dy, const bla_integer *incy, const bla_double *dparam)
+ {
+     /* Initialized data */
+ 
+@@ -365,7 +365,7 @@ L120:
+ /* L130: */
+     }
+ L140:
+-    return 0;
++    return;
+ } /* drotm_ */
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_rotm.h b/frame/compat/f2c/bla_rotm.h
+index 5692209..2454e86 100644
+--- a/frame/compat/f2c/bla_rotm.h
++++ b/frame/compat/f2c/bla_rotm.h
+@@ -34,7 +34,7 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(s,rotm)(const bla_integer *n, bla_real *sx, const bla_integer *incx, bla_real *sy, const bla_integer *incy, const bla_real *sparam);
+-BLIS_EXPORT_BLAS int PASTEF77(d,rotm)(const bla_integer *n, bla_double *dx, const bla_integer *incx, bla_double *dy, const bla_integer *incy, const bla_double *dparam);
++BLIS_EXPORT_BLAS void PASTEF77(s,rotm)(const bla_integer *n, bla_real *sx, const bla_integer *incx, bla_real *sy, const bla_integer *incy, const bla_real *sparam);
++BLIS_EXPORT_BLAS void PASTEF77(d,rotm)(const bla_integer *n, bla_double *dx, const bla_integer *incx, bla_double *dy, const bla_integer *incy, const bla_double *dparam);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_rotmg.c b/frame/compat/f2c/bla_rotmg.c
+index 11ccc6f..7d4511c 100644
+--- a/frame/compat/f2c/bla_rotmg.c
++++ b/frame/compat/f2c/bla_rotmg.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,rotmg)(bla_real *sd1, bla_real *sd2, bla_real *sx1, const bla_real *sy1, bla_real *sparam)
++/* Subroutine */ void PASTEF77(s,rotmg)(bla_real *sd1, bla_real *sd2, bla_real *sx1, const bla_real *sy1, bla_real *sparam)
+ {
+     /* Initialized data */
+ 
+@@ -273,7 +273,7 @@ L250:
+     sparam[5] = sh22;
+ L260:
+     sparam[1] = sflag;
+-    return 0;
++    return;
+ } /* srotmg_ */
+ 
+ /* drotmg.f -- translated by f2c (version 19991025).
+@@ -281,7 +281,7 @@ L260:
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,rotmg)(bla_double *dd1, bla_double *dd2, bla_double *dx1, const bla_double *dy1, bla_double *dparam)
++/* Subroutine */ void PASTEF77(d,rotmg)(bla_double *dd1, bla_double *dd2, bla_double *dx1, const bla_double *dy1, bla_double *dparam)
+ {
+     /* Initialized data */
+ 
+@@ -513,7 +513,7 @@ L250:
+     dparam[5] = dh22;
+ L260:
+     dparam[1] = dflag;
+-    return 0;
++    return;
+ } /* drotmg_ */
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_rotmg.h b/frame/compat/f2c/bla_rotmg.h
+index 54d4295..d388630 100644
+--- a/frame/compat/f2c/bla_rotmg.h
++++ b/frame/compat/f2c/bla_rotmg.h
+@@ -34,7 +34,7 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(s,rotmg)(bla_real *sd1, bla_real *sd2, bla_real *sx1, const bla_real *sy1, bla_real *sparam);
+-BLIS_EXPORT_BLAS int PASTEF77(d,rotmg)(bla_double *dd1, bla_double *dd2, bla_double *dx1, const bla_double *dy1, bla_double *dparam);
++BLIS_EXPORT_BLAS void PASTEF77(s,rotmg)(bla_real *sd1, bla_real *sd2, bla_real *sx1, const bla_real *sy1, bla_real *sparam);
++BLIS_EXPORT_BLAS void PASTEF77(d,rotmg)(bla_double *dd1, bla_double *dd2, bla_double *dx1, const bla_double *dy1, bla_double *dparam);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_sbmv.c b/frame/compat/f2c/bla_sbmv.c
+index 897bd17..9cc81a1 100644
+--- a/frame/compat/f2c/bla_sbmv.c
++++ b/frame/compat/f2c/bla_sbmv.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,sbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_double *alpha, const bla_double *a, const bla_integer *lda, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(d,sbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_double *alpha, const bla_double *a, const bla_integer *lda, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
+@@ -52,7 +52,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -197,8 +197,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -213,13 +212,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("DSBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || (*alpha == 0. && *beta == 1.)) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in  X  and  Y. */
+@@ -275,9 +274,9 @@
+ 	}
+     }
+     if (*alpha == 0.) {
+-	return 0;
++	return;
+     }
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  y  when upper triangle of A is stored. */
+ 
+@@ -381,7 +380,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of DSBMV . */
+ 
+@@ -392,7 +391,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,sbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_real *alpha, const bla_real *a, const bla_integer *lda, const bla_real *x, const bla_integer *incx, const bla_real *beta, bla_real *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(s,sbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_real *alpha, const bla_real *a, const bla_integer *lda, const bla_real *x, const bla_integer *incx, const bla_real *beta, bla_real *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
+@@ -403,7 +402,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -548,8 +547,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -564,13 +562,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("SSBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || (*alpha == 0.f && *beta == 1.f)) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in  X  and  Y. */
+@@ -626,9 +624,9 @@
+ 	}
+     }
+     if (*alpha == 0.f) {
+-	return 0;
++	return;
+     }
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  y  when upper triangle of A is stored. */
+ 
+@@ -732,7 +730,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of SSBMV . */
+ 
+diff --git a/frame/compat/f2c/bla_sbmv.h b/frame/compat/f2c/bla_sbmv.h
+index a23c61f..cfbbd36 100644
+--- a/frame/compat/f2c/bla_sbmv.h
++++ b/frame/compat/f2c/bla_sbmv.h
+@@ -34,7 +34,7 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(d,sbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_double *alpha, const bla_double *a, const bla_integer *lda, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy);
+-BLIS_EXPORT_BLAS int PASTEF77(s,sbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_real *alpha, const bla_real *a, const bla_integer *lda, const bla_real *x, const bla_integer *incx, const bla_real *beta, bla_real *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(d,sbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_double *alpha, const bla_double *a, const bla_integer *lda, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(s,sbmv)(const bla_character *uplo, const bla_integer *n, const bla_integer *k, const bla_real *alpha, const bla_real *a, const bla_integer *lda, const bla_real *x, const bla_integer *incx, const bla_real *beta, bla_real *y, const bla_integer *incy);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_spmv.c b/frame/compat/f2c/bla_spmv.c
+index d0f52b6..b5d69c6 100644
+--- a/frame/compat/f2c/bla_spmv.c
++++ b/frame/compat/f2c/bla_spmv.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,spmv)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *ap, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(d,spmv)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *ap, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2;
+@@ -52,7 +52,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -160,8 +160,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -172,13 +171,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("DSPMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || (*alpha == 0. && *beta == 1.)) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in  X  and  Y. */
+@@ -234,10 +233,10 @@
+ 	}
+     }
+     if (*alpha == 0.) {
+-	return 0;
++	return;
+     }
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  y  when AP contains the upper triangle. */
+ 
+@@ -331,7 +330,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of DSPMV . */
+ 
+@@ -342,7 +341,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,spmv)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *ap, const bla_real *x, const bla_integer *incx, const bla_real *beta, bla_real *y, const bla_integer *incy)
++/* Subroutine */ void PASTEF77(s,spmv)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *ap, const bla_real *x, const bla_integer *incx, const bla_real *beta, bla_real *y, const bla_integer *incy)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2;
+@@ -353,7 +352,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, iy, jx, jy, kx, ky;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -461,8 +460,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -473,13 +471,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("SSPMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || (*alpha == 0.f && *beta == 1.f)) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in  X  and  Y. */
+@@ -535,10 +533,10 @@
+ 	}
+     }
+     if (*alpha == 0.f) {
+-	return 0;
++	return;
+     }
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  y  when AP contains the upper triangle. */
+ 
+@@ -632,7 +630,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of SSPMV . */
+ 
+diff --git a/frame/compat/f2c/bla_spmv.h b/frame/compat/f2c/bla_spmv.h
+index 32f1fb1..8f37493 100644
+--- a/frame/compat/f2c/bla_spmv.h
++++ b/frame/compat/f2c/bla_spmv.h
+@@ -34,7 +34,7 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(d,spmv)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *ap, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy);
+-BLIS_EXPORT_BLAS int PASTEF77(s,spmv)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *ap, const bla_real *x, const bla_integer *incx, const bla_real *beta, bla_real *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(d,spmv)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *ap, const bla_double *x, const bla_integer *incx, const bla_double *beta, bla_double *y, const bla_integer *incy);
++BLIS_EXPORT_BLAS void PASTEF77(s,spmv)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *ap, const bla_real *x, const bla_integer *incx, const bla_real *beta, bla_real *y, const bla_integer *incy);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_spr.c b/frame/compat/f2c/bla_spr.c
+index 13ec9d1..4410fc5 100644
+--- a/frame/compat/f2c/bla_spr.c
++++ b/frame/compat/f2c/bla_spr.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,spr)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *x, const bla_integer *incx, bla_double *ap)
++/* Subroutine */ void PASTEF77(d,spr)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *x, const bla_integer *incx, bla_double *ap)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2;
+@@ -52,7 +52,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -146,8 +146,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -156,13 +155,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("DSPR  ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || *alpha == 0.) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set the start point in X if the increment is not unity. */
+@@ -177,7 +176,7 @@
+ /*     are accessed sequentially with one pass through AP. */
+ 
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  A  when upper triangle is stored in AP. */
+ 
+@@ -257,7 +256,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of DSPR  . */
+ 
+@@ -268,7 +267,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,spr)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *x, const bla_integer *incx, bla_real *ap)
++/* Subroutine */ void PASTEF77(s,spr)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *x, const bla_integer *incx, bla_real *ap)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2;
+@@ -279,7 +278,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -373,8 +372,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -383,13 +381,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("SSPR  ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || *alpha == 0.f) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set the start point in X if the increment is not unity. */
+@@ -404,7 +402,7 @@
+ /*     are accessed sequentially with one pass through AP. */
+ 
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  A  when upper triangle is stored in AP. */
+ 
+@@ -484,7 +482,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of SSPR  . */
+ 
+diff --git a/frame/compat/f2c/bla_spr.h b/frame/compat/f2c/bla_spr.h
+index fbb31da..ff58bb9 100644
+--- a/frame/compat/f2c/bla_spr.h
++++ b/frame/compat/f2c/bla_spr.h
+@@ -34,7 +34,7 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(d,spr)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *x, const bla_integer *incx, bla_double *ap);
+-BLIS_EXPORT_BLAS int PASTEF77(s,spr)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *x, const bla_integer *incx, bla_real *ap);
++BLIS_EXPORT_BLAS void PASTEF77(d,spr)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *x, const bla_integer *incx, bla_double *ap);
++BLIS_EXPORT_BLAS void PASTEF77(s,spr)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *x, const bla_integer *incx, bla_real *ap);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_spr2.c b/frame/compat/f2c/bla_spr2.c
+index 1f0ef17..7334dad 100644
+--- a/frame/compat/f2c/bla_spr2.c
++++ b/frame/compat/f2c/bla_spr2.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,spr2)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *x, const bla_integer *incx, const bla_double *y, const bla_integer *incy, bla_double *ap)
++/* Subroutine */ void PASTEF77(d,spr2)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *x, const bla_integer *incx, const bla_double *y, const bla_integer *incy, bla_double *ap)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2;
+@@ -52,7 +52,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, iy, jx = 0, jy = 0, kx = 0, ky = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -158,8 +158,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -170,13 +169,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("DSPR2 ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || *alpha == 0.) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in X and Y if the increments are not both */
+@@ -201,7 +200,7 @@
+ /*     are accessed sequentially with one pass through AP. */
+ 
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  A  when upper triangle is stored in AP. */
+ 
+@@ -289,7 +288,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of DSPR2 . */
+ 
+@@ -300,7 +299,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,spr2)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *x, const bla_integer *incx, const bla_real *y, const bla_integer *incy, bla_real *ap)
++/* Subroutine */ void PASTEF77(s,spr2)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *x, const bla_integer *incx, const bla_real *y, const bla_integer *incy, bla_real *ap)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2;
+@@ -311,7 +310,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, iy, jx = 0, jy = 0, kx = 0, ky = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+ 
+ /*     .. Scalar Arguments .. */
+ /*     .. Array Arguments .. */
+@@ -417,8 +416,7 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+     } else if (*n < 0) {
+ 	info = 2;
+@@ -429,13 +427,13 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("SSPR2 ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0 || *alpha == 0.f) {
+-	return 0;
++	return;
+     }
+ 
+ /*     Set up the start points in X and Y if the increments are not both */
+@@ -460,7 +458,7 @@
+ /*     are accessed sequentially with one pass through AP. */
+ 
+     kk = 1;
+-    if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(uplo, "U")) {
+ 
+ /*        Form  A  when upper triangle is stored in AP. */
+ 
+@@ -548,7 +546,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of SSPR2 . */
+ 
+diff --git a/frame/compat/f2c/bla_spr2.h b/frame/compat/f2c/bla_spr2.h
+index 89422a5..f63fc38 100644
+--- a/frame/compat/f2c/bla_spr2.h
++++ b/frame/compat/f2c/bla_spr2.h
+@@ -34,7 +34,7 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(d,spr2)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *x, const bla_integer *incx, const bla_double *y, const bla_integer *incy, bla_double *ap);
+-BLIS_EXPORT_BLAS int PASTEF77(s,spr2)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *x, const bla_integer *incx, const bla_real *y, const bla_integer *incy, bla_real *ap);
++BLIS_EXPORT_BLAS void PASTEF77(d,spr2)(const bla_character *uplo, const bla_integer *n, const bla_double *alpha, const bla_double *x, const bla_integer *incx, const bla_double *y, const bla_integer *incy, bla_double *ap);
++BLIS_EXPORT_BLAS void PASTEF77(s,spr2)(const bla_character *uplo, const bla_integer *n, const bla_real *alpha, const bla_real *x, const bla_integer *incx, const bla_real *y, const bla_integer *incy, bla_real *ap);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_tbmv.c b/frame/compat/f2c/bla_tbmv.c
+index d1d191d..e312428 100644
+--- a/frame/compat/f2c/bla_tbmv.c
++++ b/frame/compat/f2c/bla_tbmv.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(c,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_scomplex *a, const bla_integer *lda, bla_scomplex *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(c,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_scomplex *a, const bla_integer *lda, bla_scomplex *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+@@ -56,7 +56,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical noconj, nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -209,15 +209,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -230,17 +228,17 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("CTBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    noconj = PASTEF77(lsame)(trans, "T", (ftnlen)1, (ftnlen)1);
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    noconj = PASTEF77(lsame)(trans, "T");
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX   too small for descending loops. */
+@@ -254,11 +252,11 @@
+ /*     Start the operations. In this version the elements of A are */
+ /*     accessed sequentially with one pass through A. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*         Form  x := A*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -401,7 +399,7 @@
+ 
+ /*        Form  x := A'*x  or  x := conjg( A' )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -600,7 +598,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of CTBMV . */
+ 
+@@ -611,7 +609,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_double *a, const bla_integer *lda, bla_double *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(d,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_double *a, const bla_integer *lda, bla_double *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
+@@ -622,7 +620,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -775,15 +773,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -796,16 +792,16 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("DTBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX   too small for descending loops. */
+@@ -819,11 +815,11 @@
+ /*     Start the operations. In this version the elements of A are */
+ /*     accessed sequentially with one pass through A. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*         Form  x := A*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -922,7 +918,7 @@
+ 
+ /*        Form  x := A'*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -1011,7 +1007,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of DTBMV . */
+ 
+@@ -1022,7 +1018,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_real *a, const bla_integer *lda, bla_real *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(s,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_real *a, const bla_integer *lda, bla_real *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
+@@ -1033,7 +1029,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -1186,15 +1182,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -1207,16 +1201,16 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("STBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX   too small for descending loops. */
+@@ -1230,11 +1224,11 @@
+ /*     Start the operations. In this version the elements of A are */
+ /*     accessed sequentially with one pass through A. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*         Form  x := A*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -1333,7 +1327,7 @@
+ 
+ /*        Form  x := A'*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -1422,7 +1416,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of STBMV . */
+ 
+@@ -1433,7 +1427,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(z,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_dcomplex *a, const bla_integer *lda, bla_dcomplex *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(z,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_dcomplex *a, const bla_integer *lda, bla_dcomplex *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+@@ -1448,7 +1442,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical noconj, nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -1601,15 +1595,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -1622,17 +1614,17 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("ZTBMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    noconj = PASTEF77(lsame)(trans, "T", (ftnlen)1, (ftnlen)1);
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    noconj = PASTEF77(lsame)(trans, "T");
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX   too small for descending loops. */
+@@ -1646,11 +1638,11 @@
+ /*     Start the operations. In this version the elements of A are */
+ /*     accessed sequentially with one pass through A. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*         Form  x := A*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -1793,7 +1785,7 @@
+ 
+ /*        Form  x := A'*x  or  x := conjg( A' )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -1992,7 +1984,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of ZTBMV . */
+ 
+diff --git a/frame/compat/f2c/bla_tbmv.h b/frame/compat/f2c/bla_tbmv.h
+index 809dccb..be45713 100644
+--- a/frame/compat/f2c/bla_tbmv.h
++++ b/frame/compat/f2c/bla_tbmv.h
+@@ -34,9 +34,9 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(c,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_scomplex *a, const bla_integer *lda, bla_scomplex *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(d,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_double *a, const bla_integer *lda, bla_double *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(s,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_real *a, const bla_integer *lda, bla_real *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(z,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_dcomplex *a, const bla_integer *lda, bla_dcomplex *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(c,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_scomplex *a, const bla_integer *lda, bla_scomplex *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(d,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_double *a, const bla_integer *lda, bla_double *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(s,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_real *a, const bla_integer *lda, bla_real *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(z,tbmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_dcomplex *a, const bla_integer *lda, bla_dcomplex *x, const bla_integer *incx);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_tbsv.c b/frame/compat/f2c/bla_tbsv.c
+index 9f58c0a..12bdc13 100644
+--- a/frame/compat/f2c/bla_tbsv.c
++++ b/frame/compat/f2c/bla_tbsv.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(c,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_scomplex *a, const bla_integer *lda, bla_scomplex *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(c,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_scomplex *a, const bla_integer *lda, bla_scomplex *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+@@ -56,7 +56,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical noconj, nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -213,15 +213,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -234,17 +232,17 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("CTBSV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    noconj = PASTEF77(lsame)(trans, "T", (ftnlen)1, (ftnlen)1);
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    noconj = PASTEF77(lsame)(trans, "T");
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -258,11 +256,11 @@
+ /*     Start the operations. In this version the elements of A are */
+ /*     accessed by sequentially with one pass through A. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x := inv( A )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -393,7 +391,7 @@
+ 
+ /*        Form  x := inv( A' )*x  or  x := inv( conjg( A') )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -592,7 +590,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of CTBSV . */
+ 
+@@ -603,7 +601,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_double *a, const bla_integer *lda, bla_double *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(d,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_double *a, const bla_integer *lda, bla_double *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
+@@ -614,7 +612,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -771,15 +769,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -792,16 +788,16 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("DTBSV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -815,11 +811,11 @@
+ /*     Start the operations. In this version the elements of A are */
+ /*     accessed by sequentially with one pass through A. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x := inv( A )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -914,7 +910,7 @@
+ 
+ /*        Form  x := inv( A')*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -1007,7 +1003,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of DTBSV . */
+ 
+@@ -1018,7 +1014,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_real *a, const bla_integer *lda, bla_real *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(s,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_real *a, const bla_integer *lda, bla_real *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
+@@ -1029,7 +1025,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -1186,15 +1182,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -1207,16 +1201,16 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("STBSV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -1230,11 +1224,11 @@
+ /*     Start the operations. In this version the elements of A are */
+ /*     accessed by sequentially with one pass through A. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x := inv( A )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -1329,7 +1323,7 @@
+ 
+ /*        Form  x := inv( A')*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -1422,7 +1416,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of STBSV . */
+ 
+@@ -1433,7 +1427,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(z,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_dcomplex *a, const bla_integer *lda, bla_dcomplex *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(z,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_dcomplex *a, const bla_integer *lda, bla_dcomplex *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
+@@ -1449,7 +1443,7 @@
+     bla_integer i__, j, l;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kplus1, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical noconj, nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -1606,15 +1600,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -1627,17 +1619,17 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("ZTBSV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    noconj = PASTEF77(lsame)(trans, "T", (ftnlen)1, (ftnlen)1);
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    noconj = PASTEF77(lsame)(trans, "T");
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -1651,11 +1643,11 @@
+ /*     Start the operations. In this version the elements of A are */
+ /*     accessed by sequentially with one pass through A. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x := inv( A )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -1786,7 +1778,7 @@
+ 
+ /*        Form  x := inv( A' )*x  or  x := inv( conjg( A') )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kplus1 = *k + 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -1985,7 +1977,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of ZTBSV . */
+ 
+diff --git a/frame/compat/f2c/bla_tbsv.h b/frame/compat/f2c/bla_tbsv.h
+index 3653a6a..bc0031d 100644
+--- a/frame/compat/f2c/bla_tbsv.h
++++ b/frame/compat/f2c/bla_tbsv.h
+@@ -34,9 +34,9 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(c,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_scomplex *a, const bla_integer *lda, bla_scomplex *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(d,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_double *a, const bla_integer *lda, bla_double *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(s,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_real *a, const bla_integer *lda, bla_real *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(z,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_dcomplex *a, const bla_integer *lda, bla_dcomplex *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(c,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_scomplex *a, const bla_integer *lda, bla_scomplex *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(d,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_double *a, const bla_integer *lda, bla_double *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(s,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_real *a, const bla_integer *lda, bla_real *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(z,tbsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_integer *k, const bla_dcomplex *a, const bla_integer *lda, bla_dcomplex *x, const bla_integer *incx);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_tpmv.c b/frame/compat/f2c/bla_tpmv.c
+index f4bc0ad..ea939f0 100644
+--- a/frame/compat/f2c/bla_tpmv.c
++++ b/frame/compat/f2c/bla_tpmv.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(c,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_scomplex *ap, bla_scomplex *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(c,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_scomplex *ap, bla_scomplex *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4, i__5;
+@@ -56,7 +56,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical noconj, nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -167,15 +167,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -184,17 +182,17 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("CTPMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    noconj = PASTEF77(lsame)(trans, "T", (ftnlen)1, (ftnlen)1);
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    noconj = PASTEF77(lsame)(trans, "T");
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -208,11 +206,11 @@
+ /*     Start the operations. In this version the elements of AP are */
+ /*     accessed sequentially with one pass through AP. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x:= A*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -346,7 +344,7 @@
+ 
+ /*        Form  x := A'*x  or  x := conjg( A' )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = *n * (*n + 1) / 2;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -531,7 +529,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of CTPMV . */
+ 
+@@ -542,7 +540,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_double *ap, bla_double *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(d,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_double *ap, bla_double *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2;
+@@ -553,7 +551,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -663,15 +661,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -680,16 +676,16 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("DTPMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -703,11 +699,11 @@
+ /*     Start the operations. In this version the elements of AP are */
+ /*     accessed sequentially with one pass through AP. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x:= A*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -797,7 +793,7 @@
+ 
+ /*        Form  x := A'*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = *n * (*n + 1) / 2;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -879,7 +875,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of DTPMV . */
+ 
+@@ -890,7 +886,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_real *ap, bla_real *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(s,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_real *ap, bla_real *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2;
+@@ -901,7 +897,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -1011,15 +1007,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -1028,16 +1022,16 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("STPMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -1051,11 +1045,11 @@
+ /*     Start the operations. In this version the elements of AP are */
+ /*     accessed sequentially with one pass through AP. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x:= A*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -1145,7 +1139,7 @@
+ 
+ /*        Form  x := A'*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = *n * (*n + 1) / 2;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -1227,7 +1221,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of STPMV . */
+ 
+@@ -1238,7 +1232,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(z,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_dcomplex *ap, bla_dcomplex *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(z,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_dcomplex *ap, bla_dcomplex *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4, i__5;
+@@ -1253,7 +1247,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical noconj, nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -1364,15 +1358,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -1381,17 +1373,17 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("ZTPMV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    noconj = PASTEF77(lsame)(trans, "T", (ftnlen)1, (ftnlen)1);
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    noconj = PASTEF77(lsame)(trans, "T");
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -1405,11 +1397,11 @@
+ /*     Start the operations. In this version the elements of AP are */
+ /*     accessed sequentially with one pass through AP. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x:= A*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -1543,7 +1535,7 @@
+ 
+ /*        Form  x := A'*x  or  x := conjg( A' )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = *n * (*n + 1) / 2;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -1728,7 +1720,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of ZTPMV . */
+ 
+diff --git a/frame/compat/f2c/bla_tpmv.h b/frame/compat/f2c/bla_tpmv.h
+index 800fbd5..bc886ae 100644
+--- a/frame/compat/f2c/bla_tpmv.h
++++ b/frame/compat/f2c/bla_tpmv.h
+@@ -34,9 +34,9 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(c,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_scomplex *ap, bla_scomplex *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(d,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_double *ap, bla_double *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(s,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_real *ap, bla_real *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(z,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_dcomplex *ap, bla_dcomplex *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(c,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_scomplex *ap, bla_scomplex *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(d,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_double *ap, bla_double *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(s,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_real *ap, bla_real *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(z,tpmv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_dcomplex *ap, bla_dcomplex *x, const bla_integer *incx);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_tpsv.c b/frame/compat/f2c/bla_tpsv.c
+index a85cc0d..710fac2 100644
+--- a/frame/compat/f2c/bla_tpsv.c
++++ b/frame/compat/f2c/bla_tpsv.c
+@@ -41,7 +41,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(c,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_scomplex *ap, bla_scomplex *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(c,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_scomplex *ap, bla_scomplex *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4, i__5;
+@@ -56,7 +56,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical noconj, nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -170,15 +170,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -187,17 +185,17 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("CTPSV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    noconj = PASTEF77(lsame)(trans, "T", (ftnlen)1, (ftnlen)1);
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    noconj = PASTEF77(lsame)(trans, "T");
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -211,11 +209,11 @@
+ /*     Start the operations. In this version the elements of AP are */
+ /*     accessed sequentially with one pass through AP. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x := inv( A )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = *n * (*n + 1) / 2;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -339,7 +337,7 @@
+ 
+ /*        Form  x := inv( A' )*x  or  x := inv( conjg( A' ) )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -523,7 +521,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of CTPSV . */
+ 
+@@ -534,7 +532,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(d,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_double *ap, bla_double *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(d,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_double *ap, bla_double *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2;
+@@ -545,7 +543,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -658,15 +656,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -675,16 +671,16 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("DTPSV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -698,11 +694,11 @@
+ /*     Start the operations. In this version the elements of AP are */
+ /*     accessed sequentially with one pass through AP. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x := inv( A )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = *n * (*n + 1) / 2;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -790,7 +786,7 @@
+ 
+ /*        Form  x := inv( A' )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -874,7 +870,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of DTPSV . */
+ 
+@@ -885,7 +881,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(s,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_real *ap, bla_real *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(s,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_real *ap, bla_real *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2;
+@@ -896,7 +892,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -1009,15 +1005,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -1026,16 +1020,16 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("STPSV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -1049,11 +1043,11 @@
+ /*     Start the operations. In this version the elements of AP are */
+ /*     accessed sequentially with one pass through AP. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x := inv( A )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = *n * (*n + 1) / 2;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -1141,7 +1135,7 @@
+ 
+ /*        Form  x := inv( A' )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -1225,7 +1219,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of STPSV . */
+ 
+@@ -1236,7 +1230,7 @@
+ 	-lf2c -lm   (in that order)
+ */
+ 
+-/* Subroutine */ int PASTEF77(z,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_dcomplex *ap, bla_dcomplex *x, const bla_integer *incx)
++/* Subroutine */ void PASTEF77(z,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_dcomplex *ap, bla_dcomplex *x, const bla_integer *incx)
+ {
+     /* System generated locals */
+     bla_integer i__1, i__2, i__3, i__4, i__5;
+@@ -1252,7 +1246,7 @@
+     bla_integer i__, j, k;
+     //extern bla_logical PASTEF77(lsame)(bla_character *, bla_character *, ftnlen, ftnlen);
+     bla_integer kk, ix, jx, kx = 0;
+-    //extern /* Subroutine */ int PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
++    //extern /* Subroutine */ void PASTEF77(xerbla)(bla_character *, bla_integer *, ftnlen);
+     bla_logical noconj, nounit;
+ 
+ /*     .. Scalar Arguments .. */
+@@ -1366,15 +1360,13 @@
+ 
+     /* Function Body */
+     info = 0;
+-    if (! PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(uplo, "L", (
+-	    ftnlen)1, (ftnlen)1)) {
++    if (! PASTEF77(lsame)(uplo, "U") && ! PASTEF77(lsame)(uplo, "L")) {
+ 	info = 1;
+-    } else if (! PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans,
+-	    "T", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(trans, "C", (ftnlen)1, (
+-	    ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(trans, "N") && ! PASTEF77(lsame)(trans,
++	    "T") && ! PASTEF77(lsame)(trans, "C")) {
+ 	info = 2;
+-    } else if (! PASTEF77(lsame)(diag, "U", (ftnlen)1, (ftnlen)1) && ! PASTEF77(lsame)(diag,
+-	    "N", (ftnlen)1, (ftnlen)1)) {
++    } else if (! PASTEF77(lsame)(diag, "U") && ! PASTEF77(lsame)(diag,
++	    "N")) {
+ 	info = 3;
+     } else if (*n < 0) {
+ 	info = 4;
+@@ -1383,17 +1375,17 @@
+     }
+     if (info != 0) {
+ 	PASTEF77(xerbla)("ZTPSV ", &info, (ftnlen)6);
+-	return 0;
++	return;
+     }
+ 
+ /*     Quick return if possible. */
+ 
+     if (*n == 0) {
+-	return 0;
++	return;
+     }
+ 
+-    noconj = PASTEF77(lsame)(trans, "T", (ftnlen)1, (ftnlen)1);
+-    nounit = PASTEF77(lsame)(diag, "N", (ftnlen)1, (ftnlen)1);
++    noconj = PASTEF77(lsame)(trans, "T");
++    nounit = PASTEF77(lsame)(diag, "N");
+ 
+ /*     Set up the start point in X if the increment is not unity. This */
+ /*     will be  ( N - 1 )*INCX  too small for descending loops. */
+@@ -1407,11 +1399,11 @@
+ /*     Start the operations. In this version the elements of AP are */
+ /*     accessed sequentially with one pass through AP. */
+ 
+-    if (PASTEF77(lsame)(trans, "N", (ftnlen)1, (ftnlen)1)) {
++    if (PASTEF77(lsame)(trans, "N")) {
+ 
+ /*        Form  x := inv( A )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = *n * (*n + 1) / 2;
+ 	    if (*incx == 1) {
+ 		for (j = *n; j >= 1; --j) {
+@@ -1535,7 +1527,7 @@
+ 
+ /*        Form  x := inv( A' )*x  or  x := inv( conjg( A' ) )*x. */
+ 
+-	if (PASTEF77(lsame)(uplo, "U", (ftnlen)1, (ftnlen)1)) {
++	if (PASTEF77(lsame)(uplo, "U")) {
+ 	    kk = 1;
+ 	    if (*incx == 1) {
+ 		i__1 = *n;
+@@ -1719,7 +1711,7 @@
+ 	}
+     }
+ 
+-    return 0;
++    return;
+ 
+ /*     End of ZTPSV . */
+ 
+diff --git a/frame/compat/f2c/bla_tpsv.h b/frame/compat/f2c/bla_tpsv.h
+index 3cf5e80..5cc2edc 100644
+--- a/frame/compat/f2c/bla_tpsv.h
++++ b/frame/compat/f2c/bla_tpsv.h
+@@ -34,9 +34,9 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(c,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_scomplex *ap, bla_scomplex *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(d,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_double *ap, bla_double *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(s,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_real *ap, bla_real *x, const bla_integer *incx);
+-BLIS_EXPORT_BLAS int PASTEF77(z,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_dcomplex *ap, bla_dcomplex *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(c,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_scomplex *ap, bla_scomplex *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(d,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_double *ap, bla_double *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(s,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_real *ap, bla_real *x, const bla_integer *incx);
++BLIS_EXPORT_BLAS void PASTEF77(z,tpsv)(const bla_character *uplo, const bla_character *trans, const bla_character *diag, const bla_integer *n, const bla_dcomplex *ap, bla_dcomplex *x, const bla_integer *incx);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_xerbla.c b/frame/compat/f2c/bla_xerbla.c
+index 991ef00..85a4a63 100644
+--- a/frame/compat/f2c/bla_xerbla.c
++++ b/frame/compat/f2c/bla_xerbla.c
+@@ -43,7 +43,7 @@
+ 
+ /* Table of constant values */
+ 
+-/* Subroutine */ int PASTEF77(xerbla)(const bla_character *srname, const bla_integer *info, ftnlen srname_len)
++/* Subroutine */ void PASTEF77(xerbla)(const bla_character *srname, const bla_integer *info, ftnlen srname_len)
+ {
+ /*  -- LAPACK auxiliary routine (preliminary version) -- */
+ /*     Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */
+@@ -84,7 +84,7 @@
+ 
+ /*     End of XERBLA */
+ 
+-    return 0;
++    return;
+ } /* xerbla */
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_xerbla.h b/frame/compat/f2c/bla_xerbla.h
+index 6824a56..141ee8f 100644
+--- a/frame/compat/f2c/bla_xerbla.h
++++ b/frame/compat/f2c/bla_xerbla.h
+@@ -34,6 +34,6 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS BLIS_OVERRIDABLE int PASTEF77(xerbla)(const bla_character *srname, const bla_integer *info, ftnlen srname_len);
++BLIS_EXPORT_BLAS BLIS_OVERRIDABLE void PASTEF77(xerbla)(const bla_character *srname, const bla_integer *info, ftnlen srname_len);
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_xerbla_array.c b/frame/compat/f2c/bla_xerbla_array.c
+index b69775d..e08a6e0 100644
+--- a/frame/compat/f2c/bla_xerbla_array.c
++++ b/frame/compat/f2c/bla_xerbla_array.c
+@@ -38,7 +38,7 @@
+ 
+ #define MAX_NUM_CHARS 32
+ 
+-int PASTEF77(xerbla_array)(const bla_character *srname_array, const bla_integer srname_len, const bla_integer *info)
++void PASTEF77(xerbla_array)(const bla_character *srname_array, const bla_integer *srname_len, const bla_integer *info)
+ {
+ 	int  i;
+ #if 1
+@@ -53,7 +53,7 @@ int PASTEF77(xerbla_array)(const bla_character *srname_array, const bla_integer
+ 
+ 	// Compute the number of chars to copy as the minimum of the length of
+ 	// srname_array and MAX_NUM_CHARS.
+-	const int n_copy = bli_min( srname_len, MAX_NUM_CHARS );
++	const int n_copy = bli_min( *srname_len, MAX_NUM_CHARS );
+ 
+ 	// Copy over each element of srname_array.
+ 	for ( i = 0; i < n_copy; ++i )
+@@ -65,9 +65,9 @@ int PASTEF77(xerbla_array)(const bla_character *srname_array, const bla_integer
+ 	srname[i] = '\0';
+ 
+ 	// Call xerbla_().
+-	PASTEF77(xerbla)( srname, info, ( ftnlen )srname_len );
++	PASTEF77(xerbla)( srname, info, ( ftnlen )*srname_len );
+ 
+-	return 0;
++	return;
+ }
+ 
+ #endif
+diff --git a/frame/compat/f2c/bla_xerbla_array.h b/frame/compat/f2c/bla_xerbla_array.h
+index 4684b94..1ca6151 100644
+--- a/frame/compat/f2c/bla_xerbla_array.h
++++ b/frame/compat/f2c/bla_xerbla_array.h
+@@ -34,6 +34,6 @@
+ 
+ #if 1
+ 
+-BLIS_EXPORT_BLAS int PASTEF77(xerbla_array)(const bla_character *srname, const bla_integer srname_len, const bla_integer *info);
++BLIS_EXPORT_BLAS void PASTEF77(xerbla_array)(const bla_character *srname, const bla_integer *srname_len, const bla_integer *info);
+ 
+ #endif

From ce70e66db806f3b4a01f56ee44b5ff60dd064452 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 12:02:17 +0530
Subject: [PATCH 22/48] Add a list of crashing tests to investigate

---
 packages/scipy/scipy-conftest.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/packages/scipy/scipy-conftest.py b/packages/scipy/scipy-conftest.py
index 3142e02e..cb89ec5e 100644
--- a/packages/scipy/scipy-conftest.py
+++ b/packages/scipy/scipy-conftest.py
@@ -14,6 +14,10 @@
 process_msg = "no process support"
 thread_msg = "no thread support"
 todo_signature_mismatch_msg = "TODO signature mismatch"
+todo_callback_signature_msg = (
+    "TODO fatal wasm trap: f2py callback (LAPACK select) signature mismatch "
+    "in the gees/gges Schur/QZ drivers"
+)
 todo_memory_corruption_msgt = "TODO memory corruption"
 todo_genuine_difference_msg = "TODO genuine difference to be investigated"
 todo_fp_exception_msg = "TODO did not raise maybe no floating point exception support?"
@@ -84,6 +88,11 @@
     # scipy/linalg tests
     ("test_cython_abi.py::test_cython_blas_abi_stability", xfail, todo_signature_mismatch_msg),
     ("test_cython_abi.py::test_cython_lapack_abi_stability", xfail, todo_signature_mismatch_msg),
+    ("test_decomp.py::TestSchur", skip, todo_callback_signature_msg),
+    ("test_batch.py::TestBatch.test_matmat\\[.*signm", skip, todo_callback_signature_msg),
+    ("test_matfuncs.py::TestExpM.test_logm_consistency", skip, todo_callback_signature_msg),
+    # TODO investigate: fatal crash, does not look like the callback issue.
+    ("test_hyp2f1.py::TestHyp2f1.test_region4\\[hyp2f1_test_case14\\]", skip, "TODO investigate hyp2f1 region4 case14 crash"),
     # scipy/ndimage/tests
     ("test_filters.py::TestThreading", xfail, thread_msg),
     # scipy/optimize/tests

From 8f8d9f5425060778c1ece69de91a3ae4611c01e5 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 12:07:25 +0530
Subject: [PATCH 23/48] Skip more creashing schur (gees) tests

---
 packages/scipy/scipy-conftest.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/packages/scipy/scipy-conftest.py b/packages/scipy/scipy-conftest.py
index cb89ec5e..67447184 100644
--- a/packages/scipy/scipy-conftest.py
+++ b/packages/scipy/scipy-conftest.py
@@ -89,8 +89,14 @@
     ("test_cython_abi.py::test_cython_blas_abi_stability", xfail, todo_signature_mismatch_msg),
     ("test_cython_abi.py::test_cython_lapack_abi_stability", xfail, todo_signature_mismatch_msg),
     ("test_decomp.py::TestSchur", skip, todo_callback_signature_msg),
-    ("test_batch.py::TestBatch.test_matmat\\[.*signm", skip, todo_callback_signature_msg),
+    ("test_batch.py.*test_matmat\\[.*(sqrtm|signm)", skip, todo_callback_signature_msg),
+    ("test_batch.py.*test_funm", skip, todo_callback_signature_msg),
+    ("test_batch.py.*test_logm\\[", skip, todo_callback_signature_msg),
+    ("test_batch.py.*test_fractional_matrix_power", skip, todo_callback_signature_msg),
+    ("test_batch.py.*test_schur_lu\\[schur", skip, todo_callback_signature_msg),
     ("test_matfuncs.py::TestExpM.test_logm_consistency", skip, todo_callback_signature_msg),
+    ("test_decomp.py::TestQZ", skip, todo_callback_signature_msg),
+    ("test_decomp.py::TestOrdQZ", skip, todo_callback_signature_msg),
     # TODO investigate: fatal crash, does not look like the callback issue.
     ("test_hyp2f1.py::TestHyp2f1.test_region4\\[hyp2f1_test_case14\\]", skip, "TODO investigate hyp2f1 region4 case14 crash"),
     # scipy/ndimage/tests

From e2ef2a87c8196499ea789b3817c0437da1560313 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 12:08:40 +0530
Subject: [PATCH 24/48] Yet some more skips...

---
 packages/scipy/scipy-conftest.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/packages/scipy/scipy-conftest.py b/packages/scipy/scipy-conftest.py
index 67447184..9a051ea5 100644
--- a/packages/scipy/scipy-conftest.py
+++ b/packages/scipy/scipy-conftest.py
@@ -93,8 +93,12 @@
     ("test_batch.py.*test_funm", skip, todo_callback_signature_msg),
     ("test_batch.py.*test_logm\\[", skip, todo_callback_signature_msg),
     ("test_batch.py.*test_fractional_matrix_power", skip, todo_callback_signature_msg),
-    ("test_batch.py.*test_schur_lu\\[schur", skip, todo_callback_signature_msg),
+    ("test_batch.py.*test_schur_lu\\[.*schur", skip, todo_callback_signature_msg),
     ("test_matfuncs.py::TestExpM.test_logm_consistency", skip, todo_callback_signature_msg),
+    ("test_matfuncs.py::TestSignM", skip, todo_callback_signature_msg),
+    ("test_matfuncs.py::TestLogM", skip, todo_callback_signature_msg),
+    ("test_matfuncs.py::TestSqrtM", skip, todo_callback_signature_msg),
+    ("test_matfuncs.py::TestFractionalMatrixPower", skip, todo_callback_signature_msg),
     ("test_decomp.py::TestQZ", skip, todo_callback_signature_msg),
     ("test_decomp.py::TestOrdQZ", skip, todo_callback_signature_msg),
     # TODO investigate: fatal crash, does not look like the callback issue.

From e3344fe4d414ada9d3b5f844b566d07d734132c4 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 12:18:57 +0530
Subject: [PATCH 25/48] Schur tests are unwieldy

---
 packages/scipy/scipy-conftest.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/scipy/scipy-conftest.py b/packages/scipy/scipy-conftest.py
index 9a051ea5..d011c021 100644
--- a/packages/scipy/scipy-conftest.py
+++ b/packages/scipy/scipy-conftest.py
@@ -101,6 +101,7 @@
     ("test_matfuncs.py::TestFractionalMatrixPower", skip, todo_callback_signature_msg),
     ("test_decomp.py::TestQZ", skip, todo_callback_signature_msg),
     ("test_decomp.py::TestOrdQZ", skip, todo_callback_signature_msg),
+    ("test_decomp.py::TestOverwrite::test_schur", skip, todo_callback_signature_msg),
     # TODO investigate: fatal crash, does not look like the callback issue.
     ("test_hyp2f1.py::TestHyp2f1.test_region4\\[hyp2f1_test_case14\\]", skip, "TODO investigate hyp2f1 region4 case14 crash"),
     # scipy/ndimage/tests

From 6e9ae6396224b0512a465edc0ba44978a3a8f08e Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 12:23:15 +0530
Subject: [PATCH 26/48] Bring back patch 0003 to fix gees calls

---
 packages/scipy/meta.yaml                      |  2 +
 .../scipy/patches/0003-Fix-gees-calls.patch   | 38 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 packages/scipy/patches/0003-Fix-gees-calls.patch

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index 8c28688d..76bc3566 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -20,6 +20,8 @@ package:
 source:
   url: https://files.pythonhosted.org/packages/source/s/scipy/scipy-1.18.0.tar.gz
   sha256: 67b2ad2ad54c72ca6d04975a9b2df8c3638c34ddd5b28738e94fc2b57929d378
+  patches:
+    - patches/0003-Fix-gees-calls.patch
 build:
   vendor-sharedlib: true
   # NumPy 2.1 disabled visibility for symbols outside of extension modules
diff --git a/packages/scipy/patches/0003-Fix-gees-calls.patch b/packages/scipy/patches/0003-Fix-gees-calls.patch
new file mode 100644
index 00000000..ced565b5
--- /dev/null
+++ b/packages/scipy/patches/0003-Fix-gees-calls.patch
@@ -0,0 +1,38 @@
+From 8addc1da35bc63df651946ef14c723797a431e0c Mon Sep 17 00:00:00 2001
+From: Hood Chatham 
+Date: Mon, 26 Jun 2023 20:12:25 -0700
+Subject: [PATCH 3/6] Fix gees calls
+
+---
+ scipy/linalg/flapack_gen.pyf.src | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/scipy/linalg/flapack_gen.pyf.src b/scipy/linalg/flapack_gen.pyf.src
+index 04037fdca..3686cea86 100644
+--- a/scipy/linalg/flapack_gen.pyf.src
++++ b/scipy/linalg/flapack_gen.pyf.src
+@@ -1196,8 +1196,8 @@ subroutine gees(compute_v,sort_t,select,n,a,nrows,sdim,w,vs,
+     !  A = Z * T * Z^H  -- a complex matrix is in Schur form if it is upper
+     !  triangular
+ 
+-    callstatement (*f2py_func)((compute_v?"V":"N"),(sort_t?"S":"N"),cb_select_in_gees__user__routines,&n,a,&nrows,&sdim,w,vs,&ldvs,work,&lwork,rwork,bwork,&info,1,1)
+-    callprotoargument char*,char*,F_INT(*)(*),F_INT*,*,F_INT*,F_INT*,*,*,F_INT*,*,F_INT*,*,F_INT*,F_INT*,F_INT,F_INT
++    callstatement (*f2py_func)((compute_v?"V":"N"),(sort_t?"S":"N"),cb_select_in_gees__user__routines,&n,a,&nrows,&sdim,w,vs,&ldvs,work,&lwork,rwork,bwork,&info)
++    callprotoargument char*,char*,F_INT(*)(*),F_INT*,*,F_INT*,F_INT*,*,*,F_INT*,*,F_INT*,*,F_INT*,F_INT*
+ 
+     use gees__user__routines
+ 
+@@ -1226,8 +1226,8 @@ subroutine gees(compute_v,sort_t,select,n,a,nrows,sdim,wr,wi,v
+     !  A = Z * T * Z^H  -- a real matrix is in Schur form if it is upper quasi-
+     !  triangular with 1x1 and 2x2 blocks.
+ 
+-    callstatement (*f2py_func)((compute_v?"V":"N"),(sort_t?"S":"N"),cb_select_in_gees__user__routines,&n,a,&nrows,&sdim,wr,wi,vs,&ldvs,work,&lwork,bwork,&info,1,1)
+-    callprotoargument char*,char*,F_INT(*)(*,*),F_INT*,*,F_INT*,F_INT*,*,*,*,F_INT*,*,F_INT*,F_INT*,F_INT*,F_INT,F_INT
++    callstatement (*f2py_func)((compute_v?"V":"N"),(sort_t?"S":"N"),cb_select_in_gees__user__routines,&n,a,&nrows,&sdim,wr,wi,vs,&ldvs,work,&lwork,bwork,&info)
++    callprotoargument char*,char*,F_INT(*)(*,*),F_INT*,*,F_INT*,F_INT*,*,*,*,F_INT*,*,F_INT*,F_INT*,F_INT*
+ 
+     use gees__user__routines
+ 
+-- 
+2.34.1
+

From b0356c3bb4756a085db05e779294233895b033ac Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 12:27:37 +0530
Subject: [PATCH 27/48] Schur tests are fixed!

---
 packages/scipy/scipy-conftest.py | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/packages/scipy/scipy-conftest.py b/packages/scipy/scipy-conftest.py
index d011c021..7769699f 100644
--- a/packages/scipy/scipy-conftest.py
+++ b/packages/scipy/scipy-conftest.py
@@ -88,20 +88,6 @@
     # scipy/linalg tests
     ("test_cython_abi.py::test_cython_blas_abi_stability", xfail, todo_signature_mismatch_msg),
     ("test_cython_abi.py::test_cython_lapack_abi_stability", xfail, todo_signature_mismatch_msg),
-    ("test_decomp.py::TestSchur", skip, todo_callback_signature_msg),
-    ("test_batch.py.*test_matmat\\[.*(sqrtm|signm)", skip, todo_callback_signature_msg),
-    ("test_batch.py.*test_funm", skip, todo_callback_signature_msg),
-    ("test_batch.py.*test_logm\\[", skip, todo_callback_signature_msg),
-    ("test_batch.py.*test_fractional_matrix_power", skip, todo_callback_signature_msg),
-    ("test_batch.py.*test_schur_lu\\[.*schur", skip, todo_callback_signature_msg),
-    ("test_matfuncs.py::TestExpM.test_logm_consistency", skip, todo_callback_signature_msg),
-    ("test_matfuncs.py::TestSignM", skip, todo_callback_signature_msg),
-    ("test_matfuncs.py::TestLogM", skip, todo_callback_signature_msg),
-    ("test_matfuncs.py::TestSqrtM", skip, todo_callback_signature_msg),
-    ("test_matfuncs.py::TestFractionalMatrixPower", skip, todo_callback_signature_msg),
-    ("test_decomp.py::TestQZ", skip, todo_callback_signature_msg),
-    ("test_decomp.py::TestOrdQZ", skip, todo_callback_signature_msg),
-    ("test_decomp.py::TestOverwrite::test_schur", skip, todo_callback_signature_msg),
     # TODO investigate: fatal crash, does not look like the callback issue.
     ("test_hyp2f1.py::TestHyp2f1.test_region4\\[hyp2f1_test_case14\\]", skip, "TODO investigate hyp2f1 region4 case14 crash"),
     # scipy/ndimage/tests

From ebf855bd7bb0e5e3c474f16d01fc5cb9d85bf75d Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 12:52:02 +0530
Subject: [PATCH 28/48] Skip test_overwrite_qr_p_row (hangs)

---
 packages/scipy/scipy-conftest.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/packages/scipy/scipy-conftest.py b/packages/scipy/scipy-conftest.py
index 7769699f..b0be2584 100644
--- a/packages/scipy/scipy-conftest.py
+++ b/packages/scipy/scipy-conftest.py
@@ -88,6 +88,8 @@
     # scipy/linalg tests
     ("test_cython_abi.py::test_cython_blas_abi_stability", xfail, todo_signature_mismatch_msg),
     ("test_cython_abi.py::test_cython_lapack_abi_stability", xfail, todo_signature_mismatch_msg),
+    # TODO investigate: hangs.
+    ("test_decomp_update.py.*test_overwrite_qr_p_row", skip, "hanged"),
     # TODO investigate: fatal crash, does not look like the callback issue.
     ("test_hyp2f1.py::TestHyp2f1.test_region4\\[hyp2f1_test_case14\\]", skip, "TODO investigate hyp2f1 region4 case14 crash"),
     # scipy/ndimage/tests

From 7f322779c27ebd11668facadc65796ff526b8482 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 21:16:56 +0530
Subject: [PATCH 29/48] Use pyodide/pyodide-build#395

---
 pyodide-build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyodide-build b/pyodide-build
index a6d8c300..59d6ed48 160000
--- a/pyodide-build
+++ b/pyodide-build
@@ -1 +1 @@
-Subproject commit a6d8c300bbe148b74b3ef7ac17358461c94504fc
+Subproject commit 59d6ed48743b77ebb0f6291071be30cb86bd95ff

From 4a492effb224e207081a7735da7cf12f42e2d7d4 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 21:28:48 +0530
Subject: [PATCH 30/48] Add comment to describe BLIS patch 3

---
 packages/libblis/meta.yaml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/packages/libblis/meta.yaml b/packages/libblis/meta.yaml
index ed5eafa5..a1501efa 100644
--- a/packages/libblis/meta.yaml
+++ b/packages/libblis/meta.yaml
@@ -15,6 +15,17 @@ source:
     # functions in the BLIS f2c compat layer. The patch is needed for SciPy's test
     # suite to pass.
     - patches/0002-CBLAS-interface-for-crotg-zrotg-zdrot-and-csrot.patch
+    # This patch does three things right now, but the idea is mostly the ABI
+    # normalisation for WASM to fix function signatures:
+    # 1. BLIS has an f2c-ed reference BLAS implementation, which returns ints for
+    # subroutines, as an f2c artefact. The native wrappers (gemm, gemv, etc.) and
+    # SciPy's cython_blas use voids. The banded/packed level-2 and Givens-rotation
+    # routines (gbmv, sbmv, spmv, spr, tbmv, tbsv, tpmv, tpsv, hbmv, hpmv, hpr, hpr2, rot, rotg, rotm, rotmg)
+    # are normalised to void.
+    # 2. lsame_ drops its two unused trailing string-length arguments. SciPy calls
+    # the two-argument form of lsame_.
+    # 3. xerbla_array_ is made to return void with a pointer length, which is the
+    # signature that SciPy and reference LAPACK use.
     - patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch
 
 build:

From e26b83982c5171ce30b8430c173c247a61899f06 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 21:29:10 +0530
Subject: [PATCH 31/48] Add comment about libsemilapack
 shared_library-to-library change

---
 packages/libsemilapack/meta.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/packages/libsemilapack/meta.yaml b/packages/libsemilapack/meta.yaml
index d3a637e5..13649046 100644
--- a/packages/libsemilapack/meta.yaml
+++ b/packages/libsemilapack/meta.yaml
@@ -15,6 +15,8 @@ build:
   script: |
     # wasm-ld cannot build shared libraries through Meson, so the Fortran-ABI
     # shim must be a plain (static) library on Emscripten.
+    # TODO: drop when https://github.com/ilayn/semicolon-lapack/pull/23
+    # is merged and released
     sed -i 's/shared_library(/library(/' src/fortran_shim/meson.build
 
     export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"

From 073216d30274837f171c2c0b889cbf760b3ed81a Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 21:37:40 +0530
Subject: [PATCH 32/48] Add TODO and description for qmax patch

---
 packages/libsemilapack/meta.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/packages/libsemilapack/meta.yaml b/packages/libsemilapack/meta.yaml
index 13649046..59a5ff50 100644
--- a/packages/libsemilapack/meta.yaml
+++ b/packages/libsemilapack/meta.yaml
@@ -8,6 +8,9 @@ source:
   url: https://github.com/ilayn/semicolon-lapack/archive/refs/tags/v0.01.2-pre.tar.gz
   sha256: 447f49d333fadf0168a51976865c3d702bef0826e6c72cf29dd14ee8c9f903ef
   patches:
+    # TODO: create a PR for this upstream and drop it when released
+    # This patch adds the qmax parameter to dlasq3 and slasq3, restoring
+    # the original reference LAPACK and SciPy's cython_lapack signature.
     - patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch
 
 build:

From a7dee1654d3b35fc2f239488adc07471ff98be37 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 21:45:14 +0530
Subject: [PATCH 33/48] Add comment about reintroduced SciPy patch 3

---
 packages/scipy/meta.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index 76bc3566..89e05b9a 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -21,6 +21,12 @@ source:
   url: https://files.pythonhosted.org/packages/source/s/scipy/scipy-1.18.0.tar.gz
   sha256: 67b2ad2ad54c72ca6d04975a9b2df8c3638c34ddd5b28738e94fc2b57929d378
   patches:
+    # TODO: figure out what to do with this patch. I realised that this patch is
+    # needed because the gees f2py wrapper is generated with the wrong signature.
+    # This comes up a lot in Schur. It passes two hidden Fortran string lengths
+    # for its char args (jobvs, sort) in the callstatement/callprotoargument.
+    # BLIS and semicolon-lapack (and the f2ced stack we had before, even) take no
+    # hidden lengths.
     - patches/0003-Fix-gees-calls.patch
 build:
   vendor-sharedlib: true

From 80000533ec68d00b1cb191c52e2d810514c1d949 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 21:46:55 +0530
Subject: [PATCH 34/48] Add comment about `-D_without-fortran` Meson argument

---
 packages/scipy/meta.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index 89e05b9a..d02e6d31 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -56,6 +56,7 @@ build:
   unvendor-tests: true
   # install-args=--tags=runtime,python-runtime,devel
   # Disable when running tests, enable when a PR is ready, i.e., building for distribution.
+  # TODO before merging: update to SciPy 2.0 when it arrives and drop -D_without-fortran=true
   backend-flags: |
     build-dir=build
     setup-args=-D_without-fortran=true

From 1025d6f6328e71993d54aebfb60d465b376c6e7e Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 21:49:17 +0530
Subject: [PATCH 35/48] Add comment about `CBLAS_INT`s to `void`s for
 `getrf`/`getri`

---
 packages/scipy/meta.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index d02e6d31..3dee6ec7 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -66,6 +66,10 @@ build:
     set -x
     export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"
 
+    # TODO: send a PR to SciPy to fix this. The issue here is that getrf and getri
+    # are declared as returning CBLAS_INT in _batched_linalg, but they are
+    # actually voids in semicolon-lapack and in SciPy's cython_lapack. There are
+    # 8 of these declarations in _common_array_utils.hh.
     sed -i 's/^CBLAS_INT$/void/' scipy/linalg/src/_common_array_utils.hh
     sed -i -e '/BLAS_FUNC(dlagtm)/ s/, int);/);/' \
            -e '/BLAS_FUNC(dlagtm)/ s/, 1);/);/' \

From 3003336710c0cb31c5607834aae39d907e149b43 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 21:52:03 +0530
Subject: [PATCH 36/48] Add comment about `trlib` hidden string-length

---
 packages/scipy/meta.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index 3dee6ec7..57df2100 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -71,6 +71,11 @@ build:
     # actually voids in semicolon-lapack and in SciPy's cython_lapack. There are
     # 8 of these declarations in _common_array_utils.hh.
     sed -i 's/^CBLAS_INT$/void/' scipy/linalg/src/_common_array_utils.hh
+    # TODO: send a PR to SciPy to fix this. The issue here is that the bundled
+    # trlib declares and calls dlagtm with the g77 ABI, which has a trailing
+    # hidden Fortran string-length for the `char *trans` argument. However,
+    # semicolon-lapack and SciPy's cython_lapack use the no-length form.
+    # (I found dlagtm to be the only one, maybe there are others in dead code?)
     sed -i -e '/BLAS_FUNC(dlagtm)/ s/, int);/);/' \
            -e '/BLAS_FUNC(dlagtm)/ s/, 1);/);/' \
       scipy/optimize/_trlib/trlib_private.h

From 87b3fdc3aff98666403aa8ce6f1e83f26ca7e8aa Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 23:22:11 +0530
Subject: [PATCH 37/48] `TestHyp2f1::test_region4.hyp2f1_test_case14` is
 xfailed upstream

---
 packages/scipy/scipy-conftest.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/packages/scipy/scipy-conftest.py b/packages/scipy/scipy-conftest.py
index b0be2584..7d848fee 100644
--- a/packages/scipy/scipy-conftest.py
+++ b/packages/scipy/scipy-conftest.py
@@ -90,8 +90,6 @@
     ("test_cython_abi.py::test_cython_lapack_abi_stability", xfail, todo_signature_mismatch_msg),
     # TODO investigate: hangs.
     ("test_decomp_update.py.*test_overwrite_qr_p_row", skip, "hanged"),
-    # TODO investigate: fatal crash, does not look like the callback issue.
-    ("test_hyp2f1.py::TestHyp2f1.test_region4\\[hyp2f1_test_case14\\]", skip, "TODO investigate hyp2f1 region4 case14 crash"),
     # scipy/ndimage/tests
     ("test_filters.py::TestThreading", xfail, thread_msg),
     # scipy/optimize/tests

From f1c913b21381368e1ca6e9ae7f7a43c17eacda06 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 23:24:25 +0530
Subject: [PATCH 38/48] Add a better reason and comment about
 test_overwrite_qr_p_row

---
 packages/scipy/scipy-conftest.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/packages/scipy/scipy-conftest.py b/packages/scipy/scipy-conftest.py
index 7d848fee..2d67718e 100644
--- a/packages/scipy/scipy-conftest.py
+++ b/packages/scipy/scipy-conftest.py
@@ -88,8 +88,11 @@
     # scipy/linalg tests
     ("test_cython_abi.py::test_cython_blas_abi_stability", xfail, todo_signature_mismatch_msg),
     ("test_cython_abi.py::test_cython_lapack_abi_stability", xfail, todo_signature_mismatch_msg),
-    # TODO investigate: hangs.
-    ("test_decomp_update.py.*test_overwrite_qr_p_row", skip, "hanged"),
+    # This test intermittently freezes when run after the preceding linalg tests.
+    # However, it passes in isolation, and often in the full suite too). The module
+    # is the most Givens-rotation-heavy in SciPy and the frozen test varies run to run
+    # TODO: find why? Or run the tests in this file in a different order?
+    ("test_decomp_update.py.*test_overwrite_qr_p_row", skip, "intermittent wasm hang in the qr update/rotation path"),
     # scipy/ndimage/tests
     ("test_filters.py::TestThreading", xfail, thread_msg),
     # scipy/optimize/tests

From b41377f54b15b6c4d21849aea7dffe51ff143c92 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Wed, 8 Jul 2026 23:30:40 +0530
Subject: [PATCH 39/48] Fixes for exit code handling from Claude

---
 packages/scipy/scipy-conftest.py | 35 +++++++++++++++++++++++---------
 1 file changed, 25 insertions(+), 10 deletions(-)

diff --git a/packages/scipy/scipy-conftest.py b/packages/scipy/scipy-conftest.py
index 2d67718e..b4eda5d2 100644
--- a/packages/scipy/scipy-conftest.py
+++ b/packages/scipy/scipy-conftest.py
@@ -292,21 +292,36 @@ def pytest_configure(config):  # noqa: ARG001
         pass
 
 
+EXIT_STATUS = 0
+
+
 @pytest.hookimpl(trylast=True)
 def pytest_sessionfinish(session, exitstatus):  # noqa: ARG001
+    # We stash the real pytest exit status so pytest_unconfigure can hand it
+    # to os._exit below. We need this hook for the test summary to be printed
+    # before we exit.
+    global EXIT_STATUS
+    EXIT_STATUS = int(exitstatus)
+
+
+def pytest_unconfigure(config):  # noqa: ARG001
     # C-extension destructors in SciPy call Fortran functions with void/int
-    # signature mismatches. These run both
-    # during the gc cleanup (gc_collect_harder in _pytest/unraisableexception)
-    # and during Python's own finalization sequence, causing fatal errors that
-    # cannot be caught in Python as they crash the interpreter. Registering
-    # os._exit as an atexit handler as LIFO can at least bypass both of these.
-    # atexit is necessary for us here for allowing the terminal summary to
-    # print, since that happens in the terminal reporter's own
-    # pytest_sessionfinish which runs before this trylast hook.
-    import atexit
+    # signature mismatches. These run during Python's own finalization
+    # sequence and cause a fatal error that crashes the interpreter and,
+    # more importantly, makes Node.js report a non-zero exit code even when
+    # every test passed. os._exit here bypasses interpreter finalization entirely.
+    #
+    # pytest_unconfigure runs after the terminal reporter has printed its summary
+    # but while we are still in normal execution (before finalization), so the
+    # Emscripten ExitStatus it raises unwinds cleanly and Node.js maps it to the
+    # real exit code, instead of an exit-120 "error during finalization" path
+    # an atexit-scheduled os._exit seems to be hitting.
     import os
+    import sys
 
-    atexit.register(os._exit, int(exitstatus))
+    sys.stdout.flush()
+    sys.stderr.flush()
+    os._exit(EXIT_STATUS)
 
 
 def pytest_collection_modifyitems(config, items):

From 6e70172077610145df13c5b8fe56d3098d8ca635 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Thu, 9 Jul 2026 00:05:54 +0530
Subject: [PATCH 40/48] Convert BLIS patch 3 to not be a diff-style patch

---
 packages/libblis/meta.yaml                    | 11 ---
 .../0001-Compile-BLIS-to-WebAssembly.patch    |  2 +-
 ...face-for-crotg-zrotg-zdrot-and-csrot.patch |  2 +-
 ...-ABI-void-returns-lsame-xerbla_array.patch | 76 +++++++++++++++++++
 4 files changed, 78 insertions(+), 13 deletions(-)

diff --git a/packages/libblis/meta.yaml b/packages/libblis/meta.yaml
index a1501efa..ed5eafa5 100644
--- a/packages/libblis/meta.yaml
+++ b/packages/libblis/meta.yaml
@@ -15,17 +15,6 @@ source:
     # functions in the BLIS f2c compat layer. The patch is needed for SciPy's test
     # suite to pass.
     - patches/0002-CBLAS-interface-for-crotg-zrotg-zdrot-and-csrot.patch
-    # This patch does three things right now, but the idea is mostly the ABI
-    # normalisation for WASM to fix function signatures:
-    # 1. BLIS has an f2c-ed reference BLAS implementation, which returns ints for
-    # subroutines, as an f2c artefact. The native wrappers (gemm, gemv, etc.) and
-    # SciPy's cython_blas use voids. The banded/packed level-2 and Givens-rotation
-    # routines (gbmv, sbmv, spmv, spr, tbmv, tbsv, tpmv, tpsv, hbmv, hpmv, hpr, hpr2, rot, rotg, rotm, rotmg)
-    # are normalised to void.
-    # 2. lsame_ drops its two unused trailing string-length arguments. SciPy calls
-    # the two-argument form of lsame_.
-    # 3. xerbla_array_ is made to return void with a pointer length, which is the
-    # signature that SciPy and reference LAPACK use.
     - patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch
 
 build:
diff --git a/packages/libblis/patches/0001-Compile-BLIS-to-WebAssembly.patch b/packages/libblis/patches/0001-Compile-BLIS-to-WebAssembly.patch
index 03240d2e..3126404d 100644
--- a/packages/libblis/patches/0001-Compile-BLIS-to-WebAssembly.patch
+++ b/packages/libblis/patches/0001-Compile-BLIS-to-WebAssembly.patch
@@ -1,7 +1,7 @@
 From 85aa27abe96e988adc8fdfbf61844bfd3307ccbf Mon Sep 17 00:00:00 2001
 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
 Date: Tue, 30 Jun 2026 06:06:59 +0530
-Subject: Compile BLIS to WebAssembly
+Subject: [PATCH 1/3] Compile BLIS to WebAssembly
 
 This is a squashed patch from https://github.com/agriyakhetarpal/blis/pull/1
 and applied on top of the v2.1 release of BLIS. See the release notes at:
diff --git a/packages/libblis/patches/0002-CBLAS-interface-for-crotg-zrotg-zdrot-and-csrot.patch b/packages/libblis/patches/0002-CBLAS-interface-for-crotg-zrotg-zdrot-and-csrot.patch
index 60176d86..2def6989 100644
--- a/packages/libblis/patches/0002-CBLAS-interface-for-crotg-zrotg-zdrot-and-csrot.patch
+++ b/packages/libblis/patches/0002-CBLAS-interface-for-crotg-zrotg-zdrot-and-csrot.patch
@@ -1,7 +1,7 @@
 From 8ef1abca0c395dbc02dba134c088fc403fe8c782 Mon Sep 17 00:00:00 2001
 From: Edward Smyth <117460141+edwsmyth@users.noreply.github.com>
 Date: Sun, 28 Jun 2026 20:47:26 +0100
-Subject: [PATCH 2/2] CBLAS interface for crotg, zrotg, zdrot and csrot (#926)
+Subject: [PATCH 2/3] CBLAS interface for crotg, zrotg, zdrot and csrot (#926)
 
 Details:
 - Add CBLAS wrappers for missing complex rot APIs, as requested in
diff --git a/packages/libblis/patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch b/packages/libblis/patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch
index 709c4b45..2b031a55 100644
--- a/packages/libblis/patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch
+++ b/packages/libblis/patches/0003-WASM-ABI-void-returns-lsame-xerbla_array.patch
@@ -1,3 +1,76 @@
+From 9118b064b4ae23ce72f591229e000a0b8623e20f Mon Sep 17 00:00:00 2001
+From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
+Date: Tue, 9 Jul 2026 00:05:21 +0530
+Subject: [PATCH 3/3] WASM ABI normalisation: various void returns, a two-arg lsame, and xerbla_array
+
+This patch does three things right now, but the idea is mostly the ABI
+normalisation for WASM to fix function signatures:
+  1. BLIS has an f2c-ed reference BLAS implementation, which returns ints for
+     subroutines, as an f2c artifact. The native wrappers (gemm, gemv, etc.) and
+     SciPy's cython_blas use voids. The banded/packed level-2 and Givens-rotation
+     routines (gbmv, sbmv, spmv, spr, tbmv, tbsv, tpmv, tpsv, hbmv, hpmv, hpr, hpr2,
+     rot, rotg, rotm, rotmg) are normalised to void.
+  2. lsame_ drops its two unused trailing string-length arguments. SciPy calls
+     the two-argument form of lsame_.
+  3. xerbla_array_ is made to return void with a pointer length, which is the
+     signature that SciPy and reference LAPACK use.
+---
+ frame/compat/check/bla_gemm3m_check.h |  12 +--
+ frame/compat/check/bla_gemm_check.h   |  12 +--
+ frame/compat/check/bla_gemmt_check.h  |  16 ++--
+ frame/compat/check/bla_gemv_check.h   |   6 +-
+ frame/compat/check/bla_hemm_check.h   |   8 +-
+ frame/compat/check/bla_hemv_check.h   |   4 +-
+ frame/compat/check/bla_her2_check.h   |   4 +-
+ frame/compat/check/bla_her2k_check.h  |   8 +-
+ frame/compat/check/bla_her_check.h    |   4 +-
+ frame/compat/check/bla_herk_check.h   |   8 +-
+ frame/compat/check/bla_syr2k_check.h  |  10 +--
+ frame/compat/check/bla_syrk_check.h   |  10 +--
+ frame/compat/check/bla_trmm_check.h   |  18 ++--
+ frame/compat/check/bla_trmv_check.h   |  14 +--
+ frame/compat/f2c/bla_gbmv.c           |  80 ++++++++---------
+ frame/compat/f2c/bla_gbmv.h           |   8 +-
+ frame/compat/f2c/bla_hbmv.c           |  34 ++++---
+ frame/compat/f2c/bla_hbmv.h           |   4 +-
+ frame/compat/f2c/bla_hpmv.c           |  34 ++++---
+ frame/compat/f2c/bla_hpmv.h           |   4 +-
+ frame/compat/f2c/bla_hpr.c            |  30 +++----
+ frame/compat/f2c/bla_hpr.h            |   4 +-
+ frame/compat/f2c/bla_hpr2.c           |  30 +++----
+ frame/compat/f2c/bla_hpr2.h           |   4 +-
+ frame/compat/f2c/bla_lsame.c          |   4 +-
+ frame/compat/f2c/bla_lsame.h          |   4 +-
+ frame/compat/f2c/bla_rot.c            |  48 +++++-----
+ frame/compat/f2c/bla_rot.h            |  12 +--
+ frame/compat/f2c/bla_rotg.c           |  16 ++--
+ frame/compat/f2c/bla_rotg.h           |   8 +-
+ frame/compat/f2c/bla_rotm.c           |   8 +-
+ frame/compat/f2c/bla_rotm.h           |   4 +-
+ frame/compat/f2c/bla_rotmg.c          |   8 +-
+ frame/compat/f2c/bla_rotmg.h          |   4 +-
+ frame/compat/f2c/bla_sbmv.c           |  34 ++++---
+ frame/compat/f2c/bla_sbmv.h           |   4 +-
+ frame/compat/f2c/bla_spmv.c           |  34 ++++---
+ frame/compat/f2c/bla_spmv.h           |   4 +-
+ frame/compat/f2c/bla_spr.c            |  30 +++----
+ frame/compat/f2c/bla_spr.h            |   4 +-
+ frame/compat/f2c/bla_spr2.c           |  30 +++----
+ frame/compat/f2c/bla_spr2.h           |   4 +-
+ frame/compat/f2c/bla_tbmv.c           | 124 ++++++++++++--------------
+ frame/compat/f2c/bla_tbmv.h           |   8 +-
+ frame/compat/f2c/bla_tbsv.c           | 124 ++++++++++++--------------
+ frame/compat/f2c/bla_tbsv.h           |   8 +-
+ frame/compat/f2c/bla_tpmv.c           | 124 ++++++++++++--------------
+ frame/compat/f2c/bla_tpmv.h           |   8 +-
+ frame/compat/f2c/bla_tpsv.c           | 124 ++++++++++++--------------
+ frame/compat/f2c/bla_tpsv.h           |   8 +-
+ frame/compat/f2c/bla_xerbla.c         |   4 +-
+ frame/compat/f2c/bla_xerbla.h         |   2 +-
+ frame/compat/f2c/bla_xerbla_array.c   |   8 +-
+ frame/compat/f2c/bla_xerbla_array.h   |   2 +-
+ 54 files changed, 559 insertions(+), 611 deletions(-)
+
 diff --git a/frame/compat/check/bla_gemm3m_check.h b/frame/compat/check/bla_gemm3m_check.h
 index e6c4e38..2f2d9d8 100644
 --- a/frame/compat/check/bla_gemm3m_check.h
@@ -3893,3 +3966,6 @@ index 4684b94..1ca6151 100644
 +BLIS_EXPORT_BLAS void PASTEF77(xerbla_array)(const bla_character *srname, const bla_integer *srname_len, const bla_integer *info);
  
  #endif
+-- 
+2.50.1 (Apple Git-155)
+

From 576103d092af0fbe19b72c5c34c104c0100e7819 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Thu, 9 Jul 2026 00:24:24 +0530
Subject: [PATCH 41/48] Delete uv.lock in error

---
 uv.lock | 3 ---
 1 file changed, 3 deletions(-)
 delete mode 100644 uv.lock

diff --git a/uv.lock b/uv.lock
deleted file mode 100644
index a5bc5147..00000000
--- a/uv.lock
+++ /dev/null
@@ -1,3 +0,0 @@
-version = 1
-revision = 3
-requires-python = ">=3.14"

From 6ee5b8ded705a98140493c47b3f2044ebed27d6d Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Thu, 9 Jul 2026 00:08:18 +0530
Subject: [PATCH 42/48] Convert libsemilapack patch 1 to not be a diff-style
 patch

---
 ...tore-qmax-parameter-to-dlasq3-slasq3.patch | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch b/packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch
index 0ef20cbb..8fc879c8 100644
--- a/packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch
+++ b/packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch
@@ -1,3 +1,25 @@
+From bb7ce22eaccd82d4fddcb47ed99c379920d10785 Mon Sep 17 00:00:00 2001
+From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
+Date: Wed, 9 Jul 2026 00:03:45 +0530
+Subject: [PATCH] Restore qmax parameter to dlasq3/slasq3
+
+semicolon-lapack does not include the qmax parameter in dlasq3/slasq3,
+diverging from the signatures of reference LAPACK and SciPy's cython_lapack.
+
+This patch adds the qmax parameter to dlasq3/slasq3 (and its reversal-branch update),
+have dlasq2/slasq2 pass it through, and updates the shim and public headers
+accordingly.
+---
+ src/d/dlasq2.c                        | 2 +-
+ src/d/dlasq3.c                        | 6 ++++--
+ src/fortran_shim/shim_double.c        | 6 +++---
+ src/fortran_shim/shim_single.c        | 6 +++---
+ src/include/semicolon_lapack_double.h | 2 +-
+ src/include/semicolon_lapack_single.h | 2 +-
+ src/s/slasq2.c                        | 2 +-
+ src/s/slasq3.c                        | 6 ++++--
+ 8 files changed, 18 insertions(+), 14 deletions(-)
+
 diff --git a/src/d/dlasq2.c b/src/d/dlasq2.c
 index 926a7c0..54734f1 100644
 --- a/src/d/dlasq2.c
@@ -160,3 +182,6 @@ index 03b758c..85718f2 100644
                  *dmin = -ZERO;
              }
          }
+-- 
+2.50.1 (Apple Git-155)
+

From 7ebbe1514bbea2a5d0dc65723a1be288d8701fb4 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Thu, 9 Jul 2026 01:16:31 +0530
Subject: [PATCH 43/48] Oops, add meson and ninja to the environment

---
 environment.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/environment.yml b/environment.yml
index e28c9472..84fe0462 100644
--- a/environment.yml
+++ b/environment.yml
@@ -9,6 +9,8 @@ dependencies:
   - swig
   - make
   - cmake<4
+  - meson
+  - ninja
   - texinfo
   - autoconf
   - automake

From 01549dae2e4389505498e6cd112182f1d2486a38 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Thu, 9 Jul 2026 01:45:34 +0530
Subject: [PATCH 44/48] scipy.odr is not compiled, remove test

---
 packages/scipy/test_scipy.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/packages/scipy/test_scipy.py b/packages/scipy/test_scipy.py
index fc018ab5..d047d045 100644
--- a/packages/scipy/test_scipy.py
+++ b/packages/scipy/test_scipy.py
@@ -74,7 +74,6 @@ def runtest(module, filter):
         )
         assert result == 0
 
-    runtest("odr", "explicit")
     runtest("stats.tests.test_multivariate", "haar")
 
     # function signature mismatch with PROPACK, works with LOBPCG and ARPACK.

From 178f440a2a8a1ea421055790c27bd056ed5c2106 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Thu, 9 Jul 2026 03:17:03 +0530
Subject: [PATCH 45/48] Drop todo pytest skip no longer needed

---
 packages/scipy/scipy-conftest.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/packages/scipy/scipy-conftest.py b/packages/scipy/scipy-conftest.py
index b4eda5d2..35f152df 100644
--- a/packages/scipy/scipy-conftest.py
+++ b/packages/scipy/scipy-conftest.py
@@ -14,10 +14,6 @@
 process_msg = "no process support"
 thread_msg = "no thread support"
 todo_signature_mismatch_msg = "TODO signature mismatch"
-todo_callback_signature_msg = (
-    "TODO fatal wasm trap: f2py callback (LAPACK select) signature mismatch "
-    "in the gees/gges Schur/QZ drivers"
-)
 todo_memory_corruption_msgt = "TODO memory corruption"
 todo_genuine_difference_msg = "TODO genuine difference to be investigated"
 todo_fp_exception_msg = "TODO did not raise maybe no floating point exception support?"

From fed27b9b134a7904d639e9a19ea1d7fcf48f5319 Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Thu, 9 Jul 2026 03:46:37 +0530
Subject: [PATCH 46/48] Bump to libsemilapack v0.01.3-pre, drop qmax +
 shared_library patch

---
 packages/libsemilapack/meta.yaml              |  15 +-
 ...tore-qmax-parameter-to-dlasq3-slasq3.patch | 187 ------------------
 2 files changed, 2 insertions(+), 200 deletions(-)
 delete mode 100644 packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch

diff --git a/packages/libsemilapack/meta.yaml b/packages/libsemilapack/meta.yaml
index 59a5ff50..74e7d7c6 100644
--- a/packages/libsemilapack/meta.yaml
+++ b/packages/libsemilapack/meta.yaml
@@ -5,23 +5,12 @@ package:
     - library
     - shared_library
 source:
-  url: https://github.com/ilayn/semicolon-lapack/archive/refs/tags/v0.01.2-pre.tar.gz
-  sha256: 447f49d333fadf0168a51976865c3d702bef0826e6c72cf29dd14ee8c9f903ef
-  patches:
-    # TODO: create a PR for this upstream and drop it when released
-    # This patch adds the qmax parameter to dlasq3 and slasq3, restoring
-    # the original reference LAPACK and SciPy's cython_lapack signature.
-    - patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch
+  url: https://github.com/ilayn/semicolon-lapack/archive/refs/tags/v0.01.3-pre.tar.gz
+  sha256: 5292396b9c2bffc1bf22dccad7acbf9f4fcb1edc0c45ed0f055d80f55e2a23a3
 
 build:
   type: shared_library
   script: |
-    # wasm-ld cannot build shared libraries through Meson, so the Fortran-ABI
-    # shim must be a plain (static) library on Emscripten.
-    # TODO: drop when https://github.com/ilayn/semicolon-lapack/pull/23
-    # is merged and released
-    sed -i 's/shared_library(/library(/' src/fortran_shim/meson.build
-
     export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"
 
     CC=emcc CXX=em++ AR=emar \
diff --git a/packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch b/packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch
deleted file mode 100644
index 8fc879c8..00000000
--- a/packages/libsemilapack/patches/0001-Restore-qmax-parameter-to-dlasq3-slasq3.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-From bb7ce22eaccd82d4fddcb47ed99c379920d10785 Mon Sep 17 00:00:00 2001
-From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
-Date: Wed, 9 Jul 2026 00:03:45 +0530
-Subject: [PATCH] Restore qmax parameter to dlasq3/slasq3
-
-semicolon-lapack does not include the qmax parameter in dlasq3/slasq3,
-diverging from the signatures of reference LAPACK and SciPy's cython_lapack.
-
-This patch adds the qmax parameter to dlasq3/slasq3 (and its reversal-branch update),
-have dlasq2/slasq2 pass it through, and updates the shim and public headers
-accordingly.
----
- src/d/dlasq2.c                        | 2 +-
- src/d/dlasq3.c                        | 6 ++++--
- src/fortran_shim/shim_double.c        | 6 +++---
- src/fortran_shim/shim_single.c        | 6 +++---
- src/include/semicolon_lapack_double.h | 2 +-
- src/include/semicolon_lapack_single.h | 2 +-
- src/s/slasq2.c                        | 2 +-
- src/s/slasq3.c                        | 6 ++++--
- 8 files changed, 18 insertions(+), 14 deletions(-)
-
-diff --git a/src/d/dlasq2.c b/src/d/dlasq2.c
-index 926a7c0..54734f1 100644
---- a/src/d/dlasq2.c
-+++ b/src/d/dlasq2.c
-@@ -367,7 +367,7 @@ L100:
-             }
- 
-             /* While submatrix unfinished take a good dqds step. */
--            dlasq3(i0, &n0, Z, &pp, &dmin, &sigma, &desig, &nfail,
-+            dlasq3(i0, &n0, Z, &pp, &dmin, &sigma, &desig, &qmax, &nfail,
-                    &iter, &ndiv, ieee, &ttype, &dmin1, &dmin2, &dn, &dn1,
-                    &dn2, &g, &tau);
- 
-diff --git a/src/d/dlasq3.c b/src/d/dlasq3.c
-index 7266792..dc414bd 100644
---- a/src/d/dlasq3.c
-+++ b/src/d/dlasq3.c
-@@ -22,7 +22,7 @@
-  * @param[out]    dmin   Minimum value of d.
-  * @param[out]    sigma  Sum of shifts used in current segment.
-  * @param[in,out] desig  Lower order part of SIGMA.
-- * @param[in]     qmax   Maximum value of q.
-+ * @param[in,out] qmax   Maximum value of q.
-  * @param[in,out] nfail  Increment NFAIL by 1 each time the shift was too big.
-  * @param[in,out] iter   Increment ITER by 1 for each iteration.
-  * @param[in,out] ndiv   Increment NDIV by 1 for each division.
-@@ -38,7 +38,7 @@
-  * @param[in,out] tau    This is the shift.
-  */
- void dlasq3(const INT i0, INT* n0, f64* restrict Z,
--            INT* pp, f64* dmin, f64* sigma, f64* desig,
-+            INT* pp, f64* dmin, f64* sigma, f64* desig, f64* qmax,
-             INT* nfail, INT* iter, INT* ndiv,
-             const INT ieee, INT* ttype, f64* dmin1, f64* dmin2,
-             f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau)
-@@ -161,6 +161,8 @@ compute_shift:
-                 Z[4 * (*n0) - *pp + 3] = fmin(fmin(Z[4 * (*n0) - *pp + 3],
-                                                      Z[4 * i0 - *pp + 3]),
-                                                 Z[4 * i0 - *pp + 7]);
-+                *qmax = fmax(fmax(*qmax, Z[4 * i0 + *pp]),
-+                             Z[4 * i0 + *pp + 4]);
-                 *dmin = -ZERO;
-             }
-         }
-diff --git a/src/fortran_shim/shim_double.c b/src/fortran_shim/shim_double.c
-index c4521a4..2422c8c 100644
---- a/src/fortran_shim/shim_double.c
-+++ b/src/fortran_shim/shim_double.c
-@@ -251,7 +251,7 @@ void dlasdt_(INT* n, INT* lvl, INT* nd, INT* inode, INT* ndiml, INT* ndimr, INT*
- void dlaset_(char* uplo, INT* m, INT* n, f64* alpha, f64* beta, f64* A, INT* lda);
- void dlasq1_(INT* n, f64* D, f64* E, f64* work, INT* info);
- void dlasq2_(INT* n, f64* Z, INT* info);
--void dlasq3_(INT* i0, INT* n0, f64* Z, INT* pp, f64* dmin, f64* sigma, f64* desig, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau);
-+void dlasq3_(INT* i0, INT* n0, f64* Z, INT* pp, f64* dmin, f64* sigma, f64* desig, f64* qmax, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau);
- void dlasq4_(INT* i0, INT* n0, f64* Z, INT* pp, INT* n0in, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* tau, INT* ttype, f64* g);
- void dlasq5_(INT* i0, INT* n0, f64* Z, INT* pp, f64* tau, f64* sigma, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dnm1, f64* dnm2, INT* ieee, f64* eps);
- void dlasq6_(INT* i0, INT* n0, f64* Z, INT* pp, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dnm1, f64* dnm2);
-@@ -1762,8 +1762,8 @@ void dlasq2_(INT* n, f64* Z, INT* info) {
-     dlasq2(*n, Z, info);
- }
- 
--void dlasq3_(INT* i0, INT* n0, f64* Z, INT* pp, f64* dmin, f64* sigma, f64* desig, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau) {
--    dlasq3(*i0, n0, Z, pp, dmin, sigma, desig, nfail, iter, ndiv, *ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau);
-+void dlasq3_(INT* i0, INT* n0, f64* Z, INT* pp, f64* dmin, f64* sigma, f64* desig, f64* qmax, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau) {
-+    dlasq3(*i0, n0, Z, pp, dmin, sigma, desig, qmax, nfail, iter, ndiv, *ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau);
- }
- 
- void dlasq4_(INT* i0, INT* n0, f64* Z, INT* pp, INT* n0in, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* tau, INT* ttype, f64* g) {
-diff --git a/src/fortran_shim/shim_single.c b/src/fortran_shim/shim_single.c
-index 6930a68..545cfb7 100644
---- a/src/fortran_shim/shim_single.c
-+++ b/src/fortran_shim/shim_single.c
-@@ -251,7 +251,7 @@ void slasdt_(INT* n, INT* lvl, INT* nd, INT* inode, INT* ndiml, INT* ndimr, INT*
- void slaset_(char* uplo, INT* m, INT* n, f32* alpha, f32* beta, f32* A, INT* lda);
- void slasq1_(INT* n, f32* D, f32* E, f32* work, INT* info);
- void slasq2_(INT* n, f32* Z, INT* info);
--void slasq3_(INT* i0, INT* n0, f32* Z, INT* pp, f32* dmin, f32* sigma, f32* desig, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau);
-+void slasq3_(INT* i0, INT* n0, f32* Z, INT* pp, f32* dmin, f32* sigma, f32* desig, f32* qmax, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau);
- void slasq4_(INT* i0, INT* n0, f32* Z, INT* pp, INT* n0in, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* tau, INT* ttype, f32* g);
- void slasq5_(INT* i0, INT* n0, f32* Z, INT* pp, f32* tau, f32* sigma, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dnm1, f32* dnm2, INT* ieee, f32* eps);
- void slasq6_(INT* i0, INT* n0, f32* Z, INT* pp, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dnm1, f32* dnm2);
-@@ -1759,8 +1759,8 @@ void slasq2_(INT* n, f32* Z, INT* info) {
-     slasq2(*n, Z, info);
- }
- 
--void slasq3_(INT* i0, INT* n0, f32* Z, INT* pp, f32* dmin, f32* sigma, f32* desig, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau) {
--    slasq3(*i0, n0, Z, pp, dmin, sigma, desig, nfail, iter, ndiv, *ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau);
-+void slasq3_(INT* i0, INT* n0, f32* Z, INT* pp, f32* dmin, f32* sigma, f32* desig, f32* qmax, INT* nfail, INT* iter, INT* ndiv, INT* ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau) {
-+    slasq3(*i0, n0, Z, pp, dmin, sigma, desig, qmax, nfail, iter, ndiv, *ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau);
- }
- 
- void slasq4_(INT* i0, INT* n0, f32* Z, INT* pp, INT* n0in, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* tau, INT* ttype, f32* g) {
-diff --git a/src/include/semicolon_lapack_double.h b/src/include/semicolon_lapack_double.h
-index 1756315..7a865de 100644
---- a/src/include/semicolon_lapack_double.h
-+++ b/src/include/semicolon_lapack_double.h
-@@ -257,7 +257,7 @@ SEMICOLON_API void dlasdt(const INT n, INT* lvl, INT* nd, INT* restrict inode, I
- SEMICOLON_API void dlaset(const char* uplo, const INT m, const INT n, const f64 alpha, const f64 beta, f64* restrict A, const INT lda);
- SEMICOLON_API void dlasq1(const INT n, f64* restrict D, f64* restrict E, f64* restrict work, INT* info);
- SEMICOLON_API void dlasq2(const INT n, f64* restrict Z, INT* info);
--SEMICOLON_API void dlasq3(const INT i0, INT* n0, f64* restrict Z, INT* pp, f64* dmin, f64* sigma, f64* desig, INT* nfail, INT* iter, INT* ndiv, const INT ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau);
-+SEMICOLON_API void dlasq3(const INT i0, INT* n0, f64* restrict Z, INT* pp, f64* dmin, f64* sigma, f64* desig, f64* qmax, INT* nfail, INT* iter, INT* ndiv, const INT ieee, INT* ttype, f64* dmin1, f64* dmin2, f64* dn, f64* dn1, f64* dn2, f64* g, f64* tau);
- SEMICOLON_API void dlasq4(const INT i0, const INT n0, const f64* restrict Z, const INT pp, const INT n0in, const f64 dmin, const f64 dmin1, const f64 dmin2, const f64 dn, const f64 dn1, const f64 dn2, f64* tau, INT* ttype, f64* g);
- SEMICOLON_API void dlasq5(const INT i0, const INT n0, f64* restrict Z, const INT pp, f64* tau, f64 sigma, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dnm1, f64* dnm2, const INT ieee, const f64 eps);
- SEMICOLON_API void dlasq6(const INT i0, const INT n0, f64* restrict Z, const INT pp, f64* dmin, f64* dmin1, f64* dmin2, f64* dn, f64* dnm1, f64* dnm2);
-diff --git a/src/include/semicolon_lapack_single.h b/src/include/semicolon_lapack_single.h
-index 47da47d..62de006 100644
---- a/src/include/semicolon_lapack_single.h
-+++ b/src/include/semicolon_lapack_single.h
-@@ -257,7 +257,7 @@ SEMICOLON_API void slasdt(const INT n, INT* lvl, INT* nd, INT* restrict inode, I
- SEMICOLON_API void slaset(const char* uplo, const INT m, const INT n, const f32 alpha, const f32 beta, f32* restrict A, const INT lda);
- SEMICOLON_API void slasq1(const INT n, f32* restrict D, f32* restrict E, f32* restrict work, INT* info);
- SEMICOLON_API void slasq2(const INT n, f32* restrict Z, INT* info);
--SEMICOLON_API void slasq3(const INT i0, INT* n0, f32* restrict Z, INT* pp, f32* dmin, f32* sigma, f32* desig, INT* nfail, INT* iter, INT* ndiv, const INT ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau);
-+SEMICOLON_API void slasq3(const INT i0, INT* n0, f32* restrict Z, INT* pp, f32* dmin, f32* sigma, f32* desig, f32* qmax, INT* nfail, INT* iter, INT* ndiv, const INT ieee, INT* ttype, f32* dmin1, f32* dmin2, f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau);
- SEMICOLON_API void slasq4(const INT i0, const INT n0, const f32* restrict Z, const INT pp, const INT n0in, const f32 dmin, const f32 dmin1, const f32 dmin2, const f32 dn, const f32 dn1, const f32 dn2, f32* tau, INT* ttype, f32* g);
- SEMICOLON_API void slasq5(const INT i0, const INT n0, f32* restrict Z, const INT pp, f32* tau, f32 sigma, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dnm1, f32* dnm2, const INT ieee, const f32 eps);
- SEMICOLON_API void slasq6(const INT i0, const INT n0, f32* restrict Z, const INT pp, f32* dmin, f32* dmin1, f32* dmin2, f32* dn, f32* dnm1, f32* dnm2);
-diff --git a/src/s/slasq2.c b/src/s/slasq2.c
-index 7559914..61774b1 100644
---- a/src/s/slasq2.c
-+++ b/src/s/slasq2.c
-@@ -369,7 +369,7 @@ L100:
-             }
- 
-             /* While submatrix unfinished take a good dqds step. */
--            slasq3(i0, &n0, Z, &pp, &dmin, &sigma, &desig, &nfail,
-+            slasq3(i0, &n0, Z, &pp, &dmin, &sigma, &desig, &qmax, &nfail,
-                    &iter, &ndiv, ieee, &ttype, &dmin1, &dmin2, &dn, &dn1,
-                    &dn2, &g, &tau);
- 
-diff --git a/src/s/slasq3.c b/src/s/slasq3.c
-index 03b758c..85718f2 100644
---- a/src/s/slasq3.c
-+++ b/src/s/slasq3.c
-@@ -22,7 +22,7 @@
-  * @param[out]    dmin   Minimum value of d.
-  * @param[out]    sigma  Sum of shifts used in current segment.
-  * @param[in,out] desig  Lower order part of SIGMA.
-- * @param[in]     qmax   Maximum value of q.
-+ * @param[in,out] qmax   Maximum value of q.
-  * @param[in,out] nfail  Increment NFAIL by 1 each time the shift was too big.
-  * @param[in,out] iter   Increment ITER by 1 for each iteration.
-  * @param[in,out] ndiv   Increment NDIV by 1 for each division.
-@@ -38,7 +38,7 @@
-  * @param[in,out] tau    This is the shift.
-  */
- void slasq3(const INT i0, INT* n0, f32* restrict Z,
--            INT* pp, f32* dmin, f32* sigma, f32* desig,
-+            INT* pp, f32* dmin, f32* sigma, f32* desig, f32* qmax,
-             INT* nfail, INT* iter, INT* ndiv,
-             const INT ieee, INT* ttype, f32* dmin1, f32* dmin2,
-             f32* dn, f32* dn1, f32* dn2, f32* g, f32* tau)
-@@ -161,6 +161,8 @@ compute_shift:
-                 Z[4 * (*n0) - *pp + 3] = fminf(fminf(Z[4 * (*n0) - *pp + 3],
-                                                      Z[4 * i0 - *pp + 3]),
-                                                 Z[4 * i0 - *pp + 7]);
-+                *qmax = fmaxf(fmaxf(*qmax, Z[4 * i0 + *pp]),
-+                              Z[4 * i0 + *pp + 4]);
-                 *dmin = -ZERO;
-             }
-         }
--- 
-2.50.1 (Apple Git-155)
-

From 7fe2d719e711fdf385835692f5eb3eb6a75a0aad Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Thu, 9 Jul 2026 03:49:16 +0530
Subject: [PATCH 47/48] Bump version field to 0.01.3-pre as well

---
 packages/libsemilapack/meta.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/libsemilapack/meta.yaml b/packages/libsemilapack/meta.yaml
index 74e7d7c6..3631b8f3 100644
--- a/packages/libsemilapack/meta.yaml
+++ b/packages/libsemilapack/meta.yaml
@@ -1,6 +1,6 @@
 package:
   name: libsemilapack
-  version: "0.01.2-pre"
+  version: "0.01.3-pre"
   tag:
     - library
     - shared_library

From 9845363bbb82f1a668378f34b439d6389e3ef9cf Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Fri, 10 Jul 2026 19:10:17 +0530
Subject: [PATCH 48/48] Add scipy/scipy#25592 as a patch

---
 packages/scipy/meta.yaml                      | 19 +---
 ...-calls.patch => 0001-Fix-gees-calls.patch} |  2 +-
 ...res-for-getrf-getri-and-trlib-dlagtm.patch | 90 +++++++++++++++++++
 3 files changed, 95 insertions(+), 16 deletions(-)
 rename packages/scipy/patches/{0003-Fix-gees-calls.patch => 0001-Fix-gees-calls.patch} (98%)
 create mode 100644 packages/scipy/patches/0002-Fix-signatures-for-getrf-getri-and-trlib-dlagtm.patch

diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml
index 57df2100..c4897a59 100644
--- a/packages/scipy/meta.yaml
+++ b/packages/scipy/meta.yaml
@@ -27,7 +27,9 @@ source:
     # for its char args (jobvs, sort) in the callstatement/callprotoargument.
     # BLIS and semicolon-lapack (and the f2ced stack we had before, even) take no
     # hidden lengths.
-    - patches/0003-Fix-gees-calls.patch
+    - patches/0001-Fix-gees-calls.patch
+    # Drop this patch with SciPy v1.19
+    - patches/0002-Fix-signatures-for-getrf-getri-and-trlib-dlagtm.patch
 build:
   vendor-sharedlib: true
   # NumPy 2.1 disabled visibility for symbols outside of extension modules
@@ -64,21 +66,8 @@ build:
     setup-args=-Dlapack=semicolon-lapack
   script: |
     set -x
-    export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"
 
-    # TODO: send a PR to SciPy to fix this. The issue here is that getrf and getri
-    # are declared as returning CBLAS_INT in _batched_linalg, but they are
-    # actually voids in semicolon-lapack and in SciPy's cython_lapack. There are
-    # 8 of these declarations in _common_array_utils.hh.
-    sed -i 's/^CBLAS_INT$/void/' scipy/linalg/src/_common_array_utils.hh
-    # TODO: send a PR to SciPy to fix this. The issue here is that the bundled
-    # trlib declares and calls dlagtm with the g77 ABI, which has a trailing
-    # hidden Fortran string-length for the `char *trans` argument. However,
-    # semicolon-lapack and SciPy's cython_lapack use the no-length form.
-    # (I found dlagtm to be the only one, maybe there are others in dead code?)
-    sed -i -e '/BLAS_FUNC(dlagtm)/ s/, int);/);/' \
-           -e '/BLAS_FUNC(dlagtm)/ s/, 1);/);/' \
-      scipy/optimize/_trlib/trlib_private.h
+    export PKG_CONFIG_PATH="${WASM_LIBRARY_DIR}/lib/pkgconfig:${WASM_LIBRARY_DIR}/share/pkgconfig:${PKG_CONFIG_PATH}"
 
     # https://github.com/mesonbuild/meson/blob/e542901af6e30865715d3c3c18f703910a096ec0/mesonbuild/backend/ninjabackend.py#L94
     # Prevent from using response file. The response file that meson generates is not compatible to pyodide-build
diff --git a/packages/scipy/patches/0003-Fix-gees-calls.patch b/packages/scipy/patches/0001-Fix-gees-calls.patch
similarity index 98%
rename from packages/scipy/patches/0003-Fix-gees-calls.patch
rename to packages/scipy/patches/0001-Fix-gees-calls.patch
index ced565b5..3cc49c00 100644
--- a/packages/scipy/patches/0003-Fix-gees-calls.patch
+++ b/packages/scipy/patches/0001-Fix-gees-calls.patch
@@ -1,7 +1,7 @@
 From 8addc1da35bc63df651946ef14c723797a431e0c Mon Sep 17 00:00:00 2001
 From: Hood Chatham 
 Date: Mon, 26 Jun 2023 20:12:25 -0700
-Subject: [PATCH 3/6] Fix gees calls
+Subject: [PATCH 1/2] Fix gees calls
 
 ---
  scipy/linalg/flapack_gen.pyf.src | 8 ++++----
diff --git a/packages/scipy/patches/0002-Fix-signatures-for-getrf-getri-and-trlib-dlagtm.patch b/packages/scipy/patches/0002-Fix-signatures-for-getrf-getri-and-trlib-dlagtm.patch
new file mode 100644
index 00000000..2fac0173
--- /dev/null
+++ b/packages/scipy/patches/0002-Fix-signatures-for-getrf-getri-and-trlib-dlagtm.patch
@@ -0,0 +1,90 @@
+From af8b0fc9a2164c29cf179e71f6e139406474b89c Mon Sep 17 00:00:00 2001
+From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
+Date: Fri, 10 Jul 2026 14:22:09 +0300
+Subject: [PATCH 2/2] Correct `?getrf`/`?getri` return types and `trlib` `dlagtm` ABI for strict-signature toolchains
+
+From https://github.com/scipy/scipy/pull/25592. Drop this with SciPy v1.19
+
+---
+ scipy/linalg/src/_common_array_utils.hh | 16 ++++++++--------
+ scipy/optimize/_trlib/trlib_private.h   |  6 ++++--
+ 2 files changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/scipy/linalg/src/_common_array_utils.hh b/scipy/linalg/src/_common_array_utils.hh
+index 7b42d4ec18..e1fe742322 100644
+--- a/scipy/linalg/src/_common_array_utils.hh
++++ b/scipy/linalg/src/_common_array_utils.hh
+@@ -15,38 +15,38 @@
+ extern "C" {
+ 
+ /* ?GETRF */
+-CBLAS_INT
++void
+ BLAS_FUNC(sgetrf)(CBLAS_INT *m, CBLAS_INT *n, float a[], CBLAS_INT *lda,
+                   CBLAS_INT ipiv[], CBLAS_INT *info
+ );
+-CBLAS_INT
++void
+ BLAS_FUNC(dgetrf)(CBLAS_INT *m, CBLAS_INT *n, double a[], CBLAS_INT *lda,
+                   CBLAS_INT ipiv[], CBLAS_INT *info
+ );
+-CBLAS_INT
++void
+ BLAS_FUNC(cgetrf)(CBLAS_INT *m, CBLAS_INT *n, npy_complex64 a[], CBLAS_INT *lda,
+                   CBLAS_INT ipiv[], CBLAS_INT *info
+ );
+-CBLAS_INT
++void
+ BLAS_FUNC(zgetrf)(CBLAS_INT *m, CBLAS_INT *n, npy_complex128 a[], CBLAS_INT *lda,
+                   CBLAS_INT ipiv[], CBLAS_INT *info
+ );
+ 
+ 
+ /* ?GETRI */
+-CBLAS_INT
++void
+ BLAS_FUNC(sgetri)(CBLAS_INT *n, float a[], CBLAS_INT *lda, CBLAS_INT ipiv[],
+                   float work[], CBLAS_INT *lwork, CBLAS_INT *info
+ );
+-CBLAS_INT
++void
+ BLAS_FUNC(dgetri)(CBLAS_INT *n, double a[], CBLAS_INT *lda, CBLAS_INT ipiv[],
+                   double work[], CBLAS_INT *lwork, CBLAS_INT *info
+ );
+-CBLAS_INT
++void
+ BLAS_FUNC(cgetri)(CBLAS_INT *n, npy_complex64 a[], CBLAS_INT *lda, CBLAS_INT ipiv[],
+                   npy_complex64 work[], CBLAS_INT *lwork, CBLAS_INT *info
+ );
+-CBLAS_INT
++void
+ BLAS_FUNC(zgetri)(CBLAS_INT *n, npy_complex128 a[], CBLAS_INT *lda, CBLAS_INT ipiv[],
+                   npy_complex128 work[], CBLAS_INT *lwork, CBLAS_INT *info
+ );
+diff --git a/scipy/optimize/_trlib/trlib_private.h b/scipy/optimize/_trlib/trlib_private.h
+index 92bfabe51d..06abcc72f2 100644
+--- a/scipy/optimize/_trlib/trlib_private.h
++++ b/scipy/optimize/_trlib/trlib_private.h
+@@ -49,7 +49,9 @@ double BLAS_FUNC(ddot)(CBLAS_INT *n, double *x, CBLAS_INT *incx, double *y, CBLA
+ void BLAS_FUNC(dpttrf)(CBLAS_INT *n, double *d, double *e, CBLAS_INT *info);
+ void BLAS_FUNC(dpttrs)(CBLAS_INT *n, CBLAS_INT *nrhs, double *d, double *e, double *b, CBLAS_INT *ldb, CBLAS_INT *info);
+ void BLAS_FUNC(dptrfs)(CBLAS_INT *n, CBLAS_INT *nrhs, double *d, double *e, double *df, double *ef, double *b, CBLAS_INT *ldb, double *x, CBLAS_INT *ldx, double *ferr, double *berr, double *work, CBLAS_INT *info);
+-void BLAS_FUNC(dlagtm)(char *trans, CBLAS_INT *n, CBLAS_INT *nrhs, double *alpha, double *dl, double *d, double *du, double *x, CBLAS_INT *ldx, double *beta, double *b, CBLAS_INT *ldb, int);
++// dlagtm is declared without a trailing hidden Fortran
++// string length for trans. See gh-25592.
++void BLAS_FUNC(dlagtm)(char *trans, CBLAS_INT *n, CBLAS_INT *nrhs, double *alpha, double *dl, double *d, double *du, double *x, CBLAS_INT *ldx, double *beta, double *b, CBLAS_INT *ldb);
+ 
+ 
+ static void trlib_daxpy(trlib_int_t *n, double *alpha, double *x, trlib_int_t *incx, double *y, trlib_int_t *incy)
+@@ -108,7 +110,7 @@ static void trlib_dlagtm(char *trans, trlib_int_t *n, trlib_int_t *nrhs, double
+                          trlib_int_t *ldx, double *beta, double *b, trlib_int_t *ldb)
+ {
+     CBLAS_INT n_ = *n, nrhs_ = *nrhs, ldb_ = *ldb, ldx_ = *ldx;
+-    BLAS_FUNC(dlagtm)(trans, &n_, &nrhs_, alpha, dl, d, du, x, &ldx_, beta, b, &ldb_, 1);
++    BLAS_FUNC(dlagtm)(trans, &n_, &nrhs_, alpha, dl, d, du, x, &ldx_, beta, b, &ldb_);
+ }
+ 
+ 
+-- 
+2.50.1 (Apple Git-155)
+