Skip to contentSkip to conversation

package/libgcrypt: bump version to 1.12.3

PATCH In review Bernd Kuhls 2 participants 4 messages Sep 4 – Sep 5

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/libgcrypt: bump version to 1.12.3

https://lists.gnupg.org/pipermail/gnupg-announce/2026q3/000508.html

Added upstream patch to fix a build error introduced by this bump that was detected by the Gitlab pipelines:

sm4-intel-avx512-amd64.S: Assembler messages:
sm4-intel-avx512-amd64.S:138: Error: operand size mismatch for `vsm4rnds4'

---
Series passed Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/commits/641bea0dd5838e2ecb955efdb4a17684a35deaef

 ...-configure-check-for-AVX512-SM4-inst.patch | 108 ++++++++++++++++++
 package/libgcrypt/libgcrypt.hash              |   4 +-
 package/libgcrypt/libgcrypt.mk                |   2 +-
 3 files changed, 111 insertions(+), 3 deletions(-)
 create mode 100644 package/libgcrypt/0002-sm4-add-separate-configure-check-for-AVX512-SM4-inst.patch
package/libgcrypt/0002-sm4-add-separate-configure-check-for-AVX512-SM4-inst.patch new file +108 -0
new file mode 100644
index 0000000000..67bcf667f5
@@ -0,0 +1,108 @@
+From f0bc379e0f3585908707095db5d3c505e664726f Mon Sep 17 00:00:00 2001
+From: Jussi Kivilinna <[email protected]>
+Date: Sun, 30 Aug 2026 11:16:11 +0300
+Subject: [PATCH] sm4: add separate configure check for AVX512 SM4 instructions
+
+* cipher/sm4-intel-avx512-amd64.S: Check for
+HAVE_GCC_INLINE_ASM_SM4_AVX512 instead of HAVE_GCC_INLINE_ASM_SM4.
+* cipher/sm4.c (USE_INTEL_SM4_AVX512): Require USE_INTEL_SM4_AVX2 and
+HAVE_GCC_INLINE_ASM_SM4_AVX512.
+* configure.ac (gcry_cv_gcc_inline_asm_sm4_avx512)
+(HAVE_GCC_INLINE_ASM_SM4_AVX512): New.
+--
+
+Toolchain may support VEX encoded SM4 instructions but not EVEX encoded
+ones. Commit adds separate check for EVEX coding and gates SM4-AVX512
+implementation behind the new check.
+
+Reported in FreeBSD bugtracker:
+ https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297987
+
+Signed-off-by: Jussi Kivilinna <[email protected]>
+
+Upstream: https://github.com/gpg/libgcrypt/commit/f0bc379e0f3585908707095db5d3c505e664726f
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ cipher/sm4-intel-avx512-amd64.S |  4 ++--
+ cipher/sm4.c                    |  8 +++-----
+ configure.ac                    | 24 ++++++++++++++++++++++++
+ 3 files changed, 29 insertions(+), 7 deletions(-)
+
+diff --git a/cipher/sm4-intel-avx512-amd64.S b/cipher/sm4-intel-avx512-amd64.S
+index c5eaa723..ac8076ec 100644
+--- a/cipher/sm4-intel-avx512-amd64.S
++++ b/cipher/sm4-intel-avx512-amd64.S
+@@ -23,7 +23,7 @@
+ #ifdef __x86_64
+ #if (defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) || \
+      defined(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS)) && \
+-    defined(ENABLE_AVX512_SUPPORT) && defined(HAVE_GCC_INLINE_ASM_SM4)
++    defined(ENABLE_AVX512_SUPPORT) && defined(HAVE_GCC_INLINE_ASM_SM4_AVX512)
+ 
+ #include "asm-common-amd64.h"
+ 
+@@ -164,5 +164,5 @@ ELF(.size __sm4_intel_crypt_blk32,.-__sm4_intel_crypt_blk32;)
+ #define SM4_CRYPT_BLK32 __sm4_intel_crypt_blk32
+ #include "sm4-avx512-amd64.h"
+ 
+-#endif /*defined(ENABLE_AVX512_SUPPORT) && defined(HAVE_GCC_INLINE_ASM_SM4)*/
++#endif /*ENABLE_AVX512_SUPPORT && HAVE_GCC_INLINE_ASM_SM4_AVX512*/
+ #endif /*__x86_64*/
+diff --git a/cipher/sm4.c b/cipher/sm4.c
+index 482a7983..58aaea10 100644
+--- a/cipher/sm4.c
++++ b/cipher/sm4.c
+@@ -87,11 +87,9 @@
+ /* USE_INTEL_SM4_AVX512 indicates whether to compile with Intel SM4
+  * instructions (VSM4RNDS4) based AVX512 code. */
+ #undef USE_INTEL_SM4_AVX512
+-#if defined(ENABLE_AVX512_SUPPORT) && defined(HAVE_GCC_INLINE_ASM_SM4)
+-# if defined(__x86_64__) && (defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) || \
+-     defined(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS))
+-#  define USE_INTEL_SM4_AVX512 1
+-# endif
++#if defined(USE_INTEL_SM4_AVX2) && defined(ENABLE_AVX512_SUPPORT) && \
++    defined(HAVE_GCC_INLINE_ASM_SM4_AVX512)
++# define USE_INTEL_SM4_AVX512 1
+ #endif
+ 
+ /* Assembly implementations use SystemV ABI, ABI conversion and additional
+diff --git a/configure.ac b/configure.ac
+index a5e8d683..ea7ea7ae 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1659,6 +1659,30 @@ if test "$gcry_cv_gcc_inline_asm_sm4" = "yes" ; then
+ fi
+ 
+ 
++#
++# Check whether GCC inline assembler supports EVEX encoded Intel SM4
++# instructions.
++#
++AC_CACHE_CHECK([whether GCC inline assembler supports AVX512 Intel SM4 instructions],
++       [gcry_cv_gcc_inline_asm_sm4_avx512],
++       [if test "$mpi_cpu_arch" != "x86" ||
++           test "$try_asm_modules" != "yes" ; then
++          gcry_cv_gcc_inline_asm_sm4_avx512="n/a"
++        else
++          gcry_cv_gcc_inline_asm_sm4_avx512=no
++          AC_LINK_IFELSE([AC_LANG_PROGRAM(
++          [[void a(void) {
++              __asm__("vsm4key4 %%zmm2, %%zmm1, %%zmm3\n\t":::"cc");
++              __asm__("vsm4rnds4 %%zmm2, %%zmm1, %%zmm3\n\t":::"cc");
++            }]], [ a(); ] )],
++          [gcry_cv_gcc_inline_asm_sm4_avx512=yes])
++        fi])
++if test "$gcry_cv_gcc_inline_asm_sm4_avx512" = "yes" ; then
++   AC_DEFINE(HAVE_GCC_INLINE_ASM_SM4_AVX512,1,
++     [Defined if inline assembler supports AVX512 Intel SM4 instructions])
++fi
++
++
+ #
+ # Check whether GCC inline assembler supports SSE4.1 instructions.
+ #
+-- 
+2.47.3
+
package/libgcrypt/libgcrypt.hash +2 -2
index 7be6554d56..e76496a7e4 100644
@@ -1,5 +1,5 @@
 # From https://www.gnupg.org/download/integrity_check.html
-sha1  7b8ff21966a0b6e7a735466b9b9b55d9dac9fa87  libgcrypt-1.12.2.tar.bz2
-sha256  7ce33c2492221a0436f96a8500215e9f3e3dcb5fd26a757cd415e7a843babd5e  libgcrypt-1.12.2.tar.bz2
+sha1  b4654d75f0e5d0850cc699f02c9b44a06367502f  libgcrypt-1.12.3.tar.bz2
+sha256  98d1b0b3202d2b03fa754a35aa3cbbfcf526a3260d8d2ee213748001b1043006  libgcrypt-1.12.3.tar.bz2
 # Locally calculated
 sha256  20e50fe7aae3e56378ebf0417d9de904f55a0e61e4df315333e632a4d3555d95  COPYING.LIB
package/libgcrypt/libgcrypt.mk +1 -1
index 0bc281da42..a49897fd4f 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBGCRYPT_VERSION = 1.12.2
+LIBGCRYPT_VERSION = 1.12.3
 LIBGCRYPT_SOURCE = libgcrypt-$(LIBGCRYPT_VERSION).tar.bz2
 LIBGCRYPT_LICENSE = LGPL-2.1+
 LIBGCRYPT_LICENSE_FILES = COPYING.LIB
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/3 package/libksba: bump to version 1.8.1

https://github.com/gpg/libksba/blob/libksba-1.8.1/NEWS
https://dev.gnupg.org/T8253

---
Series passed Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/commits/641bea0dd5838e2ecb955efdb4a17684a35deaef

 package/libksba/libksba.hash | 4 ++--
 package/libksba/libksba.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
package/libksba/libksba.hash +2 -2
index afb9e5756d..7179e01624 100644
@@ -1,6 +1,6 @@
 # From https://www.gnupg.org/download/integrity_check.html
-sha1  789ca7db1b1dcb87bca3eb2f53d5e6729810e943  libksba-1.7.0.tar.bz2
-sha256  e1d3a5745911f5a663fddecf526541c4241052a9e4cafbc92dc7f4096c7efdac  libksba-1.7.0.tar.bz2
+sha1  5d24e4c3f9a59838e5c77aaf1346ed197a3df221  libksba-1.8.1.tar.bz2
+sha256  c2f84393011827219ae117131dba8e7684c2bed0961eed11b0642c2acba440b5  libksba-1.8.1.tar.bz2
 
 # Hash for license files:
 sha256  078dca2d4a2a5d19788b18dc05e039f7a63cb789f6f0b6f9e3fbe6284e6968bd  AUTHORS
package/libksba/libksba.mk +1 -1
index 10ec0ab2d5..a16d78d8b0 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBKSBA_VERSION = 1.7.0
+LIBKSBA_VERSION = 1.8.1
 LIBKSBA_SOURCE = libksba-$(LIBKSBA_VERSION).tar.bz2
 LIBKSBA_SITE = https://gnupg.org/ftp/gcrypt/libksba
 LIBKSBA_LICENSE = LGPL-3.0+ or GPL-2.0+ (library, headers), GPL-3.0+ (manual, tests, build system)
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH 3/3 package/gnupg2: bump version to 2.5.22

In reply to Bernd Kuhls

https://lists.gnupg.org/pipermail/gnupg-announce/2026q3/000509.html

---
Series passed Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/commits/641bea0dd5838e2ecb955efdb4a17684a35deaef

 package/gnupg2/gnupg2.hash | 4 ++--
 package/gnupg2/gnupg2.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
package/gnupg2/gnupg2.hash +2 -2
index a53f46c67a..deb7a0da17 100644
@@ -1,5 +1,5 @@
 # From https://www.gnupg.org/download/integrity_check.html
-sha1  51fae4f4d902787624eb7047f6d3e7c263ad7690  gnupg-2.5.21.tar.bz2
-sha256  e3af2c8caa46a66a9329fa7c6880af260451914d819595beabc2c26597b31352  gnupg-2.5.21.tar.bz2
+sha1  4921a199ae868c8dd0478352d2d93bb470489e23  gnupg-2.5.22.tar.bz2
+sha256  96e27b020ad26510388e06f5f07f3f70a4ed8916ee995f1b72b7a024e6d9d87e  gnupg-2.5.22.tar.bz2
 # Locally calculated
 sha256  bc2d6664f6276fa0a72d57633b3ae68dc7dcb677b71018bf08c8e93e509f1357  COPYING
package/gnupg2/gnupg2.mk +1 -1
index 05acd4811d..5b8b30e702 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GNUPG2_VERSION = 2.5.21
+GNUPG2_VERSION = 2.5.22
 GNUPG2_SOURCE = gnupg-$(GNUPG2_VERSION).tar.bz2
 GNUPG2_SITE = https://gnupg.org/ftp/gcrypt/gnupg
 GNUPG2_LICENSE = GPL-3.0+
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Bernd Kuhls
Quoted 9 lines · Bernd Kuhls

https://lists.gnupg.org/pipermail/gnupg-announce/2026q3/000508.html

Added upstream patch to fix a build error introduced by this bump that was detected by the Gitlab pipelines:

sm4-intel-avx512-amd64.S: Assembler messages:
sm4-intel-avx512-amd64.S:138: Error: operand size mismatch for `vsm4rnds4'

Series applied to master, thanks. I added the info from Peter's original submission. See:
https://gitlab.com/buildroot.org/buildroot/-/commit/627c482434e12e8ada6fcb45d482ada09af61f73

Best regards,

Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot