[CMake] Issues with adding -flto in CMAKE_C[XX]_FLAGS_RELEASE

Daniel Schepler dschepler at scalable-networks.com
Wed Apr 29 19:52:36 EDT 2015


I've managed to create a small test case that reproduces the issue, and posted a bug report: http://www.cmake.org/Bug/view.php?id=15547 .  It would seem that the issue occurs if you try to update CMAKE_AR and CMAKE_RANLIB after a previous run of CMake - though not if you include those settings on the first CMake run.
--
Daniel Schepler
________________________________
From: CMake [cmake-bounces at cmake.org] on behalf of Daniel Schepler [dschepler at scalable-networks.com]
Sent: Wednesday, April 29, 2015 11:20 AM
To: cmake at cmake.org
Subject: [CMake] Issues with adding -flto in CMAKE_C[XX]_FLAGS_RELEASE

I just tried an experiment on our code base, adding -flto to the default values of CMAKE_C_FLAGS_RELEASE and CMAKE_CXX_FLAGS_RELEASE, and setting CMAKE_AR to /usr/bin/gcc-ar-5, CMAKE_RANLIB to /usr/bin/gcc-ranlib-5.  However, make VERBOSE=1 shows that the intermediate static libraries are still being created using /usr/bin/ar; and I can't find any other instances of /usr/bin/ar in CMakeCache.txt.  That results in lots of BFD warnings showing up, and linker errors at the end.

Is there something I'm missing that would make this able to work; or is this configuration not supported (yet)?
--
Daniel Schepler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150429/a9b291f0/attachment.html>


More information about the CMake mailing list