Package: protobuf / 3.6.1.3-2

s390x.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835302
Bug-Upstream: https://github.com/google/protobuf/issues/2002
Origin: https://github.com/ibmruntimes/v8z
Author: Sebastiaan Couwenberg <sebastic@xs4all.nl>
Description: Add support for s390x architecture.
 Based on port of Google V8 JavaScript engine to z Systems

--- a/src/google/protobuf/stubs/platform_macros.h
+++ b/src/google/protobuf/stubs/platform_macros.h
@@ -78,8 +78,15 @@
 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
 #elif defined(__PPC__)
 #define GOOGLE_PROTOBUF_ARCH_PPC 1
 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+#elif defined(__s390__) || defined(__s390x__)
+#define GOOGLE_PROTOBUF_ARCH_S390 1
+#if defined(__s390x__)
+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+#else
+#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+#endif
 #elif defined(__GNUC__)
 # if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
 // We fallback to the generic Clang/GCC >= 4.7 implementation in atomicops.h
 # elif defined(__clang__)