File 0004-libgcrypt-Copy-the-selected-x86_64-assembly-files.patch of Package grub2
From 471a28d9e0be2f41ac740beeb836e37e8a5b3fe6 Mon Sep 17 00:00:00 2001
From: Gary Lin <glin@suse.com>
Date: Fri, 18 Jul 2025 15:13:26 +0800
Subject: [PATCH 4/8] libgcrypt: Copy the selected x86_64 assembly files
Copy the selected x86_64 assembly files to optimize sha256.
Signed-off-by: Gary Lin <glin@suse.com>
---
autogen.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/autogen.sh b/autogen.sh
index fbdb33879..0e3c23f65 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -52,6 +52,13 @@ for x in mpi-asm-defs.h mpih-add1.c mpih-sub1.c mpih-mul1.c mpih-mul2.c mpih-mul
cp grub-core/lib/libgcrypt-grub/mpi/generic/"$x" grub-core/lib/libgcrypt-grub/mpi/"$x"
done
+for x in sha256-ssse3-amd64.S sha256-avx-amd64.S sha256-avx2-bmi2-amd64.S sha256-intel-shaext.c; do
+ if [ -h grub-core/lib/libgcrypt-grub/cipher/"$x" ] || [ -f grub-core/lib/libgcrypt-grub/cipher/"$x" ]; then
+ rm grub-core/lib/libgcrypt-grub/cipher/"$x"
+ fi
+ cp grub-core/lib/libgcrypt/cipher/"$x" grub-core/lib/libgcrypt-grub/cipher/"$x"
+done
+
for x in grub-core/lib/libgcrypt-patches/*.patch; do
patch -i $x -p1
done
--
2.43.0