SHA256
1
0
forked from pool/xxhash

Enable dispatch towards AVX512

This commit is contained in:
Jan Engelhardt 2024-09-04 13:47:51 +02:00
parent 3bd4644eb4
commit 8915f41e0d

View File

@ -63,6 +63,7 @@ Headers and other development files for xxHash.
export CFLAGS="%{optflags} -DXXH_X86DISPATCH_ALLOW_AVX=1"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="%{?build_ldflags}"
export DISPATCH=1
# DISPATCH=1 if you want AVX2/AVX512. But it does not seem to perform any
# better than the lowest-denomimation code on at least the 1135G7 and 5950X
# CPUs, and for both LP64 as well as ILP32 — it seems to be all within margin
@ -73,13 +74,15 @@ export LDFLAGS="%{?build_ldflags}"
export CFLAGS="%{optflags} -DXXH_X86DISPATCH_ALLOW_AVX=1"
export CXXFLAGS="%{optflags}"
export LDFLAGS="%{?build_ldflags}"
export DISPATCH=1
%make_install prefix=%{_prefix} libdir=%{_libdir}
rm -rf %{buildroot}%{_libdir}/libxxhash.a
%check
export CFLAGS="%{optflags}"
export CFLAGS="%{optflags} -DXXH_X86DISPATCH_ALLOW_AVX=1"
export CXXFLAGS="%{optflags}"
export LDFLAGS="%{?build_ldflags}"
export DISPATCH=1
# not safe for parallel execution as it removes xxhash.o and recreates it with different flags
# the list is taken from test-all with non-working/irrelevant ones (such as ones that change the toolchain) removed
%make_build -j1 test test-unicode listL120 trailingWhitespace test-xxh-nnn-sums
@ -102,8 +105,7 @@ export LDFLAGS="%{?build_ldflags}"
%{_libdir}/libxxhash.so.*
%files devel
%{_includedir}/xxhash.h
%{_includedir}/xxh3.h
%{_includedir}/*
%{_libdir}/pkgconfig/libxxhash.pc
%{_libdir}/libxxhash.so