[CMake] cmake shared library exported symbols on 64bit AIX XLC compiler

Roman Bolshakov roolebo at gmail.com
Tue Feb 24 00:57:10 EST 2015


Hi Michael,

Gotcha, thanks for explanation. Right, there should be a way to pass
-X32/-X64 for CreateExportList right prior to
<OBJECT_DIR>/objects.exp. Current definition in
Modules/Compiler/XL.cmake doesn't have a spot for that:
       set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
      "${CMAKE_XL_CreateExportList} <OBJECT_DIR>/objects.exp <OBJECTS>
      "<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS>
<LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS>
-Wl,-bE:<OBJECT_DIR>/objects.exp <SONAME_FLAG><TARGET_SONAME> -o
<TARGET> <OBJECTS> <LINK_LIBRARIES>"
      )

I think it's worth a bug report/contribution. Not sure if it'd work
but if you might try to modify your local installation of CMake and
add something like <CMAKE_XL_CreateExportList_FLAGS> right after
${CMAKE_XL_CreateExportList} in XL.cmake and then add -X32/-X64 into
CMAKE_XL_CreateExportLists_FLAGS in your CMakeLists.txt

Roman


More information about the CMake mailing list