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
This commit is contained in:
Dimitry Andric 2023-05-23 19:43:12 +02:00
parent 3006f6df02
commit c32736222c

View File

@ -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.