[cmake-developers] CMake 3.40, CMAKE_C_STANDARD_COMPUTED_DEFAULT and LTO

Brad King brad.king at kitware.com
Tue Nov 17 12:11:06 EST 2015


On 11/17/2015 11:03 AM, Setze Post wrote:
> First ever upstreamed upstreamed mail from me, please gently inform me
> if I took the wrong route here.
> Running Gentoo Linux x86_64 and compiling with LTO enabled in C*FLAGS,
> the configuration stage seems to fail compiling CMake 3.4.0 as described
> here: https://bugs.gentoo.org/show_bug.cgi?id=565744
> Compiling CMake without LTO worked flawlessly, however, the same problem
> seems to always occur when compiling other packages using CMake with LTO
> enabled for those packages. I managed to fix the issue for my local
> machines applying a patch I wrote, available here:
> https://bugs.gentoo.org/attachment.cgi?id=416970
> However, I am not very knowledgeable about C, configure/compile tool
> chains and CMake, so I imagine something totally unrelated might be
> going on here just as well.

Thanks!  You've come to the right place and the proposed change
is correct.  I've applied it here:

 Make C and C++ default dialect detection robust to advanced optimizations
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=716a09b9

I've also queued it for merge to 'release' for inclusion in 3.4.1.

Thanks,
-Brad



More information about the cmake-developers mailing list