diff --git a/3000-add-sw_64-support.patch b/3000-add-sw_64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..7390bf22699f3fd54fdd73cb428d4e0885df7d21 --- /dev/null +++ b/3000-add-sw_64-support.patch @@ -0,0 +1,14 @@ +diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h +index db691d8..0a5bcef 100644 +--- a/src/google/protobuf/stubs/platform_macros.h ++++ b/src/google/protobuf/stubs/platform_macros.h +@@ -69,6 +69,9 @@ + #elif defined(__s390__) + #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 + #define GOOGLE_PROTOBUF_ARCH_S390 1 ++#elif defined(__sw_64__) ++#define GOOGLE_PROTOBUF_ARCH_SW_64 1 ++#define GOOGLE_PROTOBUF_ARCH_64_BIT 1 + #else + #error Host architecture was not detected as supported by protobuf + #endif diff --git a/3001-add-loongarch64-support.patch b/3001-add-loongarch64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..8fafce64b8e549d1e3262e994eabecb53d9d04b3 --- /dev/null +++ b/3001-add-loongarch64-support.patch @@ -0,0 +1,27 @@ +From 112b961833d582207565a6929b0e68d6f5e22af7 Mon Sep 17 00:00:00 2001 +From: yangchenguang +Date: Mon, 8 May 2023 14:10:13 +0800 +Subject: [PATCH] Add support loongarch64 + +Signed-off-by: yangchenguang +--- + src/google/protobuf/stubs/platform_macros.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h +index 0a5bcef..d3597a5 100644 +--- a/src/google/protobuf/stubs/platform_macros.h ++++ b/src/google/protobuf/stubs/platform_macros.h +@@ -72,6 +72,9 @@ + #elif defined(__sw_64__) + #define GOOGLE_PROTOBUF_ARCH_SW_64 1 + #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 ++#elif defined(__loongarch64) ++#define GOOGLE_PROTOBUF_ARCH_LA64 1 ++#define GOOGLE_PROTOBUF_ARCH_64_BIT 1 + #else + #error Host architecture was not detected as supported by protobuf + #endif +-- +2.33.0 + diff --git a/protobuf2.spec b/protobuf2.spec index 9ec6fcb53c825ccf59330e2a66844ca5d8386f1d..70e6029ff259bcba228a90b13c1a0d391d697128 100644 --- a/protobuf2.spec +++ b/protobuf2.spec @@ -6,7 +6,7 @@ Summary: Protocol Buffers - Google's data interchange format Name: protobuf2 Version: 2.5.0 -Release: 3 +Release: 4 License: BSD Source: http://protobuf.googlecode.com/files/protobuf-%{version}.tar.bz2 Source1: ftdetect-proto.vim @@ -15,6 +15,9 @@ Patch1: protobuf-2.5.0-gtest.patch Patch2: protobuf-2.5.0-java-fixes.patch Patch3: 0001-Add-generic-GCC-support-for-atomic-operations.patch Patch4: protobuf-2.5.0-makefile.patch + +Patch3000: 3000-add-sw_64-support.patch +Patch3001: 3001-add-loongarch64-support.patch URL: http://code.google.com/p/protobuf/ BuildRequires: automake autoconf libtool pkgconfig zlib-devel emacs emacs-el >= 24.1 maven-plugin-bundle gcc-c++ %if %{with gtest} @@ -134,6 +137,8 @@ rm -rf java/src/test %endif %patch3 -p1 -b .generic-atomics %patch4 -p1 -b .generic-atomics-makefile +%patch3000 -p1 -b .add-sw_64-support +%patch3001 -p1 -b .add-loongarch64-support %build iconv -f iso8859-1 -t utf-8 CONTRIBUTORS.txt > CONTRIBUTORS.txt.utf8 @@ -241,6 +246,9 @@ install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{emacs_startdir} %endif %changelog +* Sat Aug 12 2023 panchenbo - 2.5.0-4 +- add loongarch64 and sw_64 support + * Wed Aug 18 2021 lingsheng - 2.5.0-3 - Modify subpackage's install require