public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Schorm <mschorm@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/simcoupe] rawhide: Fix FTBFS with GCC 16: drop '-D__STRICT_ANSI__' from Makefile
Date: Tue, 14 Jul 2026 19:03:49 GMT	[thread overview]
Message-ID: <178405582926.1.12829308599112821725.rpms-simcoupe-d3d2eace2f88@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/simcoupe
            Branch : rawhide
            Commit : d3d2eace2f88fae978a13d9bcc22fe2a18b7670f
            Author : Michal Schorm <mschorm@redhat.com>
            Date   : 2026-07-14T15:23:15+02:00
            Stats  : +29/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/simcoupe/c/d3d2eace2f88fae978a13d9bcc22fe2a18b7670f?branch=rawhide

            Log:
            Fix FTBFS with GCC 16: drop '-D__STRICT_ANSI__' from Makefile

GCC 16 added an explicit 'std::abs(__int128)' overload in '<cstdlib>'
for strict ANSI mode (line 106-111 of 'bits/std_abs.h'). When
'-D__STRICT_ANSI__' is set manually via '-D' rather than via a
'-std=' flag, the compiler still exposes '__int128' through
'__GLIBCXX_TYPE_INT_N_0', causing both the generic overload (line 91)
and the strict-ANSI fallback (line 110) to fire -- a redefinition
error.

The fix removes '-D__STRICT_ANSI__' from the Makefile. The flag is
not referenced anywhere in the simcoupe source code and '-pedantic'
(kept) already provides the desired compiler warnings.

Resolves: rhbz#2435106

Co-Authored-By: Claude AI <noreply@anthropic.com>

---
diff --git a/simcoupe-1.0-no-strict-ansi.patch b/simcoupe-1.0-no-strict-ansi.patch
new file mode 100644
index 0000000..82df871
--- /dev/null
+++ b/simcoupe-1.0-no-strict-ansi.patch
@@ -0,0 +1,21 @@
+Drop '-D__STRICT_ANSI__' from the Makefile to fix FTBFS with GCC 16.
+
+GCC 16 added an explicit 'std::abs(__int128)' overload in '<cstdlib>'
+for strict ANSI mode (bits/std_abs.h:106-111). When '-D__STRICT_ANSI__'
+is set manually via '-D' rather than via a '-std=' flag, the compiler
+still exposes '__int128' through '__GLIBCXX_TYPE_INT_N_0', causing both
+the generic overload (line 91) and the strict-ANSI fallback (line 110)
+to fire -- a redefinition error. The flag is not referenced anywhere in
+simcoupe source code and '-pedantic' (kept) provides the same warnings.
+
+--- SimCoupe/SDL/Makefile.orig	2026-07-13 19:28:55.093624216 +0200
++++ SimCoupe/SDL/Makefile	2026-07-13 19:28:55.097286574 +0200
+@@ -31,7 +31,7 @@
+ .SUFFIXES: .cpp .c
+
+ CFLAGSRPM=
+-CFLAGS=${CFLAGSRPM} -D__STRICT_ANSI__ -pedantic -I${SDL} -I${BASE} -I${EXTERN} $(shell sdl-config --cflags)
++CFLAGS=${CFLAGSRPM} -pedantic -I${SDL} -I${BASE} -I${EXTERN} $(shell sdl-config --cflags)
+ CXXFLAGS=${CFLAGS} -Wall
+ LIBS=-L. -lm $(shell sdl-config --libs --cflags)
+

diff --git a/simcoupe.spec b/simcoupe.spec
index ccb862b..96f6157 100644
--- a/simcoupe.spec
+++ b/simcoupe.spec
@@ -1,6 +1,6 @@
 Name:           simcoupe
 Version:        1.0
-Release:        39%{?dist}
+Release:        40%{?dist}
 Summary:        SAM Coupe emulator (spectrum compatible)
 # Automatically converted from old format: GPLv2+ - review is highly recommended.
 License:        GPL-2.0-or-later
@@ -10,6 +10,7 @@ Source1:        B-DOS-License.txt
 Patch0:         simcoupe-1.0-userpmopts.patch
 Patch1:         simcoupe-1.0-saasound.patch
 Patch2:         simcoupe-1.0-no-builtin-rom.patch
+Patch3:         simcoupe-1.0-no-strict-ansi.patch
 BuildRequires: make
 BuildRequires:  gcc-c++
 BuildRequires:  SAASound-devel SDL-devel zlib-devel
@@ -27,6 +28,7 @@ improved hardware
 %patch -P0 -p1
 %patch -P1 -p1
 %patch -P2 -p1
+%patch -P3 -p1
 # Clean up bundled SAASound to avoid accidentally building against it.
 rm -f Extern/SAASound.h Extern/SAASound.cpp
 cp -a %{SOURCE1} .
@@ -85,6 +87,11 @@ desktop-file-install \
 
 
 %changelog
+* Tue Jul 14 2026 Michal Schorm <mschorm@redhat.com> - 1.0-40
+- Fix FTBFS with GCC 16 due to 'std::abs(__int128)' redefinition (BZ#2435106)
+- Drop '-D__STRICT_ANSI__' flag from Makefile: it conflicts with GCC 16 internal
+  handling of '__int128' overloads in '<cstdlib>' and is not needed by the source
+
 * Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-39
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
 

                 reply	other threads:[~2026-07-14 19:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=178405582926.1.12829308599112821725.rpms-simcoupe-d3d2eace2f88@fedoraproject.org \
    --to=mschorm@redhat.com \
    --cc=git-commits@fedoraproject.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