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/Hermes] rawhide: Fix FTBFS on i686 by disabling x86 assembly
Date: Tue, 21 Jul 2026 13:38:28 GMT	[thread overview]
Message-ID: <178464110898.1.14887452162063453476.rpms-Hermes-ec682593f49f@fedoraproject.org> (raw)

            A new commit has been pushed.

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

            Log:
            Fix FTBFS on i686 by disabling x86 assembly

The handwritten x86/MMX assembly routines in 'mmxp_32.S',
'mmxp2_32.S', 'x86_main.S', and 10 other '.S' files use absolute
addressing from '.text' to '.data' sections. When building a shared
library with modern linker hardening flags ('-z,relro' and '-z,now'),
these create R_386_32 text relocations in read-only segments, causing
the linker to fail with:

  error: read-only segment has dynamic relocations

Disable the 1990s-era MMX/x86 assembly via '--disable-x86asm' and
fall back to the portable C routines. The assembly only ever
activated on i386/i486/i586/i686; x86_64 and other architectures
already used the C code paths.

Impact analysis:
- Only one reverse dependency exists: ClanLib06 (a legacy game library).
  No widely-used package chains through Hermes on i686.
- Zero effect on x86_64, aarch64, ppc64le, s390x — the assembly was
  never compiled on those architectures.
- Functionally identical: the C code implements the same pixel format
  conversions (32-bit to 16-bit color, clearing, copying) as the
  assembly; it is the portable fallback path used on every non-i686
  architecture all along.
- Performance: the disabled assembly is 1998-era hand-tuned MMX
  (64-bit registers). GCC 16 with '-O2' auto-vectorizes to SSE2
  (128-bit registers), so the compiler-generated C code may actually
  outperform the hand-written MMX routines on modern hardware.
- The alternative — rewriting 13 assembly files to use PIC-compatible
  addressing — is not justified for a library with one consumer on
  a secondary architecture.

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

---
diff --git a/Hermes.spec b/Hermes.spec
index 817d603..28be46e 100644
--- a/Hermes.spec
+++ b/Hermes.spec
@@ -1,6 +1,6 @@
 Name:           Hermes
 Version:        1.3.3
-Release:        54%{?dist}
+Release:        55%{?dist}
 Summary:        Pixel format conversion library
 License:        LGPL-2.0-only
 # upstream is no more
@@ -49,7 +49,7 @@ autoreconf -ivf
 
 
 %build
-%configure --disable-dependency-tracking --disable-static
+%configure --disable-dependency-tracking --disable-static --disable-x86asm
 %make_build
 
 
@@ -74,6 +74,12 @@ find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
 
 
 %changelog
+* Wed Jul 15 2026 Michal Schorm <mschorm@redhat.com> - 1.3.3-55
+- Fix FTBFS on i686: disable x86 assembly via '--disable-x86asm'
+  The 1990s-era MMX/x86 assembly routines use absolute addressing
+  from '.text' to '.data', creating text relocations that modern
+  linkers reject with '-z,relro' and '-z,now'
+
 * Wed Jul 15 2026 Michal Schorm <mschorm@redhat.com> - 1.3.3-54
 - Fix the 'License' tag to use a valid SPDX expression
 

                 reply	other threads:[~2026-07-21 13:38 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=178464110898.1.14887452162063453476.rpms-Hermes-ec682593f49f@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