git: 628d378aaa4e - stable/15 - bsd.sys.mk: Silence a few GCC warnings for C++
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 24 Apr 2026 15:29:18 UTC
The branch stable/15 has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=628d378aaa4e1d1ff132cdac518e131922759352
commit 628d378aaa4e1d1ff132cdac518e131922759352
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-01-27 18:39:05 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-04-24 15:26:39 +0000
bsd.sys.mk: Silence a few GCC warnings for C++
These warnings were already marked with -Wno-error=, but they trigger
so many false positives in libc++ headers to be utterly useless for
C++ code, so disable them entirely for C++.
Reviewed by: imp, dim
Differential Revision: https://reviews.freebsd.org/D54867
(cherry picked from commit 6fb87a1a6042887550571316fa9e539239f158d1)
---
share/mk/bsd.sys.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 8ca3fd21c616..d58830ad48c7 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -190,6 +190,11 @@ CWARNFLAGS+= -Wno-error=address \
-Wno-error=uninitialized \
-Wno-error=unused-function \
-Wno-error=unused-value
+
+# These warnings are raised by headers in libc++ so are disabled
+# globally for all C++
+CXXWARNFLAGS+= -Wno-attributes \
+ -Wno-deprecated-declarations
.endif
# GCC 6.1.0
@@ -243,6 +248,7 @@ CWARNFLAGS+= -Wno-error=overflow
# globally for all C++
CXXWARNFLAGS+= -Wno-literal-suffix \
-Wno-c++20-extensions \
+ -Wno-attributes \
-Wno-error=unknown-pragmas
.endif