Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Mar 2026 13:31:13 +0100
From:      =?UTF-8?B?VMSzbA==?= Coosemans <tijl@FreeBSD.org>
To:        Ed Maste <emaste@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 17494c6e6b7d - main - build: Boostrap LLVM_BINUTILS for cross-tools
Message-ID:  <20260326133113.7dcf71e7@hal.tijl.coosemans.org>
In-Reply-To: <69bd4e24.3bb70.7228f0e9@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

On Fri, 20 Mar 2026 13:39:48 +0000 Ed Maste wrote:
> The branch main has been updated by emaste:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=17494c6e6b7d5e2be34d2469566a59bbd9dceb8a
> 
> commit 17494c6e6b7d5e2be34d2469566a59bbd9dceb8a
> Author:     Ed Maste <emaste@FreeBSD.org>
> AuthorDate: 2026-03-18 15:09:53 +0000
> Commit:     Ed Maste <emaste@FreeBSD.org>
> CommitDate: 2026-03-20 13:38:40 +0000
> 
>     build: Boostrap LLVM_BINUTILS for cross-tools
>     
>     Reported by:    vexeduxr, jrtc27
>     Reviewed by:    imp
>     Sponsored by:   The FreeBSD Foundation
>     Pull request:   https://github.com/freebsd/freebsd-src/pull/2084
>     Differential Revision: https://reviews.freebsd.org/D55923
> ---
>  Makefile.inc1                                       | 19 +++++++++++++++++--
>  share/man/man5/src.conf.5                           | 13 +++++++++++++
>  share/mk/src.opts.mk                                |  1 +
>  tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP | 12 ++++++++++++
>  4 files changed, 43 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.inc1 b/Makefile.inc1
> index c4696abae8cd..16cd9b695109 100644
> --- a/Makefile.inc1
> +++ b/Makefile.inc1
> @@ -239,6 +239,12 @@ X${BINUTIL}?=	${${BINUTIL}}
>  MK_LLD_BOOTSTRAP=	no
>  .endif
>  
> +# If full paths to all standard bintuils are given, don't build LLVM binutils.
> +.if ${XAR:M/*} && ${XNM:M/*} && ${XOBJCOPY:M/*} && ${XRANLIB:M/*} && \
> +    ${XSIZE:M/*} && ${XSTRINGS:M/*} && ${XSTRIPBIN:M/*}
> +MK_LLVM_BINUTILS_BOOTSTRAP=	no
> +.endif
> +
>  # We also want the X_LINKER* variables if we are using an external toolchain.
>  _WANT_TOOLCHAIN_CROSS_VARS=	t
>  .include "share/mk/bsd.linker.mk"
> @@ -2701,7 +2707,8 @@ _gensnmptree=	usr.sbin/bsnmpd/gensnmptree
>  # llvm-tblgen is also needed for various llvm binutils (e.g. objcopy).
>  .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" || \
>      ${MK_LLD_BOOTSTRAP} != "no" || ${MK_LLD} != "no" || \
> -    ${MK_LLDB} != "no" || ${MK_LLVM_BINUTILS} != "no"
> +    ${MK_LLDB} != "no" || \
> +    ${MK_LLVM_BINUTILS_BOOTSTRAP} != "no" || ${MK_LLVM_BINUTILS} != "no"
>  _clang_tblgen= \
>  	lib/clang/libllvmminimal \
>  	usr.bin/clang/llvm-min-tblgen \
> @@ -3061,9 +3068,16 @@ _clang=		usr.bin/clang/clang
>  .if ${MK_LLD_BOOTSTRAP} != "no"
>  _lld=		usr.bin/clang/lld
>  .endif
> -.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no"
> +.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no" || \
> +    ${MK_LLVM_BINUTILS_BOOTSTRAP} != "no"
>  _clang_libs=	lib/clang
>  .endif
> +.if ${MK_LLVM_BINUTILS_BOOTSTRAP}} != "no"

There's a double } here making the condition always true.

Can MK_LLVM_BINUTILS_BOOTSTRAP be added to MK_CROSS_COMPILER==no in
share/mk/src.opts.mk?


home | help

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