Page MenuHomeFreeBSD

cross-build: Avoid adding <sys/cdefs.h> to SYSINCS
ClosedPublic

Authored by guest-ayrton on Dec 28 2025, 7:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 31, 8:51 PM
Unknown Object (File)
Sun, Jan 18, 8:41 AM
Unknown Object (File)
Sun, Jan 18, 6:44 AM
Unknown Object (File)
Fri, Jan 16, 12:41 PM
Unknown Object (File)
Fri, Jan 16, 5:06 AM
Unknown Object (File)
Fri, Jan 16, 2:52 AM
Unknown Object (File)
Mon, Jan 12, 6:54 AM
Unknown Object (File)
Thu, Jan 8, 11:25 PM
Subscribers

Details

Summary

The sys/cdefs.h in src is incompatible with glibc's sys/cdefs.h so
cross-building broke when the former was added to SYSINCS in 1c9ff80f06. This
commit adds a guard around that to only do that when building on FreeBSD. This
should fix github CI.

Test Plan

Ran buildkernel using tools/build/make.py on linux in github CI and
locally on FreeBSD to double check nothing broke.

Diff Detail

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

Event Timeline

dim requested changes to this revision.Dec 28 2025, 8:04 PM
dim added inline comments.
tools/build/Makefile
357

Note that I added _visible.h as a dependency of cdefs.h, so it would be better to put the whole block inside the .if, including the "Needed to build" comment.

This revision now requires changes to proceed.Dec 28 2025, 8:04 PM

Also avoid adding _visible.h to SYSINCS

This revision is now accepted and ready to land.Dec 28 2025, 8:43 PM

@dim can you or somebody else land this? I can't commit it myself.

This revision was automatically updated to reflect the committed changes.