git: 9134d9265c54 - main - bsd.sys.mk: Add NO_WZERO_LENGTH_BOUNDS helper variable.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 05 Dec 2022 00:30:37 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=9134d9265c54a02257292c32b2144c401a86678f
commit 9134d9265c54a02257292c32b2144c401a86678f
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-05 00:29:55 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-12-05 00:29:55 +0000
bsd.sys.mk: Add NO_WZERO_LENGTH_BOUNDS helper variable.
This variable expands to -Wno-zero-length-bounds on GCC 10+.
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D37537
---
share/mk/bsd.sys.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 9f3bd6de9a47..a220c9d173ed 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -120,6 +120,9 @@ NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000
NO_WDEPRECATED_NON_PROTOTYPE=-Wno-deprecated-non-prototype
.endif
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 100100
+NO_WZERO_LENGTH_BOUNDS= -Wno-zero-length-bounds
+.endif
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 110100
NO_WARRAY_PARAMETER= -Wno-array-parameter
.endif