git: cb4303995e98 - stable/13 - bsd.sys.mk: Add NO_WZERO_LENGTH_BOUNDS helper variable.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 03 May 2023 00:29:35 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=cb4303995e987597b95a8af30931236a38e88aab

commit cb4303995e987597b95a8af30931236a38e88aab
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-05 00:29:55 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-03 00:04:41 +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
    
    (cherry picked from commit 9134d9265c54a02257292c32b2144c401a86678f)
---
 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 21aba9f010e0..b2851cbb8fbc 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -130,6 +130,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