Fix ppc64le build with gcc 10
This commit is contained in:
parent
0423446cf2
commit
fab53c25cd
31
xxhash-gcc10-altivec.patch
Normal file
31
xxhash-gcc10-altivec.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 3e3f5f7c2f0782ea190d30bba04d274babeec04f Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Fri, 7 Feb 2020 07:38:48 +0100
|
||||
Subject: [PATCH] Fix build with gcc 10 on ppc64le
|
||||
|
||||
When gcc was updated to version 10 in Fedora the build of the xxhash
|
||||
package started failing. The compilation succeeds, but the checks
|
||||
trigger an error. This change, suggested by the maintainers of the gcc
|
||||
package in Fedora, addresses the issue. F0r details see:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1798908
|
||||
---
|
||||
xxh3.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xxh3.h b/xxh3.h
|
||||
index a3a81bc..3fa6c1f 100644
|
||||
--- a/xxh3.h
|
||||
+++ b/xxh3.h
|
||||
@@ -219,7 +219,7 @@ XXH_FORCE_INLINE U64x2 XXH_vec_revb(U64x2 val)
|
||||
* Additionally, the intrinsic wasn't added until GCC 8, despite existing for a while.
|
||||
* Clang has an easy way to control this, we can just use the builtin which doesn't swap.
|
||||
* GCC needs inline assembly. */
|
||||
-#if __has_builtin(__builtin_altivec_vmuleuw)
|
||||
+#if defined(__clang__) && __has_builtin(__builtin_altivec_vmuleuw)
|
||||
# define XXH_vec_mulo __builtin_altivec_vmulouw
|
||||
# define XXH_vec_mule __builtin_altivec_vmuleuw
|
||||
#else
|
||||
--
|
||||
2.24.1
|
||||
|
10
xxhash.spec
10
xxhash.spec
@ -1,6 +1,6 @@
|
||||
Name: xxhash
|
||||
Version: 0.7.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Extremely fast hash algorithm
|
||||
|
||||
# The source for the library (xxhash.c and xxhash.h) is BSD
|
||||
@ -8,6 +8,10 @@ Summary: Extremely fast hash algorithm
|
||||
License: BSD and GPLv2+
|
||||
URL: http://www.xxhash.com/
|
||||
Source0: https://github.com/Cyan4973/xxHash/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
# Fix ppc64le build with gcc 10
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1798908
|
||||
# https://github.com/Cyan4973/xxHash/pull/297
|
||||
Patch0: %{name}-gcc10-altivec.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
|
||||
@ -39,6 +43,7 @@ Development files for the xxhash library
|
||||
|
||||
%prep
|
||||
%setup -q -n xxHash-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} CFLAGS="%{optflags}" MOREFLAGS="%{?__global_ldflags} -fPIC"
|
||||
@ -69,6 +74,9 @@ make test-xxhsum-c
|
||||
%{_libdir}/libxxhash.so
|
||||
|
||||
%changelog
|
||||
* Fri Feb 07 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.2-3
|
||||
- Fix ppc64le build with gcc 10
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user