diff --git a/add-sw_64-support.patch b/add-sw_64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..851cef1031fb818c213755f861c5833a3a890f33 --- /dev/null +++ b/add-sw_64-support.patch @@ -0,0 +1,15 @@ +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/protobuf2.spec b/protobuf2.spec index 3af4c08759cf9178e80e4212b6e8b930dd748558..f227e6f6567f8e10d46789424b03fbe32a44f0a1 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: 6 +Release: 7 License: BSD Source: http://protobuf.googlecode.com/files/protobuf-%{version}.tar.bz2 Source1: ftdetect-proto.vim @@ -18,6 +18,7 @@ Patch4: protobuf-2.5.0-makefile.patch Patch5: 0001-protobuf2-add-support-for-loongarch64.patch Patch6: add-riscv64-support.patch Patch7: 0001-fix-build-error-for-loongarch64.patch +Patch8: add-sw_64-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} @@ -144,6 +145,9 @@ rm -rf java/src/test %ifarch riscv64 %patch6 -p1 %endif +%ifarch sw_64 +%patch8 -p1 +%endif %build iconv -f iso8859-1 -t utf-8 CONTRIBUTORS.txt > CONTRIBUTORS.txt.utf8 @@ -251,6 +255,9 @@ install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{emacs_startdir} %endif %changelog +* Mon Aug 04 2025 mahailiang - 2.5.0-7 +- add sw_64 support + * Fri May 23 2025 Wenlong Zhang - 2.5.0-6 - fix build error on loongarch64