public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jens Petersen <petersen@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/git-annex] rawhide: upstream blake3 patch for non-x86_64 archs
Date: Mon, 16 Nov 2026 13:18:04 GMT	[thread overview]
Message-ID: <179483508481.1.7869217390910972042.rpms-git-annex-ae09b3df55e8@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/git-annex
Branch : rawhide
Commit : ae09b3df55e89d4c47d735e5dad9c085579bdd22
Author : Jens Petersen <petersen@redhat.com>
Date   : 2026-11-16T21:01:36+08:00
Stats  : +110/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/git-annex/c/ae09b3df55e89d4c47d735e5dad9c085579bdd22?branch=rawhide

Log:
upstream blake3 patch for non-x86_64 archs

---
diff --git a/2a3b564ad9454ca2195ed15fc83050f771dc85af.patch b/2a3b564ad9454ca2195ed15fc83050f771dc85af.patch
new file mode 100644
index 0000000..1b21233
--- /dev/null
+++ b/2a3b564ad9454ca2195ed15fc83050f771dc85af.patch
@@ -0,0 +1,103 @@
+From 2a3b564ad9454ca2195ed15fc83050f771dc85af Mon Sep 17 00:00:00 2001
+From: Joey Hess <joeyh@joeyh.name>
+Date: Thu, 25 Jun 2026 10:25:49 -0400
+Subject: [PATCH] fix build on non-x86 with default build flags
+
+---
+ blake3/CHANGELOG.md |  6 ++++++
+ blake3/blake3.cabal | 24 ++++++++++++++++--------
+ 2 files changed, 22 insertions(+), 8 deletions(-)
+
+diff --git a/blake3/CHANGELOG.md b/blake3/CHANGELOG.md
+index 49d7179..74504cd 100644
+--- a/blake3/CHANGELOG.md
++++ b/blake3/CHANGELOG.md
+@@ -1,3 +1,9 @@
++# Version 0.3.2
++
++* Build on non-x86 systems without needing to explicitly disable
++  x86-specific build flags.
++
++
+ # Version 0.3.1
+ 
+ * Depend on `ram` rather than the unmaintained library `memory`.
+diff --git a/blake3/blake3.cabal b/blake3/blake3.cabal
+index 0395acb..5a7a4fe 100644
+--- a/blake3/blake3.cabal
++++ b/blake3/blake3.cabal
+@@ -21,22 +21,22 @@ extra-source-files:
+   cbits/LICENSE
+ 
+ flag avx512
+-  description: Enable AVX-512 instructions
++  description: Enable AVX-512 instructions (only used for x86)
+   default: True
+   manual: True
+ 
+ flag avx2
+-  description: Enable AVX2 instructions
++  description: Enable AVX2 instructions (only used for x86)
+   default: True
+   manual: True
+ 
+ flag sse41
+-  description: Enable SSE 4.1 instructions
++  description: Enable SSE 4.1 instructions (only used for x86)
+   default: True
+   manual: True
+ 
+ flag sse2
+-  description: Enable SSE 2 instructions
++  description: Enable SSE 2 instructions (only used for x86)
+   default: True
+   manual: True
+ 
+@@ -66,8 +66,10 @@ library
+       asm-sources: cbits/blake3_avx512_x86-64_unix.S
+     elif arch(x86_64) && os(windows)
+       asm-sources: cbits/blake3_avx512_x86-64_windows_gnu.S
+-    else
++    elif arch(x86_64) || arch(i386)
+       c-sources: cbits/blake3_avx512.c
++    else
++      cc-options: -DBLAKE3_NO_AVX512
+   else
+     cc-options: -DBLAKE3_NO_AVX512
+ 
+@@ -77,8 +79,10 @@ library
+       asm-sources: cbits/blake3_avx2_x86-64_unix.S
+     elif arch(x86_64) && os(windows)
+       asm-sources: cbits/blake3_avx2_x86-64_windows_gnu.S
+-    else
++    elif arch(x86_64) || arch(i386)
+       c-sources: cbits/blake3_avx2.c
++    else
++      cc-options: -DBLAKE3_NO_AVX2
+   else
+     cc-options: -DBLAKE3_NO_AVX2
+ 
+@@ -88,8 +92,10 @@ library
+       asm-sources: cbits/blake3_sse41_x86-64_unix.S
+     elif arch(x86_64) && os(windows)
+       asm-sources: cbits/blake3_sse41_x86-64_windows_gnu.S
+-    else
++    elif arch(x86_64) || arch(i386)
+       c-sources: cbits/blake3_sse41.c
++    else
++      cc-options: -DBLAKE3_NO_SSE41
+   else
+     cc-options: -DBLAKE3_NO_SSE41
+ 
+@@ -99,8 +105,10 @@ library
+       asm-sources: cbits/blake3_sse2_x86-64_unix.S
+     elif arch(x86_64) && os(windows)
+       asm-sources: cbits/blake3_sse2_x86-64_windows_gnu.S
+-    else
++    elif arch(x86_64) || arch(i386)
+       c-sources: cbits/blake3_sse2.c
++    else
++      cc-options: -DBLAKE3_NO_SSE2
+   else
+     cc-options: -DBLAKE3_NO_SSE2
+ 

diff --git a/git-annex.spec b/git-annex.spec
index 319684e..7697a04 100644
--- a/git-annex.spec
+++ b/git-annex.spec
@@ -30,7 +30,9 @@ Source4:        https://hackage.haskell.org/package/%{libmagic}/%{libmagic}.tar.
 Source5:        https://hackage.haskell.org/package/%{ram}/%{ram}.tar.gz
 Source6:        https://hackage.haskell.org/package/%{tastytap}/%{tastytap}.tar.gz
 # End cabal-rpm sources
-Patch0:         %{name}-default-flags.patch
+Patch0:         git-annex-default-flags.patch
+# https://github.com/k0001/hs-blake3/pull/10 for non-x86_64
+Patch1:         https://github.com/k0001/hs-blake3/commit/2a3b564ad9454ca2195ed15fc83050f771dc85af.patch
 
 %if %{defined fedora}
 BuildRequires:  bash-completion-devel
@@ -192,11 +194,14 @@ This package contains the documentation for %{name} in HTML format.
 %prep
 # Begin cabal-rpm setup:
 %setup -q -a1 -a2 -a3 -a4 -a5 -a6
-%autopatch -p1
+%patch -P0 -p1
 # End cabal-rpm setup
 cabal-tweak-drop-dep persistent-template
 cabal-tweak-drop-dep yesod-default
 
+( cd %{blake3}
+  %patch -P1 -p2
+)
 
 %build
 # Begin cabal-rpm build:

                 reply	other threads:[~2026-11-16 13:18 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=179483508481.1.7869217390910972042.rpms-git-annex-ae09b3df55e8@fedoraproject.org \
    --to=petersen@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