Sync from SUSE:SLFO:Main python-grpcio revision 7e72968d5cf0b3ca292ebac580ee839e

This commit is contained in:
Adrian Schröter 2024-05-03 20:53:13 +02:00
commit dd5a106b6a
7 changed files with 579 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
grpcio-1.60.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,63 @@
Index: grpcio-1.60.0/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
===================================================================
--- grpcio-1.60.0.orig/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
+++ grpcio-1.60.0/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
@@ -13,16 +13,16 @@
# limitations under the License.
# TODO(https://github.com/grpc/grpc/issues/15662): Reform this.
-cdef void* _copy_pointer(void* pointer):
+cdef void* _copy_pointer(void* pointer) noexcept:
return pointer
# TODO(https://github.com/grpc/grpc/issues/15662): Reform this.
-cdef void _destroy_pointer(void* pointer):
+cdef void _destroy_pointer(void* pointer) noexcept:
pass
-cdef int _compare_pointer(void* first_pointer, void* second_pointer):
+cdef int _compare_pointer(void* first_pointer, void* second_pointer) noexcept:
if first_pointer < second_pointer:
return -1
elif first_pointer > second_pointer:
Index: grpcio-1.60.0/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
===================================================================
--- grpcio-1.60.0.orig/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
+++ grpcio-1.60.0/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
@@ -316,7 +316,7 @@ def server_credentials_ssl_dynamic_cert_
return credentials
cdef grpc_ssl_certificate_config_reload_status _server_cert_config_fetcher_wrapper(
- void* user_data, grpc_ssl_server_certificate_config **config) with gil:
+ void* user_data, grpc_ssl_server_certificate_config **config) noexcept with gil:
# This is a credentials.ServerCertificateConfig
cdef ServerCertificateConfig cert_config = None
if not user_data:
Index: grpcio-1.60.0/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
===================================================================
--- grpcio-1.60.0.orig/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
+++ grpcio-1.60.0/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
@@ -50,7 +50,7 @@ cdef class CallbackWrapper:
@staticmethod
cdef void functor_run(
grpc_completion_queue_functor* functor,
- int success):
+ int success) noexcept:
cdef CallbackContext *context = <CallbackContext *>functor
cdef object waiter = <object>context.waiter
if not waiter.cancelled():
Index: grpcio-1.60.0/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
===================================================================
--- grpcio-1.60.0.orig/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
+++ grpcio-1.60.0/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
@@ -48,7 +48,7 @@ cdef class CallbackWrapper:
@staticmethod
cdef void functor_run(
grpc_completion_queue_functor* functor,
- int succeed)
+ int succeed) noexcept
cdef grpc_completion_queue_functor *c_functor(self)

341
python-grpcio.changes Normal file
View File

