git: c32736222cdd - main - Enable -ftrivial-auto-var-init flags for gcc >= 12

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Tue, 23 May 2023 17:49:02 UTC
The branch main has been updated by dim:

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

commit c32736222cdd92e1497d1154d81c9005757fb308
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-05-23 17:43:12 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-05-23 17:44:45 +0000

    Enable -ftrivial-auto-var-init flags for gcc >= 12
    
    Now that gcc >= 12 supports -ftrivial-auto-var-init, add it to
    bsd.compiler.mk's "init-all" feature.
    
    PR:             271047
    Reviewed by:    emaste
    MFC after:      3 days
    Differential Revision: https://reviews.freebsd.org/D40208
---
 share/mk/bsd.compiler.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk
index e34c3c62a7e8..b5a896b82a43 100644
--- a/share/mk/bsd.compiler.mk
+++ b/share/mk/bsd.compiler.mk
@@ -239,8 +239,12 @@ ${X_}COMPILER_FEATURES+=	c++17
 	(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 100100)
 ${X_}COMPILER_FEATURES+=	c++20
 .endif
+.if ${${X_}COMPILER_TYPE} == "clang" || \
+	(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 120000)
+${X_}COMPILER_FEATURES+=	init-all
+.endif
 .if ${${X_}COMPILER_TYPE} == "clang"
-${X_}COMPILER_FEATURES+=	retpoline init-all
+${X_}COMPILER_FEATURES+=	retpoline
 # PR257638 lld fails with BE compressed debug.  Fixed in main but external tool
 # chains will initially not have the fix.  For now limit the feature to LE
 # targets.