From 2c3f47a727372086b41ef9ce06eb1f1eb83a67d3 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 17 Sep 2019 06:07:08 +0000 Subject: [PATCH] Another round of attempting to squelch -Wdeprecated-declarations, which has become very trigger-happy with libc++ 9.0.0. It does not help that gcc's implementation of this warning is even more trigger-happy, in the sense that it already warns on the declaration itself, not when you are using it. This is very annoying with our use of -Wsystem-headers. That should really be disabled for gcc. --- lib/atf/libatf-c++/Makefile | 3 +++ lib/googletest/Makefile.inc | 3 +++ lib/libdevdctl/Makefile | 4 ++++ lib/libpmc/Makefile | 3 +++ libexec/atf/atf-check/Makefile | 3 +++ libexec/atf/atf-sh/Makefile | 3 +++ share/mk/atf.test.mk | 2 ++ 7 files changed, 21 insertions(+) diff --git a/lib/atf/libatf-c++/Makefile b/lib/atf/libatf-c++/Makefile index 03e7d19c4440..cacf87520d2d 100644 --- a/lib/atf/libatf-c++/Makefile +++ b/lib/atf/libatf-c++/Makefile @@ -48,6 +48,9 @@ CFLAGS+= -I. CFLAGS+= -DHAVE_CONFIG_H +# Silence warnings about usage of deprecated std::auto_ptr +CXXWARNFLAGS+= -Wno-deprecated-declarations + SRCS= application.cpp \ build.cpp \ check.cpp \ diff --git a/lib/googletest/Makefile.inc b/lib/googletest/Makefile.inc index cf6e98b5d8ab..319ce6ec7ec6 100644 --- a/lib/googletest/Makefile.inc +++ b/lib/googletest/Makefile.inc @@ -8,4 +8,7 @@ GOOGLETEST_SRCROOT= ${GTEST_DIR}/googletest CXXFLAGS+= ${GTESTS_FLAGS} +# Silence warnings about usage of deprecated std::auto_ptr +CXXWARNFLAGS+= -Wno-deprecated-declarations + WARNS?= 6 diff --git a/lib/libdevdctl/Makefile b/lib/libdevdctl/Makefile index 5a18a14af622..60c59c0ea929 100644 --- a/lib/libdevdctl/Makefile +++ b/lib/libdevdctl/Makefile @@ -18,4 +18,8 @@ WARNS?= 3 PRIVATELIB= true SHLIB_MAJOR= 0 +# Silence warnings about usage of deprecated std::auto_ptr, and various +# deprecated function objects from +CXXWARNFLAGS+= -Wno-deprecated-declarations + .include diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 35af606a7225..03b8ac44af95 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -32,6 +32,9 @@ WARNS?= 3 CFLAGS+= -I${.CURDIR} CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align +# Silence warnings about usage of deprecated std::auto_ptr +CXXWARNFLAGS+= -Wno-deprecated-declarations + MAN= pmc.3 MAN+= pmc_allocate.3 MAN+= pmc_attach.3 diff --git a/libexec/atf/atf-check/Makefile b/libexec/atf/atf-check/Makefile index 4fe6e4e7dbb9..b6ef6778403a 100644 --- a/libexec/atf/atf-check/Makefile +++ b/libexec/atf/atf-check/Makefile @@ -38,6 +38,9 @@ MAN= atf-check.1 CFLAGS+= -I${ATF} CFLAGS+= -DATF_SHELL='"/bin/sh"' +# Silence warnings about usage of deprecated std::auto_ptr +CXXWARNFLAGS+= -Wno-deprecated-declarations + LIBADD= atf_cxx HAS_TESTS= diff --git a/libexec/atf/atf-sh/Makefile b/libexec/atf/atf-sh/Makefile index dd8cfaf1775d..d04816f8a591 100644 --- a/libexec/atf/atf-sh/Makefile +++ b/libexec/atf/atf-sh/Makefile @@ -65,6 +65,9 @@ CFLAGS+= -DATF_PKGDATADIR='"${SHAREDIR}/atf"' CFLAGS+= -DATF_SHELL='"/bin/sh"' CFLAGS+= -I${ATF} +# Silence warnings about usage of deprecated std::auto_ptr +CXXWARNFLAGS+= -Wno-deprecated-declarations + LIBADD= atf_cxx FILESGROUPS= SUBR diff --git a/share/mk/atf.test.mk b/share/mk/atf.test.mk index 28470f2e080d..e7a8c82b7a8f 100644 --- a/share/mk/atf.test.mk +++ b/share/mk/atf.test.mk @@ -55,6 +55,8 @@ LDADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C} .endif TEST_INTERFACE.${_T}= atf .endfor +# Silence warnings about usage of deprecated std::auto_ptr +CXXWARNFLAGS+= -Wno-deprecated-declarations .endif .if !empty(ATF_TESTS_SH)