1
0
forked from jengelh/xxhash

Add hwcaps_libs/x86-64-v3

This commit is contained in:
Jan Engelhardt 2024-08-14 17:12:56 +02:00
parent cfb152b9cd
commit 886f7ca209
3 changed files with 21 additions and 13 deletions

1
baselibs.conf Normal file
View File

@ -0,0 +1 @@
libxxhash0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Aug 14 15:06:38 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Build hwcap_libs (x86-64-v3) for xxhash, apparently there is
something to gain.
------------------------------------------------------------------- -------------------------------------------------------------------
Sun May 5 19:35:03 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com> Sun May 5 19:35:03 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>

View File

@ -24,9 +24,11 @@ License: BSD-2-Clause AND GPL-2.0-only
Group: Productivity/Security Group: Productivity/Security
URL: https://github.com/Cyan4973/xxHash URL: https://github.com/Cyan4973/xxHash
Source0: https://github.com/Cyan4973/xxHash/archive/v%{version}.tar.gz#/xxHash-%{version}.tar.gz Source0: https://github.com/Cyan4973/xxHash/archive/v%{version}.tar.gz#/xxHash-%{version}.tar.gz
Patch0: test-tools-do-not-override-cflags.patch Source9: baselibs.conf
Patch1: test-tools-do-not-override-cflags.patch
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig BuildRequires: pkg-config
%{?suse_build_hwcaps_libs}
%description %description
xxHash is a hash algorithm. It completes the SMHasher test suite which xxHash is a hash algorithm. It completes the SMHasher test suite which
@ -34,38 +36,37 @@ evaluates collision, dispersion and randomness qualities of hash functions.
Hashes are identical on all platforms. Hashes are identical on all platforms.
%package -n libxxhash0 %package -n libxxhash0
Summary: Shared library for xxHash - a non-cryptographic hash algorithm Summary: Non-cryptographic hash algorithm
License: BSD-2-Clause License: BSD-2-Clause
Group: System/Libraries Group: System/Libraries
%description -n libxxhash0 %description -n libxxhash0
Shared library for xxHash - a hash algorithm. It completes the SMHasher test xxHash is a hash algorithm. It completes the SMHasher test suite which
suite which evaluates collision, dispersion and randomness qualities of hash evaluates collision, dispersion and randomness qualities of hash functions.
functions. Hashes are identical on all platforms. Hashes are identical on all platforms.
%package devel %package devel
Summary: Development files for xxHash - a non-cryptographic hash algorithm Summary: Headers for xxHash, a non-cryptographic hash algorithm
License: BSD-2-Clause License: BSD-2-Clause
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: libxxhash0 = %{version} Requires: libxxhash0 = %{version}
%description devel %description devel
Development files for xxHash - a hash algorithm. It completes the SMHasher test Headers and other development files for xxHash.
suite which evaluates collision, dispersion and randomness qualities of hash
functions. Hashes are identical on all platforms.
%prep %prep
%autosetup -p1 -n xxHash-%{version} %autosetup -p1 -n xxHash-%{version}
%build %build
export CFLAGS="%{optflags}" # ALLOW_AVX just means "we guarantee we policed our %%optflags".
export CXXFLAGS="%{optflags}" export CFLAGS="%{optflags} -DXXH_X86DISPATCH_ALLOW_AVX=1"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="%{?build_ldflags}" export LDFLAGS="%{?build_ldflags}"
%make_build prefix=%{_prefix} libdir=%{_libdir} %make_build prefix=%{_prefix} libdir=%{_libdir}
%install %install
export CFLAGS="%{optflags}" export CFLAGS="%{optflags} -DXXH_X86DISPATCH_ALLOW_AVX=1"
export CXXFLAGS="%{optflags}" export CXXFLAGS="%{optflags}"
export LDFLAGS="%{?build_ldflags}" export LDFLAGS="%{?build_ldflags}"
%make_install prefix=%{_prefix} libdir=%{_libdir} %make_install prefix=%{_prefix} libdir=%{_libdir}