Add sw64 architecture

Signed-off-by: wzx <wuzx1226@qq.com>
(cherry picked from commit f9cb759700d8eca98f0a0a8d721a0251d73d9bbe)
This commit is contained in:
wzx 2022-10-24 17:19:02 +08:00 committed by openeuler-sync-bot
parent c72e325bf5
commit 38cc22966e
2 changed files with 68 additions and 1 deletions

63
openEuler-rpm-config-sw.patch Executable file
View File

@ -0,0 +1,63 @@
diff -Naur openEuler-rpm-config.org/config.guess openEuler-rpm-config.sw/config.guess
--- openEuler-rpm-config.org/config.guess 2022-09-28 02:14:20.761824000 +0000
+++ openEuler-rpm-config.sw/config.guess 2022-09-28 02:15:03.761824000 +0000
@@ -915,6 +915,14 @@
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
+ sw_64:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ sw) UNAME_MACHINE=sw_64 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo ${UNAME_MACHINE}-sunway-linux-${LIBC}
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -1459,4 +1467,4 @@
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
-# End:
\ No newline at end of file
+# End:
diff -Naur openEuler-rpm-config.org/config.sub openEuler-rpm-config.sw/config.sub
--- openEuler-rpm-config.org/config.sub 2022-09-28 02:14:20.761824000 +0000
+++ openEuler-rpm-config.sw/config.sub 2022-09-28 02:24:48.291824000 +0000
@@ -247,6 +247,7 @@
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | sw_64 \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
@@ -370,6 +371,7 @@
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | sw_64-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
@@ -1820,4 +1822,4 @@
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
-# End:
\ No newline at end of file
+# End:
diff -Naur openEuler-rpm-config.org/macros openEuler-rpm-config.sw/macros
--- openEuler-rpm-config.org/macros 2022-09-28 02:14:20.761824000 +0000
+++ openEuler-rpm-config.sw/macros 2022-09-28 02:15:49.081824000 +0000
@@ -225,7 +225,7 @@
%pkg_vcmp() (%{expand:%%{pkg_version_cmp %1 %3}} %2 0)
#arches macros
-%generic_arches %{ix86} x86_64 %{arm} aarch64
+%generic_arches %{ix86} x86_64 %{arm} aarch64 sw_64
%ldc_arches %{generic_arches}
%valgrind_arches %{generic_arches}
%nodejs_arches %{generic_arches}

View File

@ -3,7 +3,7 @@
Name: %{vendor}-rpm-config Name: %{vendor}-rpm-config
Version: 30 Version: 30
Release: 25 Release: 26
License: GPL+ License: GPL+
Summary: specific rpm configuration files Summary: specific rpm configuration files
URL: https://gitee.com/openeuler/openEuler-rpm-config URL: https://gitee.com/openeuler/openEuler-rpm-config
@ -20,6 +20,7 @@ Patch6: add-brp-scripts-to-delete-rpath.patch
Patch7: Fix-python3_version-macros-for-Python-3.10.patch Patch7: Fix-python3_version-macros-for-Python-3.10.patch
Patch8: Give-a-warning-when-using-kabi-outside-our-stablelis.patch Patch8: Give-a-warning-when-using-kabi-outside-our-stablelis.patch
Patch9: fixed-a-bug-that-missing_-p-in-macros.kmp.patch Patch9: fixed-a-bug-that-missing_-p-in-macros.kmp.patch
Patch10: openEuler-rpm-config-sw.patch
Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
@ -119,6 +120,9 @@ mkdir -p %{buildroot}%{_fileattrsdir}
%{rpmvdir}/find-requires.ksyms %{rpmvdir}/find-requires.ksyms
%changelog %changelog
* Mon Oct 24 2022 wuzx<wuzx1226@qq.com> - 30-26
- Add sw64 architecture
* Wed Oct 12 2022 yangmingtai <yangmingtai@huawei.com> - 30-25 * Wed Oct 12 2022 yangmingtai <yangmingtai@huawei.com> - 30-25
- macro.kmp support -p preamble - macro.kmp support -p preamble