public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libpsm2] rawhide: Apply hardening flags to assembler code to fix annocheck failure
@ 2026-06-30 10:14 Michal Schmidt
0 siblings, 0 replies; only message in thread
From: Michal Schmidt @ 2026-06-30 10:14 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/libpsm2
Branch : rawhide
Commit : 8421b657ca193f5d9b2ebb73c916d90579eef206
Author : Michal Schmidt <mschmidt@redhat.com>
Date : 2026-06-30T12:13:04+02:00
Stats : +42/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/libpsm2/c/8421b657ca193f5d9b2ebb73c916d90579eef206?branch=rawhide
Log:
Apply hardening flags to assembler code to fix annocheck failure
---
diff --git a/9000-Apply-CFLAGS-to-assembly-file-compilation.patch b/9000-Apply-CFLAGS-to-assembly-file-compilation.patch
new file mode 100644
index 0000000..be3e299
--- /dev/null
+++ b/9000-Apply-CFLAGS-to-assembly-file-compilation.patch
@@ -0,0 +1,38 @@
+From 638c3662d8951e348b831315a680b91a04168214 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Tue, 30 Jun 2026 10:55:22 +0200
+Subject: [PATCH] Apply CFLAGS to assembly file compilation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The .S → .o build rule used only $(ASFLAGS), which amounted to just
+"-g3 -fpic". This meant that when building as a Fedora RPM, the
+hardening flags from %{set_build_flags} (set via CFLAGS) were not
+applied to assembly files — no annobin, no stack protector specs, etc.
+
+Add $(CFLAGS) $(BASECFLAGS) $(INCLUDES) to match the .c compilation
+rule and the .S dependency-generation rule.
+
+Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
+Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
+---
+ opa/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/opa/Makefile b/opa/Makefile
+index 2692886e07cf..a758778f8c8e 100644
+--- a/opa/Makefile
++++ b/opa/Makefile
+@@ -93,7 +93,7 @@ $(OUTDIR)/%.o: $(this_srcdir)/%.c | ${DEPS}
+ $(CC) $(CFLAGS) $(BASECFLAGS) $(INCLUDES) -c $< -o $@
+
+ $(OUTDIR)/%.o: $(this_srcdir)/%.S | ${DEPS}
+- $(CC) $(ASFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) $(BASECFLAGS) $(INCLUDES) $(ASFLAGS) -c $< -o $@
+
+ clean:
+ @rm -f $(OUTDIR)/_revision.c
+--
+2.54.0
+
diff --git a/libpsm2.spec b/libpsm2.spec
index 7c08a5f..19877d6 100644
--- a/libpsm2.spec
+++ b/libpsm2.spec
@@ -51,6 +51,10 @@ Support for MPIs linked with PSM versions < 2
0002-Fix-unaligned-heap-allocations-of-aligned-structs.patch
0003-Fix-missing-memset-zero-caused-by-unaligned-heap-all.patch
0004-Update-copyright-URL-branding-in-libpsm2-specfile.patch
+# Fix annocheck failure:
+# Hardened: ./usr/lib64/libpsm2.so.2.2: FAIL: cf-protection test because no .note.gnu.property section = no control flow information
+# Upstream pull request: https://github.com/cornelisnetworks/opa-psm2/pull/75
+9000-Apply-CFLAGS-to-assembly-file-compilation.patch
%prep
%autosetup -p1 -n opa-psm2-PSM2_%{version}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-30 10:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-30 10:14 [rpms/libpsm2] rawhide: Apply hardening flags to assembler code to fix annocheck failure Michal Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox