git: 67b075124918 - main - bsd.sys.mk: Add NO_WUSE_AFTER_FREE helper variable.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 03 Oct 2022 23:11:24 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=67b0751249183749c302f37e114481f8b9550032
commit 67b0751249183749c302f37e114481f8b9550032
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-10-03 23:10:42 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-10-03 23:10:42 +0000
bsd.sys.mk: Add NO_WUSE_AFTER_FREE helper variable.
This variable expands to -Wno-use-after-free on GCC 12+.
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D36817
---
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 d3c2b4974e88..f6303d7d06d7 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -117,6 +117,9 @@ NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 110100
NO_WARRAY_PARAMETER= -Wno-array-parameter
.endif
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100
+NO_WUSE_AFTER_FREE= -Wno-use-after-free
+.endif
.endif # WARNS
.if defined(FORMAT_AUDIT)