On 12/10/2015 04:03 AM, CHEVRIER, Marc wrote:
> I identify the root of the problem: if I specify version 3.4 in
> cmake_minimum_required, generated link command (stored in file link.txt)
> for an executable does not contains value specified in variable
> CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS. Specifying 3.3 fix the problem.
> So this is a regression introduced in 3.4.

It is not technically a backward incompatibility because project code
that worked in 3.3 will still work the same way in 3.4.  Only after
modifying the code to require 3.4 does the behavior change, but the
new behavior is a regression.  This is policy CMP0065:

 https://cmake.org/cmake/help/v3.4/policy/CMP0065.html

introduced here:

 CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9784af1b

The bug is that CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS is intended
to be equivalent to "-rdynamic" on Linux, but the AIX platform file
is using it for other flags too:

> set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall")

This should be just

 set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall")

and the `-Wl,-brtl,-bnoipath` flags should move elsewhere.  One could
add them directly to the CMAKE_${lang}_LINK_EXECUTABLE command line,
for example.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to