Page MenuHomeFreeBSD

Standardize -std=c++* as CXXSTD
ClosedPublic

Authored by ngie on Mar 28 2019, 12:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 15, 9:50 PM
Unknown Object (File)
Fri, Mar 15, 9:49 PM
Unknown Object (File)
Fri, Mar 15, 9:45 PM
Unknown Object (File)
Tue, Mar 12, 2:13 AM
Unknown Object (File)
Tue, Mar 12, 2:09 AM
Unknown Object (File)
Tue, Mar 12, 2:09 AM
Unknown Object (File)
Tue, Mar 12, 2:09 AM
Unknown Object (File)
Tue, Mar 12, 2:09 AM

Details

Summary

CXXSTD is the C++ analogue to CSTD. It defaults to -std=c++11 with supporting
compilers; -std=gnu++98, otherwise for older versions of g++.

This change standardizes the CXXSTD variable, added to googletest.test.inc.mk
as part of r345203.

MFC after: 1 month

Test Plan

make buildworld

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

share/mk/bsd.progs.mk
25 ↗(On Diff #55523)

Why did you need to add CSTD and CXXSTD here?

share/mk/bsd.sys.mk
31 ↗(On Diff #55523)

one too many C's in C++98.

Fix typos introduced in bsd.sys.mk, noted by @asomers

share/mk/bsd.progs.mk
25 ↗(On Diff #55523)

So that way one can set the CSTD/CXXSTD on a per-program basis.

I will commit this separately, as it's orthogonal to this change.

Remove bsd.progs.mk change from the review; this should be committed separately

ngie marked an inline comment as done.Mar 28 2019, 5:41 PM
ngie added inline comments.
share/mk/bsd.progs.mk
25 ↗(On Diff #55523)

Split out into D19738.

lib/libc/tests/stdlib/Makefile
53 ↗(On Diff #55546)

Ah, I can't commit the bsd.progs.mk change separately. If I did, I would break these tests :/... I forgot that I did this.

Remove Makefile from review that needs to be attached to D19738

Set CXXSTD explicitly when need be.

This unbreaks building lib/ofed/libibnetdisc/Makefile with pre-C++11 capable
compilers.

This revision is now accepted and ready to land.Mar 28 2019, 9:46 PM

Approved. Please test make tinderbox though.

Ugh. Double-checked and ports specifies this variable as part of the USES framework.

143 CSTD=   c89 c99 c11 gnu89 gnu99 gnu11
144 CXXSTD= c++98 c++0x c++11 c++14 c++17 gnu++98 gnu++11 gnu++14 gnu++17
145 
146 .for std in ${CSTD} ${CXXSTD}

It also mashes CSTD though with multiple values, so if the issue doesn't exist with CSTD, it won't exist with CXXSTD. I'll see about fixing this in the ports tree so it doesn't collide as part of a separate commit.

Approved. Please test make tinderbox though.

[ngie@universe13a /scratch/tmp/ngie/svn/base/head]$ cat ../build.sh
#!/bin/sh
rm _.*
env MAKEOBJDIRPREFIX=/scratch/tmp/$USER/obj \
  make -s -j8 __MAKE_CONF=/dev/null tinderbox $@
[ngie@universe13a /scratch/tmp/ngie/svn/base/head]$ ../build.sh -DMAKE_JUST_WORLDS
...
>> arm.arm buildworld completed on Fri Mar 29 06:52:07 UTC 2019
>> arm.armv6 buildworld completed on Fri Mar 29 07:00:22 UTC 2019
>> arm.armv7 buildworld completed on Fri Mar 29 07:26:30 UTC 2019
>> arm completed on Fri Mar 29 07:26:30 UTC 2019
>> arm64.aarch64 buildworld completed on Fri Mar 29 07:33:49 UTC 2019
>> arm64 completed on Fri Mar 29 07:33:49 UTC 2019
>> i386.i386 buildworld completed on Fri Mar 29 07:58:46 UTC 2019
>> i386 completed on Fri Mar 29 07:58:46 UTC 2019
>> amd64.amd64 buildworld completed on Fri Mar 29 08:00:06 UTC 2019
>> amd64 completed on Fri Mar 29 08:00:06 UTC 2019
--------------------------------------------------------------
>>> make universe completed on Fri Mar 29 08:00:06 UTC 2019
                      (started Fri Mar 29 00:02:50 UTC 2019)
--------------------------------------------------------------
This revision was landed with ongoing or failed builds.Mar 29 2019, 6:13 PM
This revision was automatically updated to reflect the committed changes.