diff --git a/Add-loongarch64-support.patch b/Add-loongarch64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..90cf6fa68f5a587d90139880055ebd88f1b51eb0 --- /dev/null +++ b/Add-loongarch64-support.patch @@ -0,0 +1,29 @@ +From feb19456868ac62ba1b1b385703bed215e4451aa Mon Sep 17 00:00:00 2001 +From: starlet-dx <15929766099@163.com> +Date: Mon, 13 Feb 2023 14:30:02 +0800 +Subject: [PATCH 1/1] Add loongarch64 support + +--- + configure | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/configure b/configure +index e840d41..f367e80 100755 +--- a/configure ++++ b/configure +@@ -369,6 +369,12 @@ if test "x$PLATFORM" = "x"; then + fi + + case $PLATFORM in ++ "loongarch64") ++ RTM_ENABLE="CK_MD_RTM_DISABLE" ++ MM="${MM:-"CK_MD_RMO"}" ++ PLATFORM=loongarch64 ++ ENVIRONMENT=64 ++ ;; + "macppc"|"Power Macintosh"|"powerpc") + RTM_ENABLE="CK_MD_RTM_DISABLE" + LSE_ENABLE="CK_MD_LSE_DISABLE" +-- +2.30.0 + diff --git a/ck-0.6.0-sw.patch b/ck-0.6.0-sw.patch new file mode 100755 index 0000000000000000000000000000000000000000..4a8481e45829ea1644acd6e47b4d7c7e28f853bb --- /dev/null +++ b/ck-0.6.0-sw.patch @@ -0,0 +1,16 @@ +diff -Naur ck-0.6.0.org/configure ck-0.6.0.sw/configure +--- ck-0.6.0.org/configure 2022-09-14 10:55:40.750000000 +0800 ++++ ck-0.6.0.sw/configure 2022-09-15 13:37:57.490000000 +0800 +@@ -369,6 +369,12 @@ + fi + + case $PLATFORM in ++ "sw_64") ++ RTM_ENABLE="CK_MD_RTM_DISABLE" ++ MM="${MM:-"CK_MD_RMO"}" ++ PLATFORM=sw_64 ++ ENVIRONMENT=64 ++ ;; + "macppc"|"Power Macintosh"|"powerpc") + RTM_ENABLE="CK_MD_RTM_DISABLE" + LSE_ENABLE="CK_MD_LSE_DISABLE" diff --git a/ck-Add-sw64-architecture.patch b/ck-Add-sw64-architecture.patch new file mode 100644 index 0000000000000000000000000000000000000000..b25d0721b427c8bd20c5598d99830ca938703aaa --- /dev/null +++ b/ck-Add-sw64-architecture.patch @@ -0,0 +1,31 @@ +From 679ff9ab9246f8b7463b9fc4eac9476eda5276df Mon Sep 17 00:00:00 2001 +From: wzx +Date: Wed, 9 Nov 2022 14:27:40 +0800 +Subject: [PATCH] Add sw64 architecture + +Signed-off-by: wzx +--- + configure | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/configure b/configure +index 340e05c..6941c13 100755 +--- a/configure ++++ b/configure +@@ -407,6 +407,13 @@ if test "x$PLATFORM" = "x"; then + fi + + case $PLATFORM in ++ "sw_64") ++ RTM_ENABLE="CK_MD_RTM_DISABLE" ++ MM="${MM:-"CK_MD_RMO"}" ++ PLATFORM=sw_64 ++ ENVIRONMENT=64 ++ ;; ++ + "macppc"|"Power Macintosh"|"powerpc"|"powerpcspe") + RTM_ENABLE="CK_MD_RTM_DISABLE" + LSE_ENABLE="CK_MD_LSE_DISABLE" +-- +2.33.0 + diff --git a/ck.spec b/ck.spec index 0f91b11d5c87d26fee8bc7206d040f4fd44419e9..0af55c4be85df3a2d37dee037e9683df9fe67f93 100644 --- a/ck.spec +++ b/ck.spec @@ -1,10 +1,12 @@ Name: ck Version: 0.6.0 -Release: 2 +Release: 5 Summary: Concurrency programming lib License: BSD URL: http://concurrencykit.org/ Source0: http://concurrencykit.org/releases/%{name}-%{version}.tar.gz +Patch1: ck-Add-sw64-architecture.patch +Patch2: Add-loongarch64-support.patch BuildRequires: gcc autoconf automake @@ -22,10 +24,25 @@ Concurrency primitives, safe memory reclamation mechanisms and non-blocking data %prep %setup -q -n %{name}-%{version}/ +%ifarch sw_64 +%patch1 -p1 +%endif + +%ifarch loongarch64 +%patch2 -p1 +%endif %build export CFLAGS="${RPM_OPT_FLAGS}" ./configure --libdir=%{_libdir} --includedir=%{_includedir}/%{name} --mandir=%{_mandir} --prefix=%{_prefix} +%ifarch sw_64 +cp build/ck.build.aarch64 build/ck.build.sw_64 +%endif + +%ifarch loongarch64 +cp build/ck.build.aarch64 build/ck.build.loongarch64 +%endif + %make_build %install @@ -53,6 +70,15 @@ rm %{buildroot}%{_libdir}/libck.a %ldconfig_scriptlets %changelog +* Mon Feb 13 2023 yaoxin - 0.6.0-5 +- Add loongarch64 support + +* Wed Nov 23 2022 wuzx - 0.6.0-4 +- Add sw64 architecture + +* Wed Oct 19 2022 wuzx - 0.6.0-3 +- add sw64 patch + * Tue Sep 07 2021 lingsheng - 0.6.0-2 - Set CFLAGS to build debug related rpm