From nobody Thu Aug 15 07:43:18 2024 X-Original-To: dev-commits-src-all@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 4Wkxtt391Kz5T88Q; Thu, 15 Aug 2024 07:43:18 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wkxtt2bHbz4Yv5; Thu, 15 Aug 2024 07:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723707798; 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=HP7dDUWlr+dVmJoPUUTCdbrntenISxYrRnRD5eE/9eQ=; b=cVqDDy4FBtHg5oTkBwjUTvgOfdFsz3iC0NpuuyRXdrUnrkwJREF5fuo+bWtmfjB9PAmy1t DmOIUgD0uOgY3fk+0bN8PwO/3hesvsBaxU9G9Amqd+fyfIl7Fhg+F6GHRBaiLjZ/5+x2pW RyF0WrlBLnrzgpEHlqtICEwDxwCq4hKY8qkW3oDByMEBib5tglXJoRXf2m/2ehiAP2Icoe 51OwDbPdhO0L2cEdfJnEirOQN1fr+HVlplEltJkIhoePZA9cAxeV1XbhF4RBtRyXxvLQMG Rzvonzkk3ZxzX4aOoZR/uM/yiSoI7KPP+0z626IH77RxmQdYdEGejTXFTSZp0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723707798; a=rsa-sha256; cv=none; b=xRO3lkb7jVU4QuAI2MaZDdvjG5MyBuMWFk8jOyYygqBmjszYjjaUr/9Om9b4LbIL51LkOl wGqVhA7B3ZibQ6Q0k8AR4ubmQTTIfBbpXSb8H+d58ad3fL1hmfig3VimWPx3f6MZ0faU/g rkpgavp+wMbsfteUWnkf54yvDopU+GZF1zx7/MkDlBjaK1zotV7BkZknyMO3aHlP18nM+t lV6MijBnO9CSgvmLYtu6pNLHPueNqcBmettGUHc/D9ELl6krroh/ei+yBW7jwGhsE43KJl 1DYf9jOzynNcUIWwT8FfVOe5vwHlVF9+n462yA0dUhsbPvQIHXE89+8hHJ+8+g== 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=1723707798; 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=HP7dDUWlr+dVmJoPUUTCdbrntenISxYrRnRD5eE/9eQ=; b=wMHlLwpGdRWK1ijR1Ug3FFh9pBIKJZ5qdRn9MEFNgctkyWiBxNIHB4VsCyyA8JY5XIukRj 5Jd0FvCPMjPjbQC8klEpxz0DWyn5uIBi1cnrcuXaJhKDJECuJJu5Ml2hrMeGEjrkqcSYNB 7kRogtpWm00PK4As6wgOaP2FVU4oMoVcneFJ0fl5s8fBLBIdScBUIlFWhXpFs8+ptkHrx4 TR9PBlb3eYY98n/TNjIByLX/62QgpAEHibqwmlJfoId3K8RLRq6jHAANrchpOxsPBDs9pK e/lH2UocLntq1HMZO9UmLykeTRz8VAh5RXRQX8RFeLdHfMpmEfjRn11w4mwO5A== 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 4Wkxtt27CKzDt3; Thu, 15 Aug 2024 07:43:18 +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 47F7hIbU032206; Thu, 15 Aug 2024 07:43:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47F7hIM5032203; Thu, 15 Aug 2024 07:43:18 GMT (envelope-from git) Date: Thu, 15 Aug 2024 07:43:18 GMT Message-Id: <202408150743.47F7hIM5032203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e664cd1dc5fb - releng/13.4 - Fix EFI loader reproducibility with lld List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.4 X-Git-Reftype: branch X-Git-Commit: e664cd1dc5fb66d0802db84f469a5c500dd3688a Auto-Submitted: auto-generated The branch releng/13.4 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e664cd1dc5fb66d0802db84f469a5c500dd3688a commit e664cd1dc5fb66d0802db84f469a5c500dd3688a Author: Dimitry Andric AuthorDate: 2024-08-11 19:48:27 +0000 Commit: Dimitry Andric CommitDate: 2024-08-15 07:42:36 +0000 Fix EFI loader reproducibility with lld When the various loaders under stand/efi are built, the resulting binaries differ over multiple runs, even if WITH_REPRODUCIBLE_BUILD is used. This is caused by lld multithreading and the custom linker scripts for the loaders, and affects the following binaries: * loader_4th.efi * loader_4th.sym * loader_4th.sym.full * loader_lua.efi * loader_lua.sym * loader_lua.sym.full * loader_simp.efi * loader_simp.sym * loader_simp.sym.full Work around this by disabling lld threading for these binaries. Reviewed by: emaste Approved by: re (cperciva) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46271 (cherry picked from commit f5ce3f4ef562ea9fc4d8f9c13c268f48a5bacba7) (cherry picked from commit 8a4fd438ef6c874110b9ed320d3cd54e2bf93459) --- stand/efi/loader/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index ec2a147bd69f..c5503da655f9 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -105,6 +105,11 @@ LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -pie LDFLAGS+= -Wl,--no-dynamic-linker .endif +# When lld is using multiple threads, which it does by default, it can +# result in non-reproducible output with the custom linker script. Work +# around this by disabling threading. +LDFLAGS.lld+= -Wl,--threads=1 + CLEANFILES+= ${LOADER}.efi ${LOADER}.efi: ${PROG}