Page MenuHomeFreeBSD

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

Authored by guest-ayrton on Sun, Dec 28, 7:51 PM.

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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

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.Sun, Dec 28, 8:04 PM

Also avoid adding _visible.h to SYSINCS

This revision is now accepted and ready to land.Sun, Dec 28, 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.