Page MenuHomeFreeBSD

Avoid depending on system headers from the source tree during bootstrap
ClosedPublic

Authored by arichardson on Jul 8 2018, 9:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 10:15 PM
Unknown Object (File)
Nov 30 2023, 3:31 PM
Unknown Object (File)
Jul 24 2023, 8:49 PM
Unknown Object (File)
Dec 10 2022, 7:27 AM
Unknown Object (File)
Dec 9 2022, 6:53 PM
Subscribers

Details

Summary

This can cause surprising errors if the build tools is built against
headers that don't match the host system. It is also required in order
to allow building on non-FreeBSD systems where the headers in
/usr/include/sys are usually completely incompatible with those in the
source tree.

I added an error to Makefile.boot if this is done and found this was
only the case in libnv. With this error in the Makefile ABI breakages
such as r336019 should no longer be possible.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17931
Build 17688: arc lint + arc unit

Event Timeline

Update condition to also handle WITH_CDDL builds which include sys/cddl/compat headers during bootstrap

Yup. I suggest building with BOOTSTRAPPING=0 to ensure this still passes when all tools get built.

This revision is now accepted and ready to land.Jul 8 2018, 11:07 PM
lib/libnv/Makefile
12

BOOTSTRAPPING isn't used this way elsewhere in the tree...

  • Fixed condition to also handle BOOTSTRAPPING=0 (libmd includes sys/crypto/sha2)
  • Removed the ifndef BOOTSTRAPPING since the sys/nv.h header will always be present in WORLDTMP/usr/include/sys
This revision now requires review to proceed.Jul 9 2018, 8:58 AM

This will need to be rebased (libnv part committed in rS337549 and MFC'd already due to actual breakage in stable/11), but this looks good otherwise.

This revision is now accepted and ready to land.Aug 14 2018, 4:26 AM
This revision was automatically updated to reflect the committed changes.
arichardson marked an inline comment as done.