diff options
author | Jessica Clarke <jrtc27@FreeBSD.org> | 2022-08-23 00:02:53 +0300 |
---|---|---|
committer | Jessica Clarke <jrtc27@FreeBSD.org> | 2022-08-23 00:02:53 +0300 |
commit | fba998a3d897e6297baca74068e4ec1db7adaeec (patch) | |
tree | 15e8a8b6b4c219ae7be0cc704ef7e421107d4edc /tools | |
parent | 564ed8e806e7abb640775b1b3d253a7a6eb452f7 (diff) |
tools/build: Unbreak bmake bootstrap on Linux
Currently make.py has a hack to add the cross-build headers to the
include search path when bootstrapping bmake on Linux (but not macOS).
This is a bit of an abuse of these headers, and e9ba1fd5eda2 was not
prepared for this, since sys/bitcount.h won't exist in that instance (it
gets copied into WORLDTMP during the legacy build). Work around this
until we can wean the bmake bootstrap off using these headers by not
including sys/bitcount.h when it doesn't exist.
Fixes: e9ba1fd5eda2 ("tools/build: Provide FreeBSD's bitstring API when cross-building")
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build/cross-build/include/common/sys/types.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/build/cross-build/include/common/sys/types.h b/tools/build/cross-build/include/common/sys/types.h index 82436e7e9224..0bfe2bac2aea 100644 --- a/tools/build/cross-build/include/common/sys/types.h +++ b/tools/build/cross-build/include/common/sys/types.h @@ -69,7 +69,15 @@ struct cap_rights; typedef struct cap_rights cap_rights_t; +/* + * make.py uses these headers during the bmake bootstrap on Linux only, at + * which point sys/bitcount.h won't yet exist, so don't include it there. + * + * TODO: Untangle this mess. + */ +#if __has_include(<sys/bitcount.h>) /* Needed for bitstring */ #include <sys/bitcount.h> +#endif #endif |