Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2016 16:13:21 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        toolchain@FreeBSD.org
Subject:   Re: CXXSTD=c++11
Message-ID:  <56F47491.5020203@FreeBSD.org>
In-Reply-To: <7B77010A-B377-4B1A-835A-D48F59E5290D@FreeBSD.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--h7o6XLqb4M3ppTapfOnV32c0KLEh81rPW
Content-Type: multipart/mixed; boundary="dXw2StUE6tWeTamCFu8jHcD0VmJgTFrh0"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Dimitry Andric <dim@FreeBSD.org>
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 <bdrewery@FreeBSD.org> 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 <bdrewery@FreeBSD.org> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56F47491.5020203>