From owner-freebsd-toolchain@freebsd.org Thu Mar 24 23:13:23 2016 Return-Path: Delivered-To: freebsd-toolchain@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 0D7B9ADD965 for ; Thu, 24 Mar 2016 23:13:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id E52F11C53 for ; Thu, 24 Mar 2016 23:13:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id E43FAADD964; Thu, 24 Mar 2016 23:13:22 +0000 (UTC) Delivered-To: toolchain@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 E3DACADD963 for ; Thu, 24 Mar 2016 23:13:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id C72B01C50; Thu, 24 Mar 2016 23:13:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id BC02E19E5; Thu, 24 Mar 2016 23:13:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 74F4B2009D; Thu, 24 Mar 2016 23:13:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 4XG6XCqYZxul; Thu, 24 Mar 2016 23:13:19 +0000 (UTC) Subject: Re: CXXSTD=c++11 DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com F3B7D20096 To: Dimitry Andric References: <56F46BE0.7080909@FreeBSD.org> <43ABA5F3-60E0-4A29-9698-B345A3DA0A8B@FreeBSD.org> <56F46E1B.4010605@FreeBSD.org> <56F46F67.2000807@FreeBSD.org> <7B77010A-B377-4B1A-835A-D48F59E5290D@FreeBSD.org> Cc: toolchain@FreeBSD.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56F47491.5020203@FreeBSD.org> Date: Thu, 24 Mar 2016 16:13:21 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <7B77010A-B377-4B1A-835A-D48F59E5290D@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h7o6XLqb4M3ppTapfOnV32c0KLEh81rPW" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2016 23:13:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --h7o6XLqb4M3ppTapfOnV32c0KLEh81rPW Content-Type: multipart/mixed; boundary="dXw2StUE6tWeTamCFu8jHcD0VmJgTFrh0" From: Bryan Drewery To: Dimitry Andric Cc: toolchain@FreeBSD.org Message-ID: <56F47491.5020203@FreeBSD.org> Subject: Re: CXXSTD=c++11 References: <56F46BE0.7080909@FreeBSD.org> <43ABA5F3-60E0-4A29-9698-B345A3DA0A8B@FreeBSD.org> <56F46E1B.4010605@FreeBSD.org> <56F46F67.2000807@FreeBSD.org> <7B77010A-B377-4B1A-835A-D48F59E5290D@FreeBSD.org> In-Reply-To: <7B77010A-B377-4B1A-835A-D48F59E5290D@FreeBSD.org> --dXw2StUE6tWeTamCFu8jHcD0VmJgTFrh0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 3/24/2016 3:54 PM, Dimitry Andric wrote: > On 24 Mar 2016, at 23:51, Bryan Drewery wrote: >> >> On 3/24/2016 3:45 PM, Bryan Drewery wrote: >>> On 3/24/2016 3:44 PM, Dimitry Andric wrote: >>>> On 24 Mar 2016, at 23:36, Bryan Drewery wrote= : >>>>> >>>>> Is there any problem with forcing -std=3Dc++11 for all CXX/LIB_CXX = builds >>>>> now? We do this when using an external GCC since it doesn't defaul= t to >>>>> the c++11 standard quite yet. As far as I understand, we require c= ++11 >>>>> to build clang/libc++. >>>> >>>> Yes, but it already passes -std=3Dc++11 in the correct places, as fa= r as I >>>> know. E.g. during the clang and libc++ builds. >>>> >>>> >>>>> It seems to be the problem at >>>>> https://lists.freebsd.org/pipermail/freebsd-toolchain/2015-October/= 001757.html >>>>> which I've fixed in an upcoming commit to properly pass -std=3Dc++1= 1 to >>>>> the lib32 build in CXXFLAGS. >>>> >>>> Hm, is this occuring during the build of libcxxrt, or of libc++? If= it >>>> is the former, then it seems that the system headers don't properly >>>> declare _Static_assert() in that case. I have no clue as to why, th= ough >>>> maybe it's picking something up from gcc's famously "fixed" standard= >>>> headers? >>>> >>> >>> libcxxrt. >>> >>> My fix also includes passing the proper -isystem =3D/usr/include/c++/= v1 path. >>> >>> I'll try without the -std change. >>> >>> >> >> It fails without -std=3Dc++11 (there's more discussion in that link an= d in >> PR 205453). >=20 > Yeah, I also commented on PR 205453 in the past, but I still don't > understand where the external gcc gets its _Static_assert macro from. > Or whether it gets it at all. Maybe we should place a hack for this in= > sys/cdefs.h? We shouldn't litter contrib code with #ifdef GCC_VERSION > blocks. >=20 Well _Static_assert is C++11 and static_assert is C11. These files are being built by GCC as C++03, so neither is presumably available without raising the standard. Shouldn't this be using static_assert with a CXXFLAGS+=3D-std=3Dc++11 or CSTD=3Dc11 ? --=20 Regards, Bryan Drewery --dXw2StUE6tWeTamCFu8jHcD0VmJgTFrh0-- --h7o6XLqb4M3ppTapfOnV32c0KLEh81rPW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJW9HSRAAoJEDXXcbtuRpfPoWAH/iPyqyGp4AFEZc3TzfQJnVst qXVqpopuESLGlfJa6MC7wq5a7qHt4zWfXs+C4uPZeaB/HHGzua9+Xapa4A+wjj+P 1g4TWHKi0zcRqoc1V0s/bQDM8xdjOG4I3eIpgK9Qde8eOERUjlKpNrICi40NOjtN g05jAsU5urC4Ld2UYldbP6uFI7fGfm6qUiKBu5aKt5wn+/3jck8y9ZGuAHg+wV34 zQ3NV2TbPao0rIYWkyCC9q4g/0S/VXgBxIRrKlkBCehmnyjkOsOHePKrtGWOmVIP xXmBpijrDrct6eqXFnCIJsTa2fC+cXE2F7sGXFRvVQccQo9hWmSRqIiPWIqFQRY= =OmAz -----END PGP SIGNATURE----- --h7o6XLqb4M3ppTapfOnV32c0KLEh81rPW--