Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Sep 2015 10:55:02 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-standards@FreeBSD.org
Subject:   [Bug 203066] _Thread_local detection is broken with GCC < 4.9
Message-ID:  <bug-203066-15@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203066

            Bug ID: 203066
           Summary: _Thread_local detection is broken with GCC < 4.9
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: standards
          Assignee: freebsd-standards@FreeBSD.org
          Reporter: rakuco@FreeBSD.org
                CC: ed@FreeBSD.org, theraven@FreeBSD.org

sys/cdefs.h contains:

    #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L ||
defined(lint)
    ...
    #if !__has_extension(c_thread_local)
    ...
    #if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \
        __has_extension(cxx_thread_local)
    #define _Thread_local           thread_local
    #else
    #define _Thread_local           __thread
    #endif
    #endif

However, _Thread_local support has only been added to GCC in the 4.9 series, so
"#include <runetype.h>" fails with both `gcc47 -std=gnu11' and `gcc48
-std=gnu11':

    /usr/include/runetype.h:92:22: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'const'
    /usr/include/runetype.h: In function '__getCurrentRuneLocale':
    /usr/include/runetype.h:96:6: error: '_ThreadRuneLocale' undeclared (first
use in this function)
    /usr/include/runetype.h:96:6: note: each undeclared identifier is reported
only once for each function it appears in

A consequence of this is that some ports may fail to build; for example,
devel/cmake with lang/gcc (bug#200969, comment #11).

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-203066-15>