Bug 194258 - CSTD idiom doesn't exist for CXXFLAGS
Summary: CSTD idiom doesn't exist for CXXFLAGS
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Enji Cooper
Depends on:
Reported: 2014-10-08 23:31 UTC by Enji Cooper
Modified: 2023-01-24 13:35 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer 2014-10-08 23:31:53 UTC
CSTD sets -std= in CFLAGS, but not CXXFLAGS. It should do it for both (the reason why I didn't commit a change immediately is that it requires discussion and testing via a ports tinderbox).
Comment 1 Dimitry Andric freebsd_committer 2014-10-09 06:49:39 UTC
Since the standard names for C and C++ are different, you cannot really use the CSTD variable.  I would suggest using CXXSTD, which is consistent with all the other "CXX" prefixes.

The available options should probably be:
* c++98
* gnu++98
* c++03
* gnu++03
* c++0x
* gnu++0x
* c++11
* gnu++11
* c++1y
* gnu++1y
* c++14    (these are only available from clang 3.5 and higher)
* gnu++14

Although the usefulness of the 03, 0x and 1y 'standards' is debatable, at least for the base system.  For ports, all of these should obviously be available.
Comment 2 Fernando Apesteguía freebsd_committer 2023-01-24 13:35:04 UTC
Added by ngie@ in e8067928ff5f8
Comment 3 Fernando Apesteguía freebsd_committer 2023-01-24 13:35:47 UTC
^Triage: assigning to committer who resolved the issue