From 62df7d8ee35989a1fe5b9a41fe39a60c678bcfbd Mon Sep 17 00:00:00 2001 From: panchenbo Date: Sat, 12 Aug 2023 15:05:06 +0800 Subject: [PATCH] add loongarch64 support and fix sw_64 support patch --- postgresql-13.3-sw.patch | 14 +------------- postgresql.spec | 13 +++++++------ 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/postgresql-13.3-sw.patch b/postgresql-13.3-sw.patch index f3f71c7..8d60909 100755 --- a/postgresql-13.3-sw.patch +++ b/postgresql-13.3-sw.patch @@ -10,18 +10,6 @@ diff -Naur postgresql-13.3.org/contrib/pgcrypto/crypt-blowfish.c postgresql-13.3 #define BF_ASM 0 #define BF_SCALE 1 #else -diff -Naur postgresql-13.3.org/postgresql-setup-8.5/Makefile.in postgresql-13.3.sw/postgresql-setup-8.5/Makefile.in ---- postgresql-13.3.org/postgresql-setup-8.5/Makefile.in 2022-09-16 11:31:14.930000000 +0800 -+++ postgresql-13.3.sw/postgresql-setup-8.5/Makefile.in 2022-09-16 11:37:09.260000000 +0800 -@@ -459,7 +459,7 @@ - newunit = sbin/$(NAME_BINARYBASE)-new-systemd-unit - newunit_in = sbin/new-systemd-unit.in - @WANT_SYSVINIT_FALSE@sbin_SCRIPTS = $(newunit) --HELP2MAN = $(SHELL) $(top_srcdir)/$(config_aux_dir)/missing --run help2man -+HELP2MAN = $(SHELL) $(top_srcdir)/$(config_aux_dir)/missing --run help2man --no-discard-stderr - - # The help2man call - # ================= diff -Naur postgresql-13.3.org/src/include/port/atomics/arch-sw_64.h postgresql-13.3.sw/src/include/port/atomics/arch-sw_64.h --- postgresql-13.3.org/src/include/port/atomics/arch-sw_64.h 1970-01-01 08:00:00.000000000 +0800 +++ postgresql-13.3.sw/src/include/port/atomics/arch-sw_64.h 2022-09-16 13:37:10.630000000 +0800 @@ -59,7 +47,7 @@ diff -Naur postgresql-13.3.org/src/include/port/atomics.h postgresql-13.3.sw/src #include "port/atomics/arch-arm.h" #elif defined(__i386__) || defined(__i386) || defined(__x86_64__) #include "port/atomics/arch-x86.h" -+#elif defined(__sw_646__) ++#elif defined(__sw_64__) +#include "port/atomics/arch-sw_64.h" #elif defined(__ia64__) || defined(__ia64) #include "port/atomics/arch-ia64.h" diff --git a/postgresql.spec b/postgresql.spec index f2c8a36..a8a3279 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -1,6 +1,6 @@ %{!?beta:%global beta 0} %{!?test:%global test 1} -%ifarch riscv64 +%ifarch riscv64 loongarch64 # Fail to pass tests on riscv64 %{!?llvmjit:%global llvmjit 0} %else @@ -36,7 +36,7 @@ Summary: PostgreSQL client programs Name: postgresql %global majorversion 13 Version: %{majorversion}.3 -Release: 7 +Release: 8 # The PostgreSQL license is very similar to other MIT licenses, but the OSI # recognizes it as an independent license, so we do as well. @@ -359,9 +359,7 @@ goal of accelerating analytics queries. %patch12 -p1 %patch13 -p1 %patch14 -p1 -%ifarch sw_64 %patch15 -p1 -%endif # We used to run autoconf here, but there's no longer any real need to, # since Postgres ships with a reasonably modern configure script. @@ -428,7 +426,7 @@ export CFLAGS # since that's still considered the default plpython version. common_configure_options=' --disable-rpath -%ifarch riscv64 +%ifarch riscv64 loongarch64 --disable-spinlocks %endif %if %beta @@ -620,7 +618,7 @@ upgrade_configure () --host=%{_host} \ --prefix=%prev_prefix \ --disable-rpath \ -%ifarch riscv64 +%ifarch riscv64 loongarch64 --disable-spinlocks \ %endif %if %beta @@ -1248,6 +1246,9 @@ make -C postgresql-setup-%{setup_version} check %changelog +* Sat Aug 12 2023 panchenbo - 13.3-8 +- add loongarch64 support and fix sw_64 support patch + * Tue Oct 25 2022 wuzx - 13.3-7 - Add sw64 architecture -- Gitee