Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jul 2023 00:15:20 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Nuno Teixeira <eduardo@freebsd.org>
Cc:        FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: Removing unneeded USES=compiler:c11 (?)
Message-ID:  <1BB45BF0-8947-4F95-87B8-227BEED2EE07@FreeBSD.org>
In-Reply-To: <CAFDf7ULY3MkGEtm1_auU1G70Vt5kcHNseKH5mSS6CwE5tih9wA@mail.gmail.com>
References:  <CAFDf7ULY3MkGEtm1_auU1G70Vt5kcHNseKH5mSS6CwE5tih9wA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_5096408D-011D-4D3D-B2A7-B509C764E7A0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 6 Jul 2023, at 22:41, Nuno Teixeira <eduardo@freebsd.org> wrote:
>=20
> Could USES=3Dcompiler:c11 be removed from ports presuming that =
available compilers support c11? (Do they ?)

There are probably older versions of gcc and clang that don't support =
C11 yet, but I think all recent versions do. But it couldn't hurt to =
leave this in, I guess.

This does not automatically mean that -std=3Dc11 is added to the C =
compiler command line, for that you have to specify USE_CSTD=3Dc11 in =
the port Makefile.


> I'm confused because some aws CMakeLists.txt have:
>=20
> if(NOT CMAKE_CXX_STANDARD)
>     set(CMAKE_CXX_STANDARD 11)
> endif()
>=20
> But c++11 have nothing to do with c11 (for what wikipedia says)....

Yes, that is only specifying for some CMake files that if the end-user =
does not explicitly specify a C++ standard, it will use C++11. In =
practice, this will put -std=3Dc++11 on the C++ compiler =
(${CMAKE_CXX_COMPILER}) command line.

For ports you can achieve the same result by adding USE_CXXSTD=3Dc++11 =
in the port Makefile.

-Dimitry


--Apple-Mail=_5096408D-011D-4D3D-B2A7-B509C764E7A0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZKc8+AAKCRCwXqMKLiCW
oyfoAJ9U2JfNxZHVLtv9KE2uCgiI3v5wpACg/6HDh7NoLCJZCui14TY0yi5lDFM=
=TOvp
-----END PGP SIGNATURE-----

--Apple-Mail=_5096408D-011D-4D3D-B2A7-B509C764E7A0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1BB45BF0-8947-4F95-87B8-227BEED2EE07>