Page MenuHomeFreeBSD

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

Authored by dim on Mon, May 22, 4:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 29, 11:20 AM
Unknown Object (File)
Sat, May 27, 8:03 PM
Unknown Object (File)
Fri, May 26, 5:34 AM
Unknown Object (File)
Wed, May 24, 12:25 PM
Unknown Object (File)
Mon, May 22, 10:35 PM
Unknown Object (File)
Mon, May 22, 5:27 PM
Unknown Object (File)
Mon, May 22, 5:03 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.Mon, May 22, 4:56 PM

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

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