[packages/zstd] on %{arm} prefer memory access compatibility over performance
atler
atler at pld-linux.org
Sat Jan 30 15:21:35 CET 2021
commit f3c32c66a51b6e2fa450b45ff5a9827e123da2ea
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Jan 30 15:19:09 2021 +0100
on %{arm} prefer memory access compatibility over performance
binary built for armv6 crashes with bus error if ran on armv8.
check lib/common/mem.h for more info
zstd.spec | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/zstd.spec b/zstd.spec
index c58ffbd..6ebe717 100644
--- a/zstd.spec
+++ b/zstd.spec
@@ -12,6 +12,10 @@ URL: https://github.com/facebook/zstd
BuildRequires: gcc >= 5:3.2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%ifarch %{arm}
+%define archcflags -DMEM_FORCE_MEMORY_ACCESS=1
+%endif
+
%description
Zstd, short for Zstandard, is a fast lossless compression algorithm,
targeting real-time compression scenarios at zlib-level compression
@@ -52,7 +56,7 @@ Statyczna biblioteka Zstd.
%build
CC="%{__cc}" \
CXX="%{__cxx}" \
-CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+CFLAGS="%{rpmcflags} %{rpmcppflags} %{?archcflags}" \
CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
LDFLAGS="%{rpmldflags}" \
%{__make} allmost manual \
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/zstd.git/commitdiff/f3c32c66a51b6e2fa450b45ff5a9827e123da2ea
More information about the pld-cvs-commit
mailing list