[cmake-developers] Enhance CMake Comportment in AIX
GUESNET, ETIENNE (ext)
etienne.guesnet.external at atos.net
Wed Mar 27 09:30:56 EDT 2019
Hello,
I am working on the AIX port of the CMake. Something exists, but a large part is done using some flags, typically -expall and -G. These flag force AIX build chain to be more similar than Linux (e.g. use .so while AIX use .a). Unfortunately, this solution has side effect and means no any software compiling on AIX using CMake will work on the standard AIX way.
I am trying to educate CMake to work better on AIX (in a first time I focus on GCC). I change the 'CMAKE_SHARED_LIBRARY_SUFFIX' to ".a" and I adapt the 'CMAKE_${lang}_CREATE_SHARED_LIBRARY' to create first .so and then use 'ar' to create .a. It works.
However, a problem appears during linking: CMake transform -l and -L flag to direct link. So, it searches e.g. '../libMyLib.a' and I want '-L.. -lMyLib'. This puts a relative path to the executable (I see it with the 'dump' command), that is not the expected comportment. Do you know how to change this comportment ?
Finally, I have huge troubles with 'dlopen'. In AIX, all symbols are not exported by default, export all makes side effect, and we need to export and import symbols to correctly use a shared library imported this way. I do not find a way to make import/export automatically. As I know, libtools or configure mix a two passes compilation and some flag manually added.
Thanks,
Etienne Guesnet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20190327/ab44dabc/attachment.html>
More information about the cmake-developers
mailing list