From 46d83aaa1942a1a8e9f3a115a3f65d6ca3a9e7d9 Mon Sep 17 00:00:00 2001 From: Benedikt Spranger Date: Fri, 24 Nov 2023 15:31:12 +0100 Subject: 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 --- 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 (git@github.com: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 -- cgit v1.2.3