@ -0,0 +1,341 @@
-------------------------------------------------------------------
Fri Dec 15 14:47:42 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.60.0:
* No python specfic changes.
-------------------------------------------------------------------
Wed Nov 22 17:38:11 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
- Add patches for embeeded xxhash 0.8.1 from SLE's xxhash package.
- Add xxhash-ppc64le-gcc7.patch: fix build failure on ppc64le
when using gcc 7 (boo#1208794).
- add patch xxhash-avoid-armv6-unaligned-access.patch
do not expect unaligned accesses to work on armv6, it breaks
in our build setup using aarch64 kernels
-------------------------------------------------------------------
Tue Oct 31 08:50:42 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.59.2:
* No python specific changes.
-------------------------------------------------------------------
Sat Sep 30 10:55:26 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.59.0:
* [Python 3.12] Support Python 3.12 (gh#grpc/grpc#34398).
* [Python 3.12] Deprecate distutil (gh#grpc/grpc#34186).
-------------------------------------------------------------------
Wed Sep 27 10:25:26 UTC 2023 - ecsos <ecsos@opensuse.org>
- Add minimum required versions for Cython, wheel and abseil-cpp.
-------------------------------------------------------------------
Sun Sep 17 13:22:25 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.58.0:
* [Bazel] Enable grpcio-reflection to be used via Bazel
(gh#grpc/grpc#31013).
* [packaging] Publish xds-protos as part of the standard package
pipeline (gh#grpc/grpc#33797).
-------------------------------------------------------------------
Wed Aug 30 17:07:21 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.57.0:
* [posix] Enable systemd sockets for libsystemd>=233
(gh#grpc/grpc#32671).
* [python O11Y] Initial Implementation (gh#grpc/grpc#32974).
- Add python-grpcio-cython3-compat.patch: Fix noexcept errors upon
compiling with Cython 3+ (gh#grpc/grpc#33918).
- Build with LTO (don't set _lto_cflags to %nil).
- No need to pass '-std=c++17' to build CFLAGS.
-------------------------------------------------------------------
Sat Aug 5 13:25:52 UTC 2023 - munix9@googlemail.com
- Update to version 1.56.2:
* [WRR] backport (gh#grpc/grpc#33694) to 1.56
(gh#grpc/grpc#33698)
* [backport][iomgr][EventEngine] Improve server handling of
file descriptor exhaustion (gh#grpc/grpc#33667)
- Switch build to pip/wheel.
- Use system abseil with '-std=c++17' to prevent undefined symbol
eg. with python-grpcio-tools (_ZN3re23RE213GlobalReplaceEPNSt7__
cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS0_N4absl12lts_
2023012511string_viewE)
- Remove python-grpcio-disable-boring-ssl.patch, use
'export GRPC_BUILD_WITH_BORING_SSL_ASM=false' instead.
-------------------------------------------------------------------
Tue Jul 4 10:39:59 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Upstream only supports python >= 3.7, so adjust BuildRequires
accordingly.
-------------------------------------------------------------------
Sun Jul 2 12:33:22 UTC 2023 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Fri Jun 30 15:47:01 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.56.0:
* [aio types] Fix some grpc.aio python types
(gh#grpc/grpc#32475).
-------------------------------------------------------------------
Sat Jun 10 16:26:53 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.55.0:
* [EventEngine] Disable EventEngine polling in gRPC Python
(gh#grpc/grpc#33279) (gh#grpc/grpc#33320).
* [Bazel Python3.11] Update Bazel dependencies for Python 3.11
(gh#grpc/grpc#33318) (gh#grpc/grpc#33319).
- Drop Requires: python-six; not required any more.
- Switch Suggests to Recommends.
-------------------------------------------------------------------
Fri Apr 28 04:39:48 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.54.0:
* Fix DeprecationWarning when calling asyncio.get_event_loop()
(gh#grpc/grpc#32533).
* Remove references to deprecated syntax field
(gh#grpc/grpc#32497).
-------------------------------------------------------------------
Mon Dec 5 14:44:31 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.51.1:
* No Linux specific changes.
- Changes from version 1.51.0:
* Fix lack of cooldown between poll attempts
(gh#grpc/grpc#31550).
* Remove enum and future (gh#grpc/grpc#31381).
* [Remove Six] Remove dependency on six (gh#grpc/grpc#31340).
* Update xds-protos package to pull in protobuf 4.X
(gh#grpc/grpc#31113).
-------------------------------------------------------------------
Mon Oct 31 10:09:02 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.50.0:
* Support Python 3.11. [gh#grpc/grpc#30818].
-------------------------------------------------------------------
Fri Oct 14 18:10:05 UTC 2022 - Michael Ströder <michael@stroeder.com>
- Update to version 1.49.1
* Support Python 3.11. (#30818)
* Add type stub generation support to grpcio-tools. (#30498)
-------------------------------------------------------------------
Thu Sep 1 03:43:57 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.48.0:
* [Aio] Ensure Core channel closes when deallocated
[gh#grpc/grpc#29797].
* [Aio] Fix the wait_for_termination return value
[gh#grpc/grpc#29795].
- Drop grpc-no-return-from-non-void-function.patch: Fixes
upstream.
-------------------------------------------------------------------
Sat Jun 4 14:52:05 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 1.46.3:
* backport: xds: use federation env var to guard new-style resource name parsing
* This release contains refinements, improvements, and bug fixes.
-------------------------------------------------------------------
Fri May 6 17:37:43 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.46.0:
* Add Python GCF Distribtest [gh#grpc/grpc#29303].
* Add Python Reflection Client [gh#grpc/grpc#29085].
* Revert "Fix prefork handler register's default behavior"
[gh#grpc/grpc#29229].
* Fix prefork handler register's default behavior
[gh#grpc/grpc#29103].
* Fix fetching CXX variable in setup.py [gh#grpc/grpc#28873].
-------------------------------------------------------------------
Tue Mar 29 12:28:19 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.45.0:
* Reimplement Gevent Integration [gh#grpc/grpc#28276].
* Support musllinux binary wheels on x64 and x86
[gh#grpc/grpc#28092].
* Increase the Python protobuf requirement to >=3.12.0
[gh#grpc/grpc#28604].
- Build with system re2; add BuildRequires: pkgconfig(re2).
- python-grpcio-disable-boring-ssl.patch: Line offset changes.
- Add grpc-no-return-from-non-void-function.patch to return a
default string from a function defined to return a string (patch
mirrored from obs://devel:tools/grpc).
-------------------------------------------------------------------
Sat Feb 19 17:04:04 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.44.0:
* Add python async example for hellostreamingworld using
generator (gh#grpc/grpc#27343).
* Disable __wrap_memcpy hack for Python builds
(gh#grpc/grpc#28410).
* Bump Bazel Python Cython dependency to 0.29.26
(gh#grpc/grpc#28398).
* Fix libatomic linking on Raspberry Pi OS Bullseye
(gh#grpc/grpc#28041).
* Allow generated proto sources in remote repositories for
py_proto_library (gh#grpc/grpc#28103).
-------------------------------------------------------------------
Tue Feb 8 23:52:07 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.43.0:
* [Aio] Validate the input type for set_trailing_metadata and
abort (gh#grpc/grpc#27958).
-------------------------------------------------------------------
Tue Oct 26 20:44:15 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 1.41.1:
* This is release 1.41.0 (goat) of gRPC Core.
-------------------------------------------------------------------
Thu Oct 21 13:16:01 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.41.0:
* Add Python 3.10 support and drop 3.5 (gh#grpc/grpc#26074).
* [Aio] Remove custom IO manager support (gh#grpc/grpc#27090).
-------------------------------------------------------------------
Wed Aug 4 09:58:45 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.39.0:
* Python AIO: Match continuation typing on Interceptors
(gh#grpc/grpc#26500).
* Workaround #26279 by publishing manylinux_2_24 wheels instead
of manylinux2014 on aarch64 (gh#grpc/grpc#26430).
* Fix zlib unistd.h import problem (gh#grpc/grpc#26374).
* Handle gevent exception in gevent poller (gh#grpc/grpc#26058).
-------------------------------------------------------------------
Wed Jun 30 19:55:02 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.38.1:
* Backport gh#grpc/grpc#26430 and gh#grpc/grpc#26435 to v1.38.x
(gh#grpc/grpc#26436).
-------------------------------------------------------------------
Sun May 23 00:55:51 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.38.0:
* Add grpcio-admin Python package (gh#grpc/grpc#26166).
* Add CSDS API to Python (gh#grpc/grpc#26114).
* Expose code and details from context on the server side
(gh#grpc/grpc#25457).
* Explicitly import importlib.abc; required on Python 3.10.
Fixes #26062 (gh#grpc/grpc#26083).
* Fix potential deadlock on the GIL in AuthMetdataPlugin
(gh#grpc/grpc#26009).
* Introduce new Python package "xds_protos"
(gh#grpc/grpc#25975).
* Remove async mark for set_trailing_metadata interface
(gh#grpc/grpc#25814).
-------------------------------------------------------------------
Sat May 8 14:08:44 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.37.1:
* No user visible changes.
- Changes from version 1.37.0:
* Clarify Guarantees about grpc.Future Interface
(gh#grpc/grpc#25383).
* [Aio] Add time_remaining method to ServicerContext
(gh#grpc/grpc#25719).
* Standardize all environment variable boolean configuration in
python's setup.py (gh#grpc/grpc#25444).
* Fix Signal Safety Issue (gh#grpc/grpc#25394).
-------------------------------------------------------------------
Thu Mar 4 22:50:29 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.36.1:
* Core: back-port: add env var protection for google-c2p
resolver (gh#grpc/grpc#25569).
-------------------------------------------------------------------
Thu Feb 25 16:24:53 UTC 2021 - munix9@googlemail.com
- Update to version 1.35.0:
* Implement Python Client and Server xDS Creds.
(gh#grpc/grpc#25365)
* Add %define _lto_cflags %{nil} (boo#1182659) (rh#1893533)
* Link roots.pem to ca-bundle.pem from ca-certificates package
-------------------------------------------------------------------
Wed Jan 13 20:31:44 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.34.1:
* Backport "Lazily import grpc_tools when using runtime
stub/message generation" to 1.34.x (gh#grpc/grpc#25011).
-------------------------------------------------------------------
Sun Dec 6 21:25:21 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.34.0:
* Incur setuptools as an dependency for grpcio_tools
(gh#grpc/grpc#24752).
* Stop the spamming log generated by ctrl-c for AsyncIO server
(gh#grpc/grpc#24718).
* [gRPC Easy] Make Well-Known Types Available to Runtime Protos
(gh#grpc/grpc#24478).
* Bump MACOSX_DEPLOYMENT_TARGET to 10.10 for Python
(gh#grpc/grpc#24480).
* Make Python 2 an optional dependency for Bazel build
(gh#grpc/grpc#24407).
* [Linux] [macOS] Support pre-compiled Python 3.9 wheels
(gh#grpc/grpc#24356).
-------------------------------------------------------------------
Sat Oct 31 11:14:24 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.33.2:
* [Backport] Implement grpc.Future interface in
SingleThreadedRendezvous (gh#grpc/grpc#24574).
-------------------------------------------------------------------
Wed Oct 21 21:51:15 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 1.33.1:
* [Backport] Make Python 2 an optional dependency for Bazel
build (gh#grpc/grpc#24452).
* Allow asyncio API to be imported as grpc.aio.
(gh#grpc/grpc#24289).
* [gRPC Easy] Fix import errors on Windows (gh#grpc/grpc#24124).
* Make version check for importlib.abc in grpcio-tools more
stringent (gh#grpc/grpc#24098).
- Add python-grpcio-disable-boring-ssl.patch: Make enabling system
ssl disable boring ssl (gh#grpc/grpc#24498); patch taken from
upstream PR.
-------------------------------------------------------------------
Wed Sep 16 11:12:07 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 1.31.0
* no upstream changelog available
-------------------------------------------------------------------
Thu Aug 13 13:36:24 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Trim marketing wording from description.
-------------------------------------------------------------------
Wed Jul 29 15:48:04 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
- Initial package.

93
python-grpcio.spec Normal file
View File

@ -0,0 +1,93 @@
#
# spec file for package python-grpcio
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global modname grpcio
# PYTHON2 NOT SUPPORTED BY UPSTREAM
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-grpcio
Version: 1.60.0
Release: 0
Summary: HTTP/2-based Remote Procedure Call implementation
License: Apache-2.0
Group: Development/Languages/Python
URL: https://grpc.io
Source: https://files.pythonhosted.org/packages/source/g/grpcio/grpcio-%{version}.tar.gz
# PATCH-FIX-UPSTREAM python-grpcio-cython3-compat.patch gh#grpc/grpc#33918 badshah400@gmail.com -- Fix noexcept errors upon compiling with Cython 3+
Patch0: python-grpcio-cython3-compat.patch
# PATCH-FIX-SLE xxhash-avoid-armv6-unaligned-access.patch alarrosa@suse.com -- do not expect unaligned accesses to work on armv6
Patch1: xxhash-avoid-armv6-unaligned-access.patch
# PATCH-FIX-SLE xxhash-ppc64le-gcc7.patch boo#1208794 alarrosa@suse.com -- fix build failure on ppc64le when using gcc 7
Patch2: xxhash-ppc64le-gcc7.patch
BuildRequires: %{python_module Cython >= 0.29.8}
BuildRequires: %{python_module devel >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel >= 0.29}
BuildRequires: abseil-cpp-devel >= 20220623.0
BuildRequires: ca-certificates
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(libcares)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(re2)
BuildRequires: pkgconfig(zlib)
Requires: ca-certificates
Recommends: python-enum34 >= 1.0.4
Recommends: python-futures >= 2.2.0
%python_subpackages
%description
gRPC is a remote procedure call (RPC) framework. gRPC enables client
and server applications to communicate, and enables the building of
connected systems.
%prep
%autosetup -N -n grpcio-%{version}
%patch0 -p1
pushd third_party/xxhash
%patch1 -p1
%patch2 -p1
popd
%build
export GRPC_BUILD_WITH_BORING_SSL_ASM=false
export GRPC_PYTHON_BUILD_SYSTEM_ABSL=true
export GRPC_PYTHON_BUILD_SYSTEM_CARES=true
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true
export GRPC_PYTHON_BUILD_SYSTEM_RE2=true
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true
export GRPC_PYTHON_BUILD_WITH_CYTHON=true
export GRPC_PYTHON_CFLAGS="%{optflags}"
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
# a symlink to the shared system certificates is used
%python_expand ln -sf %{_localstatedir}/lib/ca-certificates/ca-bundle.pem %{buildroot}%{$python_sitearch}/grpc/_cython/_credentials/roots.pem
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitearch}/grpc/
%{python_sitearch}/%{modname}-%{version}.dist-info
%changelog

View File

@ -0,0 +1,13 @@
Index: xxHash-0.8.1/xxhash.h
===================================================================
--- xxHash-0.8.1.orig/xxhash.h
+++ xxHash-0.8.1/xxhash.h
@@ -1408,7 +1408,7 @@ XXH3_128bits_reset_withSecretandSeed(XXH
(defined(__INTEL_COMPILER) && !defined(_WIN32)) || \
( \
defined(__GNUC__) && ( \
- (defined(__ARM_ARCH) && __ARM_ARCH >= 7) || \
+ (defined(__ARM_ARCH) && __ARM_ARCH >= 6) || \
( \
defined(__mips__) && \
(__mips <= 5 || __mips_isa_rev < 6) && \

43
xxhash-ppc64le-gcc7.patch Normal file
View File

@ -0,0 +1,43 @@
From 15ce80f9f2760609d8cc68cea76d3f3217ab70e1 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Tue, 30 Nov 2021 23:19:38 +0100
Subject: [PATCH] Fix compilation on RHEL 7 ppc64le (gcc 4.8)
---
xxhash.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xxhash.h b/xxhash.h
index 08ab794..7850622 100644
--- a/xxhash.h
+++ b/xxhash.h
@@ -4129,7 +4129,7 @@ XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc,
const void* XXH_RESTRICT secret)
{
/* presumed aligned */
- unsigned long long* const xacc = (unsigned long long*) acc;
+ unsigned int* const xacc = (unsigned int*) acc;
xxh_u64x2 const* const xinput = (xxh_u64x2 const*) input; /* no alignment restriction */
xxh_u64x2 const* const xsecret = (xxh_u64x2 const*) secret; /* no alignment restriction */
xxh_u64x2 const v32 = { 32, 32 };
@@ -4145,7 +4145,7 @@ XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc,
/* product = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)shuffled & 0xFFFFFFFF); */
xxh_u64x2 const product = XXH_vec_mulo((xxh_u32x4)data_key, shuffled);
/* acc_vec = xacc[i]; */
- xxh_u64x2 acc_vec = vec_xl(0, xacc + 2 * i);
+ xxh_u64x2 acc_vec = (xxh_u64x2)vec_xl(0, xacc + 4 * i);
acc_vec += product;
/* swap high and low halves */
@@ -4155,7 +4155,7 @@ XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc,
acc_vec += vec_xxpermdi(data_vec, data_vec, 2);
#endif
/* xacc[i] = acc_vec; */
- vec_xst(acc_vec, 0, xacc + 2 * i);
+ vec_xst((xxh_u32x4)acc_vec, 0, xacc + 4 * i);
}
}
--
2.39.2