Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Apr 2023 19:26:56 GMT
From:      "Simon J. Gerraty" <sjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: db98bc2c0d3a - main - Allow tools/build to work for DIRDEPS_BUILD
Message-ID:  <202304221926.33MJQuBl001440@gitrepo.freebsd.org>

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

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

commit db98bc2c0d3aae1772ee773c22c8d01d2add6c92
Author:     Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2023-04-22 19:25:54 +0000
Commit:     Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2023-04-22 19:25:54 +0000

    Allow tools/build to work for DIRDEPS_BUILD
    
    We want to be able to build some host tools for non-FreeBSD hosts
    without building more than we need.  The DIRDEPS_BUILD lets us
    do that.
    
    We use the pseudo MACHINE "host" when building
    for the host - deal with that when setting _host_arch.
    
    Reviewed by:    jrtc27
    Sponsored by:   Juniper Networks, Inc.
    Differential Revision:  https://reviews.freebsd.org/D39751
---
 tools/build/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/build/Makefile b/tools/build/Makefile
index 922d86dba7e7..a1b8bbb8b2aa 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -125,7 +125,11 @@ CHACHA20INCSDIR=	${INCLUDEDIR}/crypto/chacha20
 CHACHA20INCS+=	${SRCTOP}/sys/crypto/chacha20/_chacha.h \
 	${SRCTOP}/sys/crypto/chacha20/chacha.h
 
+.if ${MACHINE} == "host"
+_host_arch= ${_HOST_ARCH}
+.else
 _host_arch=${MACHINE}
+.endif
 .if ${_host_arch} == "x86_64"
 # bmake on Linux/mac often prints that instead of amd64
 _host_arch=amd64



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