git: 3b5f2c6e7413 - stable/13 - Enable -ftrivial-auto-var-init flags for gcc >= 12
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 26 May 2023 08:48:09 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3b5f2c6e74135c2d881cc18378429d5848717ca4 commit 3b5f2c6e74135c2d881cc18378429d5848717ca4 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-05-23 17:43:12 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-05-26 08:45:53 +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 (cherry picked from commit c32736222cdd92e1497d1154d81c9005757fb308) --- 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 26f735c579e6..87b8e86156bc 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -238,8 +238,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 .endif .if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 130000) || \