add loongarch64 support
Signed-off-by: Jingyun Hua <huajingyun@loongson.cn>
This commit is contained in:
parent
6baf165332
commit
4a49256f53
@ -0,0 +1,26 @@
|
|||||||
|
diff --git a/config.guess b/config.guess
|
||||||
|
index 463631a..2985f85 100644
|
||||||
|
--- a/config.guess
|
||||||
|
+++ b/config.guess
|
||||||
|
@@ -975,6 +975,9 @@ EOF
|
||||||
|
k1om:Linux:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
|
exit ;;
|
||||||
|
+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
|
||||||
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
|
+ exit ;;
|
||||||
|
m32r*:Linux:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
|
exit ;;
|
||||||
|
diff --git a/config.sub b/config.sub
|
||||||
|
index 39dbf60..39870d3 100644
|
||||||
|
--- a/config.sub
|
||||||
|
+++ b/config.sub
|
||||||
|
@@ -268,6 +268,7 @@ case $basic_machine in
|
||||||
|
| k1om \
|
||||||
|
| le32 | le64 \
|
||||||
|
| lm32 \
|
||||||
|
+ | loongarch32 | loongarch64 | loongarchx32 \
|
||||||
|
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||||
|
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
|
||||||
|
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||||
13
add-loongarch64-to-generic_arches.patch
Normal file
13
add-loongarch64-to-generic_arches.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/macros b/macros
|
||||||
|
index d6b2c80..a66eb2e 100644
|
||||||
|
--- a/macros
|
||||||
|
+++ b/macros
|
||||||
|
@@ -241,7 +241,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 loongarch64
|
||||||
|
%ldc_arches %{generic_arches}
|
||||||
|
%valgrind_arches %{generic_arches}
|
||||||
|
%nodejs_arches %{generic_arches}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: %{vendor}-rpm-config
|
Name: %{vendor}-rpm-config
|
||||||
Version: 30
|
Version: 30
|
||||||
Release: 28
|
Release: 29
|
||||||
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
|
||||||
@ -21,6 +21,9 @@ Patch7: add-common-script.patch
|
|||||||
Patch8: Fix-python3_version-macros-for-Python-3.10.patch
|
Patch8: Fix-python3_version-macros-for-Python-3.10.patch
|
||||||
Patch9: Give-a-warning-when-using-kabi-outside-our-stablelis.patch
|
Patch9: Give-a-warning-when-using-kabi-outside-our-stablelis.patch
|
||||||
Patch10: fixed-a-bug-that-missing_-p-in-macros.kmp.patch
|
Patch10: fixed-a-bug-that-missing_-p-in-macros.kmp.patch
|
||||||
|
Patch11: update-config.guess-and-config.sub-for-loongarch64.patch
|
||||||
|
Patch12: add-loongarch64-to-generic_arches.patch
|
||||||
|
Patch13: add-loongarch64-support-for-config.guess-and-config.sub.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}
|
||||||
@ -124,6 +127,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/%{_vendor} common.lua
|
|||||||
%{rpmvdir}/find-requires.ksyms
|
%{rpmvdir}/find-requires.ksyms
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 21 2022 huajingyun <huajingyun@loongson.cn> - 30-29
|
||||||
|
- add loongarch64 support
|
||||||
|
|
||||||
* Wed Oct 12 2022 yangmingtai <yangmingtai@huawei.com> - 30-28
|
* Wed Oct 12 2022 yangmingtai <yangmingtai@huawei.com> - 30-28
|
||||||
- macro.kmp support -p preamble
|
- macro.kmp support -p preamble
|
||||||
|
|
||||||
|
|||||||
39
update-config.guess-and-config.sub-for-loongarch64.patch
Normal file
39
update-config.guess-and-config.sub-for-loongarch64.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From fe6cff21eb18cc05704db85520db57c0d58bd2d3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||||
|
Date: Tue, 12 Apr 2022 22:31:41 +0800
|
||||||
|
Subject: [PATCH] update config.guess and config.sub for loongarch64
|
||||||
|
|
||||||
|
---
|
||||||
|
macros | 16 ++++++++++++++++
|
||||||
|
1 file changed, 16 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/macros b/macros
|
||||||
|
index 5c7447b..dc8c749 100644
|
||||||
|
--- a/macros
|
||||||
|
+++ b/macros
|
||||||
|
@@ -49,6 +49,22 @@
|
||||||
|
# ---- configure and makeinstall.
|
||||||
|
%_configure_gnuconfig_hack 1
|
||||||
|
%_configure_libtool_hardening_hack 1
|
||||||
|
+
|
||||||
|
+#update config.guess and config.sub
|
||||||
|
+%_update_config_guess \
|
||||||
|
+ [ "%_configure_gnuconfig_hack" = 1 ] && for i in $(find . -name config.guess) ; do \
|
||||||
|
+ [ -f /usr/lib/rpm/%{_vendor}/$(basename $i) ] && \
|
||||||
|
+ %{__rm} -f $i && \
|
||||||
|
+ %{__cp} -fv /usr/lib/rpm/%{_vendor}/$(basename $i) $i ; \
|
||||||
|
+ done ;
|
||||||
|
+
|
||||||
|
+%_update_config_sub \
|
||||||
|
+ [ "%_configure_gnuconfig_hack" = 1 ] && for i in $(find . -name config.sub) ; do \
|
||||||
|
+ [ -f /usr/lib/rpm/%{_vendor}/$(basename $i) ] && \
|
||||||
|
+ %{__rm} -f $i && \
|
||||||
|
+ %{__cp} -fv /usr/lib/rpm/%{_vendor}/$(basename $i) $i ; \
|
||||||
|
+ done ;
|
||||||
|
+
|
||||||
|
%configure \
|
||||||
|
%{set_build_flags}; \
|
||||||
|
[ "%_configure_gnuconfig_hack" = 1 ] && for i in $(find $(dirname %{_configure}) -name config.guess -o -name config.sub) ; do \
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user