Page MenuHomeFreeBSD

Disable C standards under C99 from kernel build
AcceptedPublic

Authored by minsoochoo0122_proton.me on Feb 28 2024, 11:45 PM.
Referenced Files
F86421087: D44145.diff
Thu, Jun 20, 5:09 AM
Unknown Object (File)
Wed, Jun 5, 11:50 PM
Unknown Object (File)
Mon, Jun 3, 2:57 PM
Unknown Object (File)
Tue, May 28, 2:46 AM
Unknown Object (File)
Mon, May 27, 2:08 AM
Unknown Object (File)
May 19 2024, 5:56 AM
Unknown Object (File)
May 15 2024, 10:16 AM
Unknown Object (File)
May 11 2024, 2:54 PM

Details

Reviewers
emaste
imp
Group Reviewers
Contributor Reviews (src)
Summary

Separated from D43254

Test Plan
make buildworld
make buildkernel

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 56337
Build 53225: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Feb 29 2024, 6:08 PM

Thanks for splitting this out.

sys/conf/kern.mk
285

Oh wait a sec.... This changes c99 too...

Is c99 now an alias on all supported compilers? I'm pretty sure it is, but wanted to double check.

at least current versions of clang/gcc12 do... with gcc 12's reaction -std=c98 being the best:
gcc12: error: unrecognized command-line option '-std=c98'; did you mean '-std=c18'?

sys/conf/kern.mk
285

I think gcc12+ and llvm15+ are the relevant (if not supported) compilers and they support c99

sys/conf/kern.mk
285

gcc supports c99 since gcc 4.5 with -std=c99 (https://gcc.gnu.org/c99status.html)
clang had c99 option since its early releases (https://clang.llvm.org/c_status.html)

I think this is ready now, so I'll land it.
I'm satisfied that old-school construct was for our old-school 4.2 gcc, which has aged out of support everywhere.