https://github.com/Kitware/CMake
Revision 0f150b69d3a01c3c5b4a96d10334eb2703ba237f authored by Brad King on 12 July 2019, 00:32:59 UTC, committed by Brad King on 15 July 2019, 17:27:16 UTC
On AIX, symbols in shared objects must be exported in order to be
visible to dependents (similar to Windows).  The AIX linker provides a
`-bE:...` option to specify a file listing symbols to be exported.
Compilers offer some features to help:

* When the XL compiler is invoked with its `-qmkshrobj`/`-G` options for
  creating shared objects (without/with runtime linking), it recognizes
  when no explicit `-bE:...` linker option is specified and runs a
  `CreateExportList` tool provided with the compiler to compute one from
  the object files.  Since commit d468a2c2cb (XL: Avoid copying archives
  into shared libraries that link them, 2011-04-07, v2.8.5~153^2) CMake
  runs `CreateExportList` explicitly to ensure it only looks at the object
  files and not any library files.

* When the GNU compiler is invoked with its `-shared` option for creating
  shared objects, its internal `collect2` tool recognizes when no explicit
  `-bE:...` linker option is specified and computes one itself from the
  object files.  However, it sometimes includes extra symbols such as
  `.__init_aix_libgcc_cxa_atexit`.

Introduce our own internal `ExportImportList` script to compute symbol
export lists from object files.  Use a basic implementation for now: it
can be extended as needed later.  Update our shared library creation
rules to run the script explicitly for both the XL and GNU compilers.

Issue: #19163
1 parent a5bf4e7
Raw File
Tip revision: 0f150b69d3a01c3c5b4a96d10334eb2703ba237f authored by Brad King on 12 July 2019, 00:32:59 UTC
AIX: Explicitly compute shared object exports for both XL and GNU
Tip revision: 0f150b6
CMakeGraphVizOptions.cmake
set(GRAPHVIZ_IGNORE_TARGETS "tartest;testSystemTools;testRegistry;testProcess;testIOS;testHashSTL;testFail;testCommandLineArguments;xrtest;LIBCURL;foo")
back to top