Picking up on the discussion that developed in pull request #37, it would probably be best for BLIS to not automatically export all symbols in its shared libraries, but rather only export the ones that correspond to "public" APIs.
In summary, this means:
- compiling with
-fvisibility=hidden, which sets the default symbol visibility to hidden;
- marking all BLAS/CBLAS functions as public;
- marking some subset of BLIS typed API functions as public;
- marking some subset of BLIS object API functions as public.
Also, if the export statements (that mark a symbol as public) are macroized, the macro can be defined conditionally based on whether we are building a Linux shared object or a Windows DLL.
GNU gcc documentation on symbol visibility can be found here.