Skip to content

AIX export symbol

Etienne Guesnet requested to merge EGuesnet/cmake:AIX into master

Related to Issue 19163: CMake rules for AIX do not export the correct symbols and do not use the correct mechanism to export symbols.

With these patches, CMake will create and search archive (.a) for shared libraries and shared object (.so) for shared module.

The previous port of CMake to AIX uses two flags to compile: -G and -bexpall (or some variants, e.g. -rtl that is induced by -G). These flags have sides effects, as David Edelsohn described.

Note in some cases (dlopen or plugin system), we need explicit import/export of symbols.

Tests pass on Linux (Fedora 29) and AIX (6.1, 7.1, 7.2), with Gcc 8, xlc 13 (tested on AIX only) and xlc 16. We have used patched CMake to compile mongo-c, mariadb-connector-c, and Mariadb (huge sorftware with plugin system).

Merge request reports