public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/hatari/files/, games-emulation/hatari/
Date: Thu, 14 Mar 2024 06:06:17 +0000 (UTC)	[thread overview]
Message-ID: <1710396330.e27a8a83982e24d3f02d16e6ff92ca5fb475e571.sam@gentoo> (raw)

commit:     e27a8a83982e24d3f02d16e6ff92ca5fb475e571
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Thu Mar 14 04:52:10 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 14 06:05:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e27a8a83

games-emulation/hatari: backport fix for LTO

https://github.com/hatari/hatari/commit/adccd68b16eff815590c1ec993354ef8e752ecfd

Closes: https://bugs.gentoo.org/858704
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../adccd68b16eff815590c1ec993354ef8e752ecfd.patch | 36 ++++++++++++++++++++++
 ...{hatari-2.4.1.ebuild => hatari-2.4.1-r1.ebuild} |  4 ++-
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/games-emulation/hatari/files/adccd68b16eff815590c1ec993354ef8e752ecfd.patch b/games-emulation/hatari/files/adccd68b16eff815590c1ec993354ef8e752ecfd.patch
new file mode 100644
index 000000000000..d8623cb4d66b
--- /dev/null
+++ b/games-emulation/hatari/files/adccd68b16eff815590c1ec993354ef8e752ecfd.patch
@@ -0,0 +1,36 @@
+From adccd68b16eff815590c1ec993354ef8e752ecfd Mon Sep 17 00:00:00 2001
+From: Thomas Huth <huth@tuxfamily.org>
+Date: Thu, 21 Dec 2023 14:33:19 +0100
+Subject: [PATCH] Fix compiler warning that occurs with link-time optimization
+
+With LTO enable, the build fails with:
+
+ [100%] Linking C executable hatari
+ .../src/cpu/savestate.h:281:14: error: type of 'savestate_fname' does not
+  match original declaration [-Werror=lto-type-mismatch]
+   281 | extern TCHAR savestate_fname[MAX_DPATH];
+       |              ^
+ .../src/cpu/custom.c:40:8: note:
+  'savestate_fname' was previously declared here
+    40 | TCHAR *savestate_fname;
+       |        ^
+ lto1: all warnings being treated as errors
+
+Declare the array according to the definition in the header file to fix it.
+---
+ src/cpu/custom.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cpu/custom.c b/src/cpu/custom.c
+index 15971ceff..aff0c0253 100644
+--- a/src/cpu/custom.c
++++ b/src/cpu/custom.c
+@@ -37,7 +37,7 @@ extern struct regstruct mmu_backup_regs;
+ evt_t currcycle;
+ /* declared in savestate.h */
+ int savestate_state = 0;
+-TCHAR *savestate_fname;
++TCHAR savestate_fname[MAX_DPATH];
+ /* declared in custom.h */
+ uae_u32 hsync_counter = 0, vsync_counter = 0;
+ #endif

diff --git a/games-emulation/hatari/hatari-2.4.1.ebuild b/games-emulation/hatari/hatari-2.4.1-r1.ebuild
similarity index 93%
rename from games-emulation/hatari/hatari-2.4.1.ebuild
rename to games-emulation/hatari/hatari-2.4.1-r1.ebuild
index 34e97a9d20bf..c2bc4be39b99 100644
--- a/games-emulation/hatari/hatari-2.4.1.ebuild
+++ b/games-emulation/hatari/hatari-2.4.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -43,6 +43,8 @@ BDEPEND="${PYTHON_DEPS}"
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.3.1-caps5-include-path.patch
 	"${FILESDIR}"/${PN}-2.3.1-cmake-include-checksym.patch
+	# backport upstream patch for -Werror=lto-type-mismatch
+	"${FILESDIR}"/adccd68b16eff815590c1ec993354ef8e752ecfd.patch
 )
 
 DOCS=(


             reply	other threads:[~2024-03-14  6:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14  6:06 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-02  2:38 [gentoo-commits] repo/gentoo:master commit in: games-emulation/hatari/files/, games-emulation/hatari/ Ionen Wolkens
2019-11-10 21:39 James Le Cuirot
2018-07-13  9:27 Tony Vroon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1710396330.e27a8a83982e24d3f02d16e6ff92ca5fb475e571.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox