Page MenuHomeFreeBSD

Disable C standards under C99 from kernel build
ClosedPublic

Authored by minsoochoo0122_proton.me on Feb 28 2024, 11:45 PM.
Referenced Files
F102803304: D44145.diff
Sun, Nov 17, 9:32 AM
Unknown Object (File)
Mon, Nov 11, 10:57 AM
Unknown Object (File)
Mon, Nov 11, 10:30 AM
Unknown Object (File)
Oct 4 2024, 6:52 PM
Unknown Object (File)
Oct 4 2024, 4:52 PM
Unknown Object (File)
Oct 2 2024, 4:16 PM
Unknown Object (File)
Oct 2 2024, 4:25 AM
Unknown Object (File)
Sep 29 2024, 9:49 AM

Details

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.