From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AA7AC158042 for ; Mon, 28 Oct 2024 11:38:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 96A00E07C9; Mon, 28 Oct 2024 11:38:47 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6B4FAE07C9 for ; Mon, 28 Oct 2024 11:38:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 61D1034313F for ; Mon, 28 Oct 2024 11:38:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BB3D011DF for ; Mon, 28 Oct 2024 11:38:44 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1730115498.f6da81d9f85e2223a469e043dc95fd6fc555409f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/mold/, sys-devel/mold/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/mold/files/mold-2.34.1-linux-6.11.patch sys-devel/mold/mold-2.34.1-r1.ebuild sys-devel/mold/mold-9999.ebuild X-VCS-Directories: sys-devel/mold/ sys-devel/mold/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f6da81d9f85e2223a469e043dc95fd6fc555409f X-VCS-Branch: master Date: Mon, 28 Oct 2024 11:38:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4bf524b1-4417-4357-b301-df5517f1f9a5 X-Archives-Hash: 46b3d0ca6d2bbcf1ceac342c8ae0f738 commit: f6da81d9f85e2223a469e043dc95fd6fc555409f Author: Sam James gentoo org> AuthorDate: Mon Oct 28 11:36:23 2024 +0000 Commit: Sam James gentoo org> CommitDate: Mon Oct 28 11:38:18 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6da81d9 sys-devel/mold: workaround linux-6.11 incompatibility Don't write to existing files, instead replace them. This fixes (or works around) an incompatibility with linux-6.11. Bug: https://github.com/rui314/mold/issues/1361 Bug: https://bugs.gentoo.org/938659 Closes: https://bugs.gentoo.org/941070 Thanks-to: Jinghao Jia illinois.edu> Thanks-to: ernsteiswuerfel mailbox.org> Signed-off-by: Sam James gentoo.org> sys-devel/mold/files/mold-2.34.1-linux-6.11.patch | 22 ++++++++++++++++++++++ .../{mold-9999.ebuild => mold-2.34.1-r1.ebuild} | 4 ++++ sys-devel/mold/mold-9999.ebuild | 4 ++++ 3 files changed, 30 insertions(+) diff --git a/sys-devel/mold/files/mold-2.34.1-linux-6.11.patch b/sys-devel/mold/files/mold-2.34.1-linux-6.11.patch new file mode 100644 index 000000000000..8540ec0cb246 --- /dev/null +++ b/sys-devel/mold/files/mold-2.34.1-linux-6.11.patch @@ -0,0 +1,22 @@ +https://lore.kernel.org/stable/CACKH++YAtEMYu2nTLUyfmxZoGO37fqogKMDkBpddmNaz5HE6ng@mail.gmail.com/T/#u +https://github.com/rui314/mold/issues/1361 +https://bugs.gentoo.org/941070 +--- a/src/output-file-unix.cc ++++ b/src/output-file-unix.cc +@@ -19,16 +19,6 @@ template + static int + open_or_create_file(Context &ctx, std::string path, std::string tmpfile, + int perm) { +- // Reuse an existing file if exists and writable because on Linux, +- // writing to an existing file is much faster than creating a fresh +- // file and writing to it. +- if (ctx.overwrite_output_file && rename(path.c_str(), tmpfile.c_str()) == 0) { +- i64 fd = ::open(tmpfile.c_str(), O_RDWR | O_CREAT, perm); +- if (fd != -1) +- return fd; +- unlink(tmpfile.c_str()); +- } +- + i64 fd = ::open(tmpfile.c_str(), O_RDWR | O_CREAT, perm); + if (fd == -1) + Fatal(ctx) << "cannot open " << tmpfile << ": " << errno_string(); diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-2.34.1-r1.ebuild similarity index 97% copy from sys-devel/mold/mold-9999.ebuild copy to sys-devel/mold/mold-2.34.1-r1.ebuild index 456f654912e4..e9cd29a7fe47 100644 --- a/sys-devel/mold/mold-9999.ebuild +++ b/sys-devel/mold/mold-2.34.1-r1.ebuild @@ -34,6 +34,10 @@ RDEPEND=" " DEPEND="${RDEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-2.34.1-linux-6.11.patch +) + pkg_pretend() { # Requires a c++20 compiler, see #831473 if [[ ${MERGE_TYPE} != binary ]]; then diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild index 456f654912e4..e9cd29a7fe47 100644 --- a/sys-devel/mold/mold-9999.ebuild +++ b/sys-devel/mold/mold-9999.ebuild @@ -34,6 +34,10 @@ RDEPEND=" " DEPEND="${RDEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-2.34.1-linux-6.11.patch +) + pkg_pretend() { # Requires a c++20 compiler, see #831473 if [[ ${MERGE_TYPE} != binary ]]; then