diff options
author | Pauli Virtanen <pav@iki.fi> | 2020-01-02 02:50:10 +0200 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2020-01-14 00:19:50 +0200 |
commit | d611d2e3722ea9ba4ae1a6e333a02ab8c4005f85 (patch) | |
tree | c5da148629e49f96e1ebcf793947d23e2f48c533 /numpy/linalg/setup.py | |
parent | 33d5be08046c2e8a3cbbd35f3c2367f925ee2bdc (diff) | |
download | numpy-d611d2e3722ea9ba4ae1a6e333a02ab8c4005f85.tar.gz |
MAINT: linalg: use symbol suffix in fallback lapack_lite
When building the fallback lapack_lite library for numpy.linalg,
add symbol suffix to the routines when using 64-bit integer indices.
Adjust the lapack_lite generator script to also output a header file
that renames the symbols. Moreover, also rename symbols from f2c.c, to
be sure (because they have short and generic names that may clash).
This avoids a name clash with BLAS/LAPACK names, which can cause
problems in corner cases on platforms where inadvertent symbol
overriding in dynamic libraries can occur.
Diffstat (limited to 'numpy/linalg/setup.py')
-rw-r--r-- | numpy/linalg/setup.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/numpy/linalg/setup.py b/numpy/linalg/setup.py index 0aa0566d6..e4d47b885 100644 --- a/numpy/linalg/setup.py +++ b/numpy/linalg/setup.py @@ -40,8 +40,13 @@ def configuration(parent_package='', top_path=None): def calc_info(self): info = {'language': 'c'} if sys.maxsize > 2**32: - # Build lapack-lite in 64-bit integer mode - info['define_macros'] = [('HAVE_BLAS_ILP64', None)] + # Build lapack-lite in 64-bit integer mode. + # The suffix is arbitrary (lapack_lite symbols follow it), + # but use the "64_" convention here. + info['define_macros'] = [ + ('HAVE_BLAS_ILP64', None), + ('BLAS_SYMBOL_SUFFIX', '64_') + ] self.set_info(**info) lapack_info = numpy_linalg_lapack_lite().get_info(2) |