Explicitly set CXXSTD to c++11 for old C++ code using std::auto_ptr<>.

GCC 12 defaults to C++17 which removes (not just deprecates)
std::auto_ptr<>.  Trying to use CXXSTD of c++03 doesn't work with
libc++ headers, but c++11 does.

Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D37531
This commit is contained in:
John Baldwin 2022-11-30 14:56:19 -08:00
parent 68c3f03021
commit 42fb28cef4
4 changed files with 6 additions and 0 deletions

View File

@ -28,3 +28,6 @@
CFLAGS+= -DHAVE_CONFIG_H
WARNS?= 3
# Permit use of auto_ptr for compilers defaulting to C++17 or later
CXXSTD= c++11

View File

@ -22,5 +22,6 @@ SHLIB_MAJOR= 0
# lutok uses auto_ptr
CFLAGS+= -Wno-deprecated-declarations
CXXSTD= c++11
.include <bsd.lib.mk>

View File

@ -41,6 +41,7 @@ CFLAGS+= -DATF_SHELL='"/bin/sh"'
# Silence warnings about usage of deprecated std::auto_ptr
CXXWARNFLAGS+= -Wno-deprecated-declarations
CXXSTD= c++11
LIBADD= atf_cxx

View File

@ -37,6 +37,7 @@ CFLAGS+= -I${SRCTOP}/contrib/lutok/include
CFLAGS+= -I${SRCTOP}/contrib/sqlite3
# kyua uses auto_ptr
CFLAGS+= -Wno-deprecated-declarations
CXXSTD= c++11
CFLAGS+= -DHAVE_CONFIG_H
# We compile the kyua libraries as part of the main executable as this saves