Implemented `--omit-symbols=LIST` `configure` option.
Details:
- Added a new option to
configurethat allows the user to specify a list of symbols to omit from the library. The format of the option is--omit-symbols=LISTwhereLISTis a comma-separated list of symbol names (excluding any trailing underscore). This list is parsed into a list of#definedirectives that causes the relevant parts of BLIS to be ignored (or not). As such, the nature of this option is to only support omitting symbols which have been pre-identified as potential troublemakers when linking BLIS with other libraries such as LAPACK or ScaLAPACK. (This list may grow in the future as additional symbols are identified.) - Re-implemented the
--enable-scalapack-compatconfigureoption to utilize the underlying--omit-symbols=LISTinfrastructure. - Implemented an
--enable-lapack-compatoption, which omits all of the known problematic symbols currently supported for omission. - This commit addresses Issue #816. Thanks to Timo Betcke for bringing it to our attention and to Devin Matthews for his advice and for his initial implementation of
--enable-scalapack-compat(PR #813). - CREDITS file update.
cc @tbetcke
I'm working on fixing some oversights in the original commit.
Separately, we'll need to decide whether omitting a symbol should also cause blis.h to omit its function prototype. Normally I'd say yes, but in the cases of lsame_() and xerbla_(), omitting prototypes causes a lot of warnings due to invocations of those functions the BLAS compatibility _check() functions. 🤔 (Naturally, if those symbols are omitted from the library, we won't be able to link against the [shared] library as-is, but it'd be nice if it at least compiled cleanly.)
Separately, we'll need to decide whether omitting a symbol should also cause blis.h to omit its function prototype. Normally I'd say yes, but in the cases of lsame_() and xerbla_(), omitting prototypes causes a lot of warnings due to invocations of those functions the BLAS compatibility _check() functions.
I'd be OK making an exception to the "no symbol, no prototype" rule just for those two functions.
@tbetcke Since you were involved in #816, can you give this PR a try?
Take a look at configure --help to see the new symbol omission / compat options. Thanks for your help.
@devinamatthews Given that we haven't heard from @tbetcke, I'm okay with merging this commit if you are.
Good with me.