diff --git a/add-loongarch64-support-for-config.guess-and-config.sub.patch b/add-loongarch64-support-for-config.guess-and-config.sub.patch new file mode 100644 index 0000000000000000000000000000000000000000..9dcec4360a0916426ee585b2c56cf555fe8d6b51 --- /dev/null +++ b/add-loongarch64-support-for-config.guess-and-config.sub.patch @@ -0,0 +1,26 @@ +diff --git a/config.guess b/config.guess +index 0ff02d1..1caf3a6 100644 +--- a/config.guess ++++ b/config.guess +@@ -983,6 +983,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 6107010..aca1d40 100644 +--- a/config.sub ++++ b/config.sub +@@ -269,6 +269,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 \ diff --git a/add-loongarch64-to-generic_arches.patch b/add-loongarch64-to-generic_arches.patch new file mode 100644 index 0000000000000000000000000000000000000000..5a911c1472bff9f5df92fd786684f21339b99635 --- /dev/null +++ b/add-loongarch64-to-generic_arches.patch @@ -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 sw_64 ++%generic_arches %{ix86} x86_64 %{arm} aarch64 sw_64 loongarch64 + %ldc_arches %{generic_arches} + %valgrind_arches %{generic_arches} + %nodejs_arches %{generic_arches} diff --git a/openEuler-rpm-config.spec b/openEuler-rpm-config.spec index 8ca2b196a7d6f6f645b079d530789ae1646b0a4d..3a39508ece74a954ccd381c6d6681c7fa035aa65 100644 --- a/openEuler-rpm-config.spec +++ b/openEuler-rpm-config.spec @@ -3,7 +3,7 @@ Name: %{vendor}-rpm-config Version: 30 -Release: 26 +Release: 27 License: GPL+ Summary: specific rpm configuration files URL: https://gitee.com/openeuler/openEuler-rpm-config @@ -21,6 +21,9 @@ Patch7: Fix-python3_version-macros-for-Python-3.10.patch Patch8: Give-a-warning-when-using-kabi-outside-our-stablelis.patch Patch9: fixed-a-bug-that-missing_-p-in-macros.kmp.patch Patch10: openEuler-rpm-config-sw.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: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} @@ -120,6 +123,9 @@ mkdir -p %{buildroot}%{_fileattrsdir} %{rpmvdir}/find-requires.ksyms %changelog +* Mon Nov 21 2022 huajingyun - 30-27 +- add loongarch64 support + * Mon Oct 24 2022 wuzx - 30-26 - Add sw64 architecture diff --git a/update-config.guess-and-config.sub-for-loongarch64.patch b/update-config.guess-and-config.sub-for-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..4e4b88a25e31068a35429bd0a098ccc06f16024e --- /dev/null +++ b/update-config.guess-and-config.sub-for-loongarch64.patch @@ -0,0 +1,39 @@ +From fe6cff21eb18cc05704db85520db57c0d58bd2d3 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +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 +