lapack/Fix-MinGW-build-error.patch

40 lines
1.6 KiB
Diff
Raw Normal View History

From 489a2884c22e8593ec47bfe7c84ab451b0c0d3d9 Mon Sep 17 00:00:00 2001
From: Julien Schueller <schueller@phimeca.com>
Date: Mon, 25 Nov 2019 19:41:16 +0100
Subject: [PATCH] Fix MinGW build error
With MinGW the build fails for some LAPACKE xgesvd routines with:
lapacke_cgesvdq.c:74:5: error: aggregate value used where an integer was expected
Seems the C2INT macro is useful there.
---
LAPACKE/src/lapacke_cgesvdq.c | 2 +-
LAPACKE/src/lapacke_zgesvdq.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/LAPACKE/src/lapacke_cgesvdq.c b/LAPACKE/src/lapacke_cgesvdq.c
index 801569453..6ecd06962 100644
--- a/LAPACKE/src/lapacke_cgesvdq.c
+++ b/LAPACKE/src/lapacke_cgesvdq.c
@@ -71,7 +71,7 @@ lapack_int LAPACKE_cgesvdq( int matrix_layout, char joba, char jobp,
goto exit_level_0;
}
liwork = (lapack_int)iwork_query;
- lcwork = (lapack_int)cwork_query;
+ lcwork = LAPACK_C2INT(cwork_query);
lrwork = (lapack_int)rwork_query;
/* Allocate memory for work arrays */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
diff --git a/LAPACKE/src/lapacke_zgesvdq.c b/LAPACKE/src/lapacke_zgesvdq.c
index 7c205dab3..1674138fc 100644
--- a/LAPACKE/src/lapacke_zgesvdq.c
+++ b/LAPACKE/src/lapacke_zgesvdq.c
@@ -71,7 +71,7 @@ lapack_int LAPACKE_zgesvdq( int matrix_layout, char joba, char jobp,
goto exit_level_0;
}
liwork = (lapack_int)iwork_query;
- lcwork = (lapack_int)cwork_query;
+ lcwork = LAPACK_C2INT(cwork_query);
lrwork = (lapack_int)rwork_query;
/* Allocate memory for work arrays */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );