tools/build/make.py: Drop problematic Linux hack for bmake bootstrap

Since e2eeea75eb ("Merge bmake-20201117") missing/sys/cdefs.h has
been present in bmake, and _GNU_SOURCE seems to have been defined by
config.h for much longer than that, possibly for the entire time OS
cross-build support has been in-tree, so these are obsolete. Moreover,
since 79e02149fc ("Fix dtrace tools bootstrap on non-FreeBSD after
OpenZFS import"), HAVE_STRLCAT and HAVE_STRLCPY have been defined by our
cross-build headers in order to placate DTrace tools (which is not the
right way to solve that problem, but motivates fixing this one). Commit
4fde40d9b5 ("Merge/update to bmake-20230126") changed the strlcpy.c in
bmake from including config.h directly to including make.h, which means
it includes string.h and thus sees these bogus definitions, causing it
to not define the strlcpy compat function on Linux even though it needs
to and thus failing to link. Thus, fix this whole mess by removing the
hack we no longer need.
This commit is contained in:
Jessica Clarke 2023-01-29 23:07:25 +00:00
parent 195ec47b47
commit 35921bba73

View File

@ -71,12 +71,6 @@ def bootstrap_bmake(source_root, objdir_prefix):
global new_env_vars
env.update(new_env_vars)
if sys.platform.startswith("linux"):
# Work around the deleted file bmake/missing/sys/cdefs.h
# TODO: bmake should keep the compat sys/cdefs.h
env["CFLAGS"] = "-I{src}/tools/build/cross-build/include/common " \
"-I{src}/tools/build/cross-build/include/linux " \
"-D_GNU_SOURCE=1".format(src=source_root)
configure_args = [
"--with-default-sys-path=" + str(bmake_install_dir / "share/mk"),
"--with-machine=amd64", # TODO? "--with-machine-arch=amd64",