]> git.pld-linux.org Git - packages/protobuf.git/commitdiff
- added x32 patch (disable test specific to LP64 archs) auto/th/protobuf-3.13.0-3
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 11 Sep 2020 18:42:07 +0000 (20:42 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 11 Sep 2020 18:42:07 +0000 (20:42 +0200)
protobuf-x32.patch [new file with mode: 0644]
protobuf.spec

diff --git a/protobuf-x32.patch b/protobuf-x32.patch
new file mode 100644 (file)
index 0000000..3ddc357
--- /dev/null
@@ -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) {
index 203ab0a63415e8cc84e5b5c9aa8a89182c3102b5..3d209b54dde7e45b93554a13bb35626ead07ae2e 100644 (file)
@@ -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 \
This page took 0.160009 seconds and 4 git commands to generate.