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")
This commit is contained in:
parent
564ed8e806
commit
fba998a3d8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user