[packages/protobuf] - added x32 patch (disable test specific to LP64 archs)
qboosh
qboosh at pld-linux.org
Fri Sep 11 20:39:24 CEST 2020
commit 6085fc9793b6c634cb843ac57a49a3d0e5f37503
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Sep 11 20:42:07 2020 +0200
- added x32 patch (disable test specific to LP64 archs)
protobuf-x32.patch | 13 +++++++++++++
protobuf.spec | 3 +++
2 files changed, 16 insertions(+)
---
diff --git a/protobuf.spec b/protobuf.spec
index 203ab0a..3d209b5 100644
--- a/protobuf.spec
+++ b/protobuf.spec
@@ -23,6 +23,7 @@ Source1: ftdetect-proto.vim
Patch0: system-gtest.patch
Patch1: no-wrap-memcpy.patch
Patch2: %{name}-no-wheel.patch
+Patch3: %{name}-x32.patch
URL: https://github.com/google/protobuf/
BuildRequires: autoconf >= 2.59
BuildRequires: automake >= 1:1.9
@@ -31,6 +32,7 @@ BuildRequires: automake >= 1:1.9
BuildRequires: libstdc++-devel >= 6:4.7
BuildRequires: libtool
BuildRequires: pkgconfig
+BuildRequires: sed >= 4.0
%if %{with python2}
BuildRequires: python-modules >= 1:2.7
BuildRequires: python-setuptools
@@ -209,6 +211,7 @@ opisów buforów protokołowych (Protocol Buffers).
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' \
examples/add_person.py \
diff --git a/protobuf-x32.patch b/protobuf-x32.patch
new file mode 100644
index 0000000..3ddc357
--- /dev/null
+++ b/protobuf-x32.patch
@@ -0,0 +1,13 @@
+Bucket selection is based on higher 32 bits of seed, which is 64-bit wide only on LP64 platforms.
+
+--- protobuf-3.13.0/src/google/protobuf/map_test.cc.orig 2020-08-15 01:24:06.000000000 +0200
++++ protobuf-3.13.0/src/google/protobuf/map_test.cc 2020-09-10 06:16:47.150949801 +0200
+@@ -1005,7 +1005,7 @@
+ // small maps. Currently we only have sufficient randomness for debug builds and
+ // builds where we can use the RDTSC instruction, so we only test for those
+ // builds.
+-#if defined(__x86_64__) && defined(__GNUC__) && \
++#if defined(__x86_64__) && defined(__LP64__) && defined(__GNUC__) && \
+ !defined(GOOGLE_PROTOBUF_NO_RDTSC)
+ TEST_F(MapImplTest, RandomOrdering) {
+ for (int i = 0; i < 10; ++i) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/protobuf.git/commitdiff/6085fc9793b6c634cb843ac57a49a3d0e5f37503
More information about the pld-cvs-commit
mailing list