From owner-freebsd-standards@freebsd.org Sun Sep 13 10:55:02 2015 Return-Path: Delivered-To: freebsd-standards@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E9049CDCB0 for ; Sun, 13 Sep 2015 10:55:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 518E319DD for ; Sun, 13 Sep 2015 10:55:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DAt2XQ090390 for ; Sun, 13 Sep 2015 10:55:02 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 203066] _Thread_local detection is broken with GCC < 4.9 Date: Sun, 13 Sep 2015 10:55:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rakuco@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2015 10:55:02 -0000 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 " 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. From owner-freebsd-standards@freebsd.org Sun Sep 13 11:16:26 2015 Return-Path: Delivered-To: freebsd-standards@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA687A0199B for ; Sun, 13 Sep 2015 11:16:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A697F117E for ; Sun, 13 Sep 2015 11:16:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DBGQeT056420 for ; Sun, 13 Sep 2015 11:16:26 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 203066] _Thread_local detection is broken with GCC < 4.9 Date: Sun, 13 Sep 2015 11:16:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ed@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2015 11:16:26 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203066 Ed Schouten changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |Not A Bug Status|New |Closed --- Comment #1 from Ed Schouten --- Hi Raphael, Even though I agree that this isn't nice, I'm inclined to say that this is a "won't fix". What happens here is that you're instructing the compiler to build a source file in C11 mode, using an (outdated) compiler that does not implement C11. It is wrong for the compiler to set __STDC_VERSION__ to 201112L, even though it does not implement that version of the standard in the first place. Keep in mind that this is not some kind of esoteric feature of the standard we're using -- it's one of the core features introduced in C11. In other words, simply don't use GCC < 4.9 in combination with -std=gnu11. It's broken. That said, I don't feel about this too strongly. If someone else is willing to work on this, please reopen. :-) Thanks, Ed -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@freebsd.org Sun Sep 13 11:48:25 2015 Return-Path: Delivered-To: freebsd-standards@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90DA5A03B42 for ; Sun, 13 Sep 2015 11:48:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D23B1E33 for ; Sun, 13 Sep 2015 11:48:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DBmPpU004810 for ; Sun, 13 Sep 2015 11:48:25 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 203066] _Thread_local detection is broken with GCC < 4.9 Date: Sun, 13 Sep 2015 11:48:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2015 11:48:25 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203066 --- Comment #2 from Konstantin Belousov --- (In reply to Ed Schouten from comment #1) Part of the problem is that default gcc from ports is 4.8. It does not cost much to add gcc version check and avoid the problem. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@freebsd.org Sun Sep 13 11:50:33 2015 Return-Path: Delivered-To: freebsd-standards@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 164E4A03C14 for ; Sun, 13 Sep 2015 11:50:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02D641F44 for ; Sun, 13 Sep 2015 11:50:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DBoWQY011847 for ; Sun, 13 Sep 2015 11:50:32 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 203066] _Thread_local detection is broken with GCC < 4.9 Date: Sun, 13 Sep 2015 11:50:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ed@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2015 11:50:33 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203066 --- Comment #3 from Ed Schouten --- (In reply to Konstantin Belousov from comment #2) Ports also has a USE_CSTD knob that can be used to use different dialects of C. Ports could easily use GCC 4.9 in case GCC is required and USE_CSTD is set to C11. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@freebsd.org Sun Sep 13 21:00:23 2015 Return-Path: Delivered-To: freebsd-standards@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15889A031DA for ; Sun, 13 Sep 2015 21:00:23 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E45BB12B7 for ; Sun, 13 Sep 2015 21:00:22 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DL0McM012054 for ; Sun, 13 Sep 2015 21:00:22 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201509132100.t8DL0McM012054@kenobi.freebsd.org> From: bugzilla-noreply@FreeBSD.org To: freebsd-standards@FreeBSD.org Subject: Problem reports for freebsd-standards@FreeBSD.org that need special attention X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 Date: Sun, 13 Sep 2015 21:00:22 +0000 Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2015 21:00:23 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- Open | 191586 | FreeBSD doesn't validate negative edgecases in bi 1 problems total for which you should take action. From owner-freebsd-standards@freebsd.org Wed Sep 16 14:56:56 2015 Return-Path: Delivered-To: freebsd-standards@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCCDF9CDB8F for ; Wed, 16 Sep 2015 14:56:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B958E1AB8 for ; Wed, 16 Sep 2015 14:56:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GEuuio099292 for ; Wed, 16 Sep 2015 14:56:56 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 203066] _Thread_local detection is broken with GCC < 4.9 Date: Wed, 16 Sep 2015 14:56:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2015 14:56:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203066 --- Comment #4 from commit-hook@freebsd.org --- A commit references this bug: Author: rakuco Date: Wed Sep 16 14:56:08 UTC 2015 New revision: 397068 URL: https://svnweb.freebsd.org/changeset/ports/397068 Log: Add upstream patch to fix the build with GCC 4.6, 4.7 and 4.8. runetype.h uses _Thread_local, and if we pass -std=c11 or -std=gnu11 to GCC the header expects it to be supported as part of the language and does not make it a typedef or something else. Since GCC only started supporting _Thread_local with the 4.9 series, building CMake with, say, lang/gcc (which is 4.8) fails: /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 The upstream patch adds a test for _Thread_local and uses C99 instead of C11 if it fails. PR: 203066 Changes: head/devel/cmake/files/patch-git_ffa6f057 -- You are receiving this mail because: You are the assignee for the bug.