From eb9cdc5cec140b5b029ac22e25bf4ade24903798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= <65065102+mmuetzel@users.noreply.github.com> Date: Mon, 10 Oct 2022 10:14:43 +0200 Subject: [PATCH] Make sure `lsame_` is exported The reference (netlib) LAPACK implementation exports `lsame_` unconditionally. When trying to use libflame as a drop-in replacement for the reference implementation on Windows, programs fail to start with an error that the symbol `lsame_` is undefined. IIUC, that is because the symbol resolution is done on link time for Windows (instead of at runtime on most other platforms). The proposed change makes sure that `lsame_` is exported from libflame even if configured with `--disable-lapack2flame --disable-builtin-blas` (the default). IIUC, an alternative would be to export this symbol defined in `src/flablas/f2c/lsame.c`. But the proposed change is a bit closer to the reference implementation. See also this downstream report: https://savannah.gnu.org/bugs/index.php?63184 --- src/map/lapack2flamec/f2c/install/static/lsame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/lapack2flamec/f2c/install/static/lsame.c b/src/map/lapack2flamec/f2c/install/static/lsame.c index 75cb81c44..4093aa074 100644 --- a/src/map/lapack2flamec/f2c/install/static/lsame.c +++ b/src/map/lapack2flamec/f2c/install/static/lsame.c @@ -14,7 +14,7 @@ #include "FLA_f2c.h" #include "stdio.h" -#ifdef FLA_ENABLE_LAPACK2FLAME +#if defined(FLA_ENABLE_LAPACK2FLAME) || ! defined(FLA_ENABLE_BUILTIN_BLAS) logical lsame_(char *ca, char *cb) { /* System generated locals */