From nobody Thu Mar 27 16:38:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZNq9Y64vDz5rbYx; Thu, 27 Mar 2025 16:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNq9Y5RR6z440r; Thu, 27 Mar 2025 16:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743093537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wTqteCaBr+U7AV0fB9hmrScznoe22Cp0/3ddtOGxt8=; b=FfA4rz9R8H3gZdOYYPoRJ8LztW805M6MzwvaJLyXfChiRE3f6m6tv34FP0iETxi1V2pVoT Un3/669j+kWcUVMOuJJZDM3WlFKDPEddAJIJr8u/F71KhiZAgtb1eI04KZ4CAgZlbb38xC IgzRKrc5IFMyIavk69L2CGW27WHop9Gyw5OIxtxFH5MRo67pQOiUEBAcssJ2cDdwu3iahE 1kHyjiYR6nDTPfD2s7MGEaTVocWTplvsAh/fXnmxZ4G0t5hi373ULUitpK3ta8v2mP9qcw MdgK5bZ6WgUfPNZpRMo2yvn7oLGHdNsIPgIk0s0R6MDzx543aovkGEluXSbagQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743093537; a=rsa-sha256; cv=none; b=jicUfUjJ2sjzLzczK3elSJYnzqzqfiwEC2RJ9s/YMXMWciLJpYBopZW9/BOdWH0IicxWse zW+07tAbJnWJ2EATZblqRf+n1I1bYSaV3DMd0dhcGSErXQkGYhA4MKFF+Dy2XILpnmvbkP X6aLc1mvH2Q46wkqWVxau2y1fTwvDIl30ehAPl0UkHBZ50PorQzVP3GD5jaWt1GCKh8rBg ppjKsgyQNH1FidsTG7BlcfQI1zicob9kwR7qsMxFC0AxlRrx+v7uNSTTTyYnuD79Mx3n1R mTBvhk751jWdG7i1hIMpbDaM4iPonbMd5UewmnQY7F/5zBQhZEcairiJj4Kv9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743093537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wTqteCaBr+U7AV0fB9hmrScznoe22Cp0/3ddtOGxt8=; b=gO3XB4uePoYZXGAFUhkJePeuAYt/HphVME3qLlDQp7T1ooHgfRX4akwt3l9L1OJZ1s5baD Kzmux7Jx1jycJzdsAbk6i67l3Sx7s39Y+iA3ZkJaeq+RQuZjT8GllW7MuztN7DClDrJstp 2Ye7EKTJJGH6oGXXfeD4HspCa6b71ItOwHVZF0y2v5MWK5NTk0cwOIJaSFmTp9Py+wCmKt 00XfraxVhRPzOkC33iMrUaVzVMRTsbjvsBgKIbUJyAta7pnMofGSuIua/8KpPBzUBjvnpV yG31gml7s8oZhRtLOY6cyYs5HsIfXtopypVIuTNQYOBWt8ZBGoUPEvgYMD7msg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZNq9Y4lcsz142c; Thu, 27 Mar 2025 16:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52RGcvcs045113; Thu, 27 Mar 2025 16:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RGcvWW045110; Thu, 27 Mar 2025 16:38:57 GMT (envelope-from git) Date: Thu, 27 Mar 2025 16:38:57 GMT Message-Id: <202503271638.52RGcvWW045110@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7d70f8b482fd - main - Makefile.inc1: Rework ELF Tool Chain bootstrapping List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d70f8b482fd1ab82dbea31103be7de5ec3c2c7b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7d70f8b482fd1ab82dbea31103be7de5ec3c2c7b commit 7d70f8b482fd1ab82dbea31103be7de5ec3c2c7b Author: Ed Maste AuthorDate: 2025-03-25 13:47:50 +0000 Commit: Ed Maste CommitDate: 2025-03-27 16:38:25 +0000 Makefile.inc1: Rework ELF Tool Chain bootstrapping Remove additional conditions and bootstrap elfctl, elfdump, and elfcopy (aka objdump) if ELFTOOLCHAIN_BOOTSTRAP is true. The first two are bespoke tools that won't exist in an external GNU or LLVM binutils, and elfcopy is also not provided by that name. This should fix GCC CI builds, which was skipping the elfcopy build because of the ${TARGET_ARCH} != ${MACHINE_ARCH} condition. Reported by: olce Reviewed by: brooks Fixes: b885643b63e4 ("boot: Always use ELF Tool Chain elfcopy for EFI builds") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49493 --- Makefile.inc1 | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 3569d068095c..af9e4736a65a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2909,29 +2909,24 @@ _dtrace_tools= cddl/lib/libctf cddl/lib/libspl cddl/usr.bin/ctfconvert \ cddl/usr.bin/ctfmerge .endif -# If we're given an XAS, don't build binutils. -.if ${XAS:M/*} == "" .if ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" +# Some bespoke tools from or based on ELF Tool Chain. objcopy (elfcopy) is +# included because llvm-objcopy is currently not capable of translating ELF to +# PE32+, which is required for EFI boot programs. _elftctools= lib/libelftc \ lib/libpe \ usr.bin/elfctl \ usr.bin/elfdump \ - usr.bin/objcopy \ - usr.bin/nm \ + usr.bin/objcopy +# If we're given an XNM we don't need to build standard binary utilities. +.if ${XNM:M/*} == "" +_elftctools+= usr.bin/nm \ usr.bin/size \ usr.bin/strings # These are not required by the build, but can be useful for developers who # cross-build on a FreeBSD 10 host: _elftctools+= usr.bin/addr2line .endif -.elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" -# If cross-building with an external binutils we still need to build strip for -# the target (for at least crunchide). -_elftctools= lib/libelftc \ - lib/libpe \ - usr.bin/elfctl \ - usr.bin/elfdump \ - usr.bin/objcopy .endif .if ${MK_CLANG_BOOTSTRAP} != "no"