aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2026-01-27 18:39:05 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2026-01-27 18:39:05 +0000
commit6fb87a1a6042887550571316fa9e539239f158d1 (patch)
tree668b04fbf7d6c8d5d5af8d858d43acf84ab5ae77
parent2dea50a661b903513efc42e270c4e6f5c2b89bc3 (diff)
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
-rw-r--r--share/mk/bsd.sys.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 2757033f39b3..93e7c8572310 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -193,6 +193,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
@@ -246,6 +251,7 @@ CWARNFLAGS+= -Wno-error=overflow
# globally for all C++
CXXWARNFLAGS+= -Wno-literal-suffix \
-Wno-c++20-extensions \
+ -Wno-attributes \
-Wno-error=unknown-pragmas
.endif