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 annocheck 'bind-now' and 'pie' failures
Date: Tue, 14 Jul 2026 19:03:49 GMT [thread overview]
Message-ID: <178405582968.1.13786510265617307319.rpms-simcoupe-a30c19510d82@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/simcoupe
Branch : rawhide
Commit : a30c19510d82f0f1bcb2311efe9f9a402e4fa26b
Author : Michal Schorm <mschorm@redhat.com>
Date : 2026-07-14T16:14:00+02:00
Stats : +39/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/simcoupe/c/a30c19510d82f0f1bcb2311efe9f9a402e4fa26b?branch=rawhide
Log:
Fix annocheck 'bind-now' and 'pie' failures
The hand-written Makefile passes 'CXXFLAGS' on the link line but has
no 'LDFLAGS' variable, so Fedora's linker hardening flags ('-Wl,-z,now',
'-Wl,-pie') from '%{build_ldflags}' never reach the final executable.
Add 'simcoupe-1.0-ldflags.patch' which introduces an overridable
'LDFLAGS' variable and includes it in the link step. Pass
'LDFLAGS="%{build_ldflags}"' from the spec.
Co-Authored-By: Claude AI <noreply@anthropic.com>
---
diff --git a/simcoupe-1.0-ldflags.patch b/simcoupe-1.0-ldflags.patch
new file mode 100644
index 0000000..dd07fe6
--- /dev/null
+++ b/simcoupe-1.0-ldflags.patch
@@ -0,0 +1,32 @@
+Pass LDFLAGS to the linker so Fedora hardening flags ('-Wl,-z,now',
+'-Wl,-pie') reach the final executable.
+
+The Makefile only uses CXXFLAGS on the link line, which carries
+compiler flags but not linker flags. Add an LDFLAGS variable
+(overridable from the command line) and include it in the link step.
+
+Fixes annocheck 'bind-now' and 'pie' test failures.
+---
+ SDL/Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/SDL/Makefile b/SDL/Makefile
+index abcdef1..1234567 100644
+--- a/SDL/Makefile
++++ b/SDL/Makefile
+@@ -33,6 +33,7 @@ USE_SAASOUND=1
+ CFLAGSRPM=
+ CFLAGS=${CFLAGSRPM} -pedantic -I${SDL} -I${BASE} -I${EXTERN} $(shell sdl-config --cflags)
+ CXXFLAGS=${CFLAGS} -Wall
++LDFLAGS=
+ LIBS=-L. -lm $(shell sdl-config --libs --cflags)
+
+ BASE_SRC=${BASE}/Action.cpp ${BASE}/ATA.cpp ${BASE}/Atom.cpp ${BASE}/CDisk.cpp \
+@@ -76,7 +77,7 @@ all: ${TARGET}
+
+ ${TARGET}: ${BASE_OBJS} ${SDL_OBJS} Makefile
+- ${CXX} -o ${TARGET} ${CXXFLAGS} ${BASE_OBJS} ${SDL_OBJS} ${LIBS}
++ ${CXX} -o ${TARGET} ${CXXFLAGS} ${LDFLAGS} ${BASE_OBJS} ${SDL_OBJS} ${LIBS}
+
+ .cpp.o:
+ ${CXX} -o $@ -c $< ${CXXFLAGS}
diff --git a/simcoupe.spec b/simcoupe.spec
index 96f6157..9406eb6 100644
--- a/simcoupe.spec
+++ b/simcoupe.spec
@@ -1,6 +1,6 @@
Name: simcoupe
Version: 1.0
-Release: 40%{?dist}
+Release: 41%{?dist}
Summary: SAM Coupe emulator (spectrum compatible)
# Automatically converted from old format: GPLv2+ - review is highly recommended.
License: GPL-2.0-or-later
@@ -11,6 +11,7 @@ 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
+Patch4: simcoupe-1.0-ldflags.patch
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: SAASound-devel SDL-devel zlib-devel
@@ -29,6 +30,7 @@ improved hardware
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
+%patch -P4 -p1
# Clean up bundled SAASound to avoid accidentally building against it.
rm -f Extern/SAASound.h Extern/SAASound.cpp
cp -a %{SOURCE1} .
@@ -36,7 +38,7 @@ cp -a %{SOURCE1} .
%build
pushd SDL
-make %{?_smp_mflags} CFLAGSRPM="%{optflags}"
+make %{?_smp_mflags} CFLAGSRPM="%{optflags}" LDFLAGS="%{build_ldflags}"
popd
#Build icon image
@@ -87,6 +89,9 @@ desktop-file-install \
%changelog
+* Tue Jul 14 2026 Michal Schorm <mschorm@redhat.com> - 1.0-41
+- Fix annocheck failures: pass '%{build_ldflags}' via LDFLAGS to the linker
+
* 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
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=178405582968.1.13786510265617307319.rpms-simcoupe-a30c19510d82@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