[cmake-developers] [CMake 0015741]: GCC < 4.9 does not have full C11 support
Mantis Bug Tracker
mantis at public.kitware.com
Sun Sep 13 14:14:27 EDT 2015
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15741
======================================================================
Reported By: Raphael Kubo da Costa
Assigned To:
======================================================================
Project: CMake
Issue ID: 15741
Category: CMake
Reproducibility: N/A
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-09-13 14:14 EDT
Last Modified: 2015-09-13 14:14 EDT
======================================================================
Summary: GCC < 4.9 does not have full C11 support
Description:
As of version 3.3.1, CMake sets CMAKE_C11_{STANDARD,EXTENSION}_COMPILE_OPTION
for GCC >= 4.7, and checks for C11 features for GCC >= 4.6. Additionally, it
means CMake itself will be built with -std=gnu11 if GCC >= 4.7 is used.
However, GCC only has full C11 support with the 4.9 release
(https://gcc.gnu.org/wiki/C11Status). Specifically, support for C11's
_Thread_local is only present on GCC >= 4.9. This combination makes CMake fail
to build with GCC 4.7 and 4.8 on FreeBSD, as runetype.h uses _Thread_local and
the fact that -std=gnu11 is passed makes it not be a typedef or define for
something else that would work. In
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203066, it was argued that
this is GCC's fault for advertising C11 support in 4.7 and 4.8 before it was
fully ready.
Before sending a patch to GNU-C.cmake, I'd like to check if it makes sense or
what the best approach would be.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-09-13 14:14 Raphael Kubo da CostaNew Issue
======================================================================
More information about the cmake-developers
mailing list