From nobody Fri Mar 14 17:29:34 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 4ZDrvz37W3z5qVPs; Fri, 14 Mar 2025 17:29:35 +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 4ZDrvz030qz40Ym; Fri, 14 Mar 2025 17:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741973375; 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=nnkxMutTVB5hiLpYX8+sgnT++yJfyj2soGqpT7dNyQA=; b=o7j73ZK+mm5b11zMcahfeoFu3LNQmEZom/yrXT6hjlCncd27vLn+T+DLI6f3QhopEM0khl baECcXFC0mofKwqH0htcT+Glu7OdXDmnaZWQUTxag0sbWFmMq8EaSeqrYPkgSnUPWnolm7 EYfP5s6DGvWy0R45kBrcig1xVlNL0ofj+0SQgeqHQWau2+xJ5OT10IMjM/2w5aHwvMb3xr /RXVfX0JOWBT0XTQYGpiHuRZnYkIoJVQCzJM1YMIfKYHl4t7wO2Up3a19ngoJB7tp5RixZ Qb/ceCUOyFWHPi6NWGLOR/yZb+iIQUAoo4LDzTgxzwHYDogU+WZSpmFPamTBJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741973375; a=rsa-sha256; cv=none; b=U9PL1l4rGU9aiSz7CZUFJsRlkZuDEMeMHvNnnSSUfeoHANMKaynUpTCkfe9YPcB5WTUjRm bml8oy2sn4LzYLEz1kLGYni22Cp5epKlfg7KNWhGrXBSx7ML2DrfP/KAOvfQsFqVgqUE5A s+2xEjZfs69YbSJIfqWdZm/sZjGVJKvwwrAGSRJyMJBF2KaxhZ/daSwATElBdW5rGthPr3 n11Uuvm9FC2ihZC+5CFaLOqZCx2aGgjdNxo9NXqFYOihhln524W2hB55SCxMVGJpOyw4Xz h00Gxg1saT3pRdHe1byAcIKl42IEikfklQ0dQg+djBmEhLyR9pPA5bow8AAGvg== 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=1741973375; 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=nnkxMutTVB5hiLpYX8+sgnT++yJfyj2soGqpT7dNyQA=; b=a5L7fjAhAi39dsrVpTUETi1jZckE7hCSibj3lAMLBaxvsh/7/36zYnmYit+ck+n4Wjw6fi Tixqs3O875vZLAxO++bpTzVTEUMqBrvce1GaJWHk+MDuMvhyMcEaU1DKB3Zt/nsIMo1xJC 9dt9JADbZUyXmocFv5yAqIWs6lkG+mTXWZBNSPob43ch0qncZmxohEVHosxjHpBDO8v5Jf fYbjhHSzVeCB39rZv396ZMcu828JbZSuCOYm9Phov1vCmZU4y+/3fP5zRzZYZLzmbwkFKh etMkWUcRk5yLXzoWVZ/9ohyTgRM6q4A/w2PADR1aJ7CjHjfVqK1wz+gUenChJQ== 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 4ZDrvy57t7zttJ; Fri, 14 Mar 2025 17:29:34 +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 52EHTYKB008117; Fri, 14 Mar 2025 17:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52EHTYis008114; Fri, 14 Mar 2025 17:29:34 GMT (envelope-from git) Date: Fri, 14 Mar 2025 17:29:34 GMT Message-Id: <202503141729.52EHTYis008114@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: 1cae7121c667 - main - Enable LLVM_BINUTILS by default 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: 1cae7121c667d9caf205832cf45fd02af3157e6f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1cae7121c667d9caf205832cf45fd02af3157e6f commit 1cae7121c667d9caf205832cf45fd02af3157e6f Author: Ed Maste AuthorDate: 2021-07-12 19:32:00 +0000 Commit: Ed Maste CommitDate: 2025-03-14 17:29:06 +0000 Enable LLVM_BINUTILS by default Starting in 2014 FreeBSD migrated from GNU binutils to ELF Tool Chain tools. At that time there were no usable LLVM versions of those tools, but they have been developing rapidly since then. Migrate to LLVML's tools for both functionality and maintainability reasons. This will eventually support the use of link-time optimization (LTO) in the FreeBSD base system. LTO runs optimization passes over the entire executable (or library) at link time and thus allows for more effective optimization than when performed on individual compilation units. When using LTO object files (.o) including those contained in static library archives (.a) contain LLVM IR bitcode rather than target object code. This means that utilities that operate on object files need to support LLVM IR. As with ELF Tool Chain the LLVM tools aim for command line and output format compatibility with GNU binutils, although there are a few minor differences. Where these cause a material issue (breaking a port or eliminating required functionality) we can submit LLVM bugs and work on patches. PR: 258872 (exp-run) Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49361 --- UPDATING | 5 +++++ share/man/man5/src.conf.5 | 16 ++++++++++++---- share/mk/src.opts.mk | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/UPDATING b/UPDATING index 15941028c5bb..6989bb7c7f99 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250314: + We now use LLVM's binary utilities (nm, objcopy, etc.) by default. + The WITHOUT_LLVM_BINUTILS src.conf(5) knob can be used to revert to + ELF Tool Chain tools if desired. + 20250303: Commit 4a77657cbc01 changed the ABI between ipfw(8) and ipfw(4). Please note that the old ipfw(8) binary will not work with the new diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 30b5d308724a..321eea708d04 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd January 31, 2025 +.Dd March 14, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -933,9 +933,8 @@ the build. To be able to build the system an alternate linker must be provided via XLD. .It Va WITHOUT_LLVM_ASSERTIONS Disable debugging assertions in LLVM. -.It Va WITH_LLVM_BINUTILS -Install LLVM's binutils (without an llvm- prefix), -instead of ELF Tool Chain's tools. +.It Va WITHOUT_LLVM_BINUTILS +Install ELF Tool Chain's binary utilities instead of LLVM's. This includes .Xr addr2line 1 , .Xr ar 1 , @@ -1762,6 +1761,15 @@ When set, it enforces these options: .It .Va WITHOUT_LLVM_COV .El +.Pp +When set, these options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_LLVM_BINUTILS +(unless +.Va WITH_LLVM_BINUTILS +is set explicitly) +.El .It Va WITH_UBSAN Build the base system with Undefined Behavior Sanitizer (UBSan) to detect various kinds of undefined behavior at runtime. diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index f3141884cd00..ef8711db713f 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -124,6 +124,7 @@ __DEFAULT_YES_OPTIONS = \ LLD \ LLD_BOOTSTRAP \ LLVM_ASSERTIONS \ + LLVM_BINUTILS \ LLVM_COV \ LLVM_CXXFILT \ LOADER_BIOS_TEXTONLY \ @@ -208,7 +209,6 @@ __DEFAULT_NO_OPTIONS = \ HESIOD \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ - LLVM_BINUTILS \ LLVM_FULL_DEBUGINFO \ MALLOC_PRODUCTION \ OFED_EXTRA \