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 (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 569EC15817D for ; Sun, 2 Jun 2024 17:54:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A7D5FE2BBB; Sun, 2 Jun 2024 17:54:15 +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 AB6DAE2BBB for ; Sun, 2 Jun 2024 17:54:14 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4EC7C33BDFF for ; Sun, 2 Jun 2024 17:54:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CC08916DD for ; Sun, 2 Jun 2024 17:54:11 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1717350846.1e3866a781cb9f13107b17d346ce03fcbc09e10c.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/dolphin/, games-emulation/dolphin/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-emulation/dolphin/dolphin-5.0_p20220520-r2.ebuild games-emulation/dolphin/files/dolphin-5.0_p20220520-gcc-14.patch X-VCS-Directories: games-emulation/dolphin/files/ games-emulation/dolphin/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 1e3866a781cb9f13107b17d346ce03fcbc09e10c X-VCS-Branch: master Date: Sun, 2 Jun 2024 17:54:11 +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: 3764f6f0-1b06-4ac6-a489-be9a0cc08b49 X-Archives-Hash: 9087acd8fc7667658bb8e2f52aad2642 commit: 1e3866a781cb9f13107b17d346ce03fcbc09e10c Author: Michał Górny gentoo org> AuthorDate: Sun Jun 2 17:50:39 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Jun 2 17:54:06 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e3866a7 games-emulation/dolphin: Backport gcc-14 build fix Thanks to Kostadin Shishmanov for finding the pull request. Closes: https://bugs.gentoo.org/933203 Signed-off-by: Michał Górny gentoo.org> .../dolphin/dolphin-5.0_p20220520-r2.ebuild | 6 ++++- .../files/dolphin-5.0_p20220520-gcc-14.patch | 30 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/games-emulation/dolphin/dolphin-5.0_p20220520-r2.ebuild b/games-emulation/dolphin/dolphin-5.0_p20220520-r2.ebuild index c1f43ed2cbd5..eb77bc5735c5 100644 --- a/games-emulation/dolphin/dolphin-5.0_p20220520-r2.ebuild +++ b/games-emulation/dolphin/dolphin-5.0_p20220520-r2.ebuild @@ -35,7 +35,11 @@ IUSE=" profile pulseaudio systemd upnp vulkan " -PATCHES=("${FILESDIR}/${P}-libfmt-9.0.0-fix-build.patch") +PATCHES=( + "${FILESDIR}/${P}-libfmt-9.0.0-fix-build.patch" + # https://github.com/dolphin-emu/dolphin/pull/12575 + "${FILESDIR}/${P}-gcc-14.patch" +) RDEPEND=" app-arch/bzip2:= diff --git a/games-emulation/dolphin/files/dolphin-5.0_p20220520-gcc-14.patch b/games-emulation/dolphin/files/dolphin-5.0_p20220520-gcc-14.patch new file mode 100644 index 000000000000..44ffb50ae257 --- /dev/null +++ b/games-emulation/dolphin/files/dolphin-5.0_p20220520-gcc-14.patch @@ -0,0 +1,30 @@ +From 3da2e15e6b95f02f66df461e87c8b896e450fdab Mon Sep 17 00:00:00 2001 +From: Peter Lafreniere +Date: Sun, 11 Feb 2024 20:55:31 -0500 +Subject: [PATCH] IOFile: avoid clearing errors on null file struct + +When performing a default compilation with recent GCC & glibc, +the use of -Werror=nonnull causes a build error. + +The error is given as IOFile::ClearError() can call std::clearerr() +with a null file, which can trigger a null-pointer dereference in libc. + +Change the std::clearerr() call to be conditional on a file being open. +--- + Source/Core/Common/IOFile.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Source/Core/Common/IOFile.h b/Source/Core/Common/IOFile.h +index 4b12c3188853..b5895333b1be 100644 +--- a/Source/Core/Common/IOFile.h ++++ b/Source/Core/Common/IOFile.h +@@ -116,7 +116,8 @@ class IOFile + void ClearError() + { + m_good = true; +- std::clearerr(m_file); ++ if (IsOpen()) ++ std::clearerr(m_file); + } + + private: