Page MenuHomeFreeBSD

Update -ftrivial-auto-var-init flags for clang >= 16 and gcc >= 12
ClosedPublic

Authored by dim on May 22 2023, 4:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 9, 9:18 PM
Unknown Object (File)
Wed, Oct 1, 12:10 PM
Unknown Object (File)
Sat, Sep 20, 1:15 AM
Unknown Object (File)
Sep 9 2025, 3:37 AM
Unknown Object (File)
Sep 7 2025, 4:35 AM
Unknown Object (File)
Sep 3 2025, 12:41 PM
Unknown Object (File)
Sep 3 2025, 11:39 AM
Unknown Object (File)
Aug 31 2025, 2:35 PM
Subscribers

Details

Summary

As of clang 16, the -ftrivial-auto-var-init=zero option no longer needs
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
to enable the option. Only add it for older clang versions.

Also, now that gcc 12 and later supports -ftrivial-auto-var-init, add it
to bsd.compiler.mk's "init-all" feature.

PR: 271047
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dim requested review of this revision.May 22 2023, 4:56 PM

IMO bsd.compiler.mk (enabling for GCC) can be committed separately

This revision is now accepted and ready to land.May 22 2023, 6:36 PM