Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2023 23:53:09 GMT
From:      Jessica Clarke <jrtc27@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 35921bba736a - main - tools/build/make.py: Drop problematic Linux hack for bmake bootstrap
Message-ID:  <202301292353.30TNr9i5020429@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jrtc27:

URL: https://cgit.FreeBSD.org/src/commit/?id=35921bba736a017061c1e3d7b6f3e9c5a4726cda

commit 35921bba736a017061c1e3d7b6f3e9c5a4726cda
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2023-01-29 23:07:25 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2023-01-29 23:53:04 +0000

    tools/build/make.py: Drop problematic Linux hack for bmake bootstrap
    
    Since e2eeea75eb8b ("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 79e02149fcb4 ("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
    4fde40d9b540 ("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.
---
 tools/build/make.py | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tools/build/make.py b/tools/build/make.py
index cede0c99e316..4260a9e88969 100755
--- a/tools/build/make.py
+++ b/tools/build/make.py
@@ -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",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301292353.30TNr9i5020429>