Control: severity +1 serious
Control: patch
Dear maintainer,
while looking at the bug I recognized, that the AMD Athlon(tm) II X2
255 Processor is not capable to handle SSE4.1 opcodes. The SSE4.1 and
SSE4.2 support by AMD CPUs was introduced later.
I rebuild the Package without these flags (-msse4.1 / -maes) and
everything works as expected. I also removed the -maes flag, since AES
is, like SSE4.1, is not part of the Debian amd64 architectural
baseline. Patch is attached.
Regards
Benedikt Spranger
>From cc38f3d488f5cc108086ace53f66c0124fd9d95a Mon Sep 17 00:00:00 2001
From: Benedikt Spranger <[email protected]>
Date: Fri, 24 Nov 2023 15:31:12 +0100
Subject: [PATCH] Step back to Debian architectural baseline
libcryptx-perl is build with the compiler flags -sse4.1 and -maes.
SSE4.1 is supported by Intel CPUs, but not by all AMD CPUs. AMD CPUs
support SSE4a, which is not supported by Intel CPUs. The Debian
architectural baseline therefore states:
amd64 x86_64 with no optional extensions (psABI baseline). The
core specification includes MMX, SSE and SSE2 so these
are OK, but SSE3 and up are not guaranteed.
See psABI (Table 3.1: Micro-Architecture Levels) for
amd64 ABI level.
Remove the SSE4.1 and AES compiler flags.
Signed-off-by: Benedikt Spranger <[email protected]>
---
debian/patches/series | 1 +
debian/patches/x86_64-baseline.patch | 10 ++++++++++
2 files changed, 11 insertions(+)
create mode 100644 debian/patches/series
create mode 100644 debian/patches/x86_64-baseline.patch
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..7f328d29
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+x86_64-baseline.patch
diff --git a/debian/patches/x86_64-baseline.patch b/debian/patches/x86_64-baseline.patch
new file mode 100644
index 00000000..a1ca37d0
--- /dev/null
+++ b/debian/patches/x86_64-baseline.patch
@@ -0,0 +1,10 @@
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -38,7 +38,6 @@
+ $ver1 ||= $1 if $Config{gccversion} =~ /^([0-9]+)\./; # gccversion='10.2.0'
+ $ver1 ||= $1 if $Config{gccversion} =~ /LLVM ([0-9]+)\./i; # gccversion='Apple LLVM 14.0.0 (clang-1400.0.29.202)'
+ $ver1 ||= $1 if $Config{gccversion} =~ /Clang ([0-9]+)\./i; # gccversion='FreeBSD Clang 13.0.0 ([email protected]:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)' or 'OpenBSD Clang 13.0.0'
+- $mycflags .= " -msse4.1 -maes" if $ver1 > 4; # supported since gcc-4.4
+ }
+
+ #FIX: this is particularly useful for Debian https://github.com/DCIT/perl-CryptX/pull/39
--
2.42.0