forked from pool/protobuf
Accepting request 579462 from home:mlin7442:branches:devel:tools:building
add upstream patch to fix compile error on s390x OBS-URL: https://build.opensuse.org/request/show/579462 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf?expand=0&rev=60
This commit is contained in:
parent
c782c2c29c
commit
84439a1cac
31
adding-Release_CompareAndSwap-64-bit-variant.patch
Normal file
31
adding-Release_CompareAndSwap-64-bit-variant.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 642e1ac635f2563b4a14c255374f02645ae85dac Mon Sep 17 00:00:00 2001
|
||||
From: Nayana-ibm <nayana.thorat@gmail.com>
|
||||
Date: Mon, 27 Nov 2017 05:43:30 -0500
|
||||
Subject: [PATCH] Adding Release_CompareAndSwap 64-bit variant
|
||||
|
||||
---
|
||||
src/google/protobuf/stubs/atomicops_internals_generic_gcc.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h b/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
|
||||
index 0b0b06ce..075c406a 100644
|
||||
--- a/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
|
||||
+++ b/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
|
||||
@@ -146,6 +146,14 @@ inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
|
||||
return __atomic_load_n(ptr, __ATOMIC_RELAXED);
|
||||
}
|
||||
|
||||
+inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
|
||||
+ Atomic64 old_value,
|
||||
+ Atomic64 new_value) {
|
||||
+ __atomic_compare_exchange_n(ptr, &old_value, new_value, false,
|
||||
+ __ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
|
||||
+ return old_value;
|
||||
+}
|
||||
+
|
||||
#endif // defined(__LP64__)
|
||||
|
||||
} // namespace internal
|
||||
--
|
||||
2.16.1
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 23 10:12:07 UTC 2018 - mlin@suse.com
|
||||
|
||||
- Add adding-Release_CompareAndSwap-64-bit-variant.patch
|
||||
* Fix compile error undefined reference to
|
||||
`google::protobuf::internal::Release_CompareAndSwap(long volatile*, long, long)'
|
||||
on s390x https://github.com/google/protobuf/issues/3937
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 22 16:50:28 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
|
@ -34,6 +34,8 @@ Url: https://github.com/google/protobuf/
|
||||
Source0: https://github.com/google/protobuf/archive/v%{version}.tar.gz#/%{tarname}-%{version}.tar.gz
|
||||
Source1: manifest.txt.in
|
||||
Source2: baselibs.conf
|
||||
# PATCH-FIX-UPSTREAM Adding Release_CompareAndSwap 64-bit variant to fix compile error - mlin@suse.com
|
||||
Patch0: adding-Release_CompareAndSwap-64-bit-variant.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module python-dateutil}
|
||||
BuildRequires: %{python_module python-gflags}
|
||||
@ -128,6 +130,7 @@ This package contains the Python bindings for Google Protocol Buffers.
|
||||
%prep
|
||||
|
||||
%setup -q -n %{tarname}-%{version}
|
||||
%patch0 -p1
|
||||
mkdir gmock
|
||||
|
||||
%if %{with python2} || %{with python3}
|
||||
|
Loading…
x
Reference in New Issue
Block a user