From 4a4c856c76158c91c4a08b7106ab130ccbbf7ec0 Mon Sep 17 00:00:00 2001 From: swcompiler Date: Thu, 24 Oct 2024 13:36:15 +0800 Subject: [PATCH] Add Sw64 ISA support --- Sw64-Port-libmpc.patch | 34 ++++++++++++++++++++++++++++++++++ libmpc.spec | 9 ++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 Sw64-Port-libmpc.patch diff --git a/Sw64-Port-libmpc.patch b/Sw64-Port-libmpc.patch new file mode 100644 index 0000000..449f009 --- /dev/null +++ b/Sw64-Port-libmpc.patch @@ -0,0 +1,34 @@ +diff --git a/build-aux/config.guess b/build-aux/config.guess +index 2a02660..1006612 100755 +--- a/build-aux/config.guess ++++ b/build-aux/config.guess +@@ -939,6 +939,17 @@ EOF + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ SW6) UNAME_MACHINE=sw_64sw6 ;; ++ SW6A) UNAME_MACHINE=sw_64sw6a ;; ++ SW6B) UNAME_MACHINE=sw_64sw6b ;; ++ SW8A) UNAME_MACHINE=sw_64sw8a ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; +diff --git a/build-aux/config.sub b/build-aux/config.sub +index a3f11f8..e256286 100755 +--- a/build-aux/config.sub ++++ b/build-aux/config.sub +@@ -1161,6 +1161,7 @@ case $cpu-$vendor in + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ ++ | sw_64 | sw_64sw6 | sw_64sw6a | sw_64sw6b | sw_64sw8a \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb \ diff --git a/libmpc.spec b/libmpc.spec index e8667e1..d036924 100644 --- a/libmpc.spec +++ b/libmpc.spec @@ -1,6 +1,6 @@ Name: libmpc Version: 1.2.0 -Release: 7 +Release: 8 Summary: C library for multiple precision complex arithmetic License: LGPLv3+ and GFDL-1.3-only URL: http://www.multiprecision.org/ @@ -11,6 +11,9 @@ Patch6001: backport-0002-Fix-bug-in-mpc_pow_fr.patch Patch6002: backport-0003-Fix-bug-in-bug-fix-of-mpc_pow_fr.patch Patch6003: backport-0004-Correct-signs-of-0-parts-in-exact-Karatsuba-multipli.patch +# Sw64 Port +Patch7001: Sw64-Port-libmpc.patch + BuildRequires: gcc BuildRequires: gmp-devel >= 5.0.0 BuildRequires: mpfr-devel >= 4.1.0 @@ -36,6 +39,7 @@ Header files and shared object symlinks for MPC is a C library. %patch6001 -p1 %patch6002 -p1 %patch6003 -p1 +%patch7001 -p1 %build %configure --disable-static @@ -78,6 +82,9 @@ fi %{_libdir}/libmpc.so %changelog +* Thu Oct 24 2024 swcompiler - 1.2.0-8 +- Add Sw64 ISA support + * Fri May 5 2023 volcanodragon - 1.2.0-7 - fix the bug that bugfix patches are not patched. -- Gitee