From 42bc408cebafb5025a599df2c284f5bdc75faa5e Mon Sep 17 00:00:00 2001 From: houlifei Date: Mon, 25 Dec 2023 14:54:16 +0800 Subject: [PATCH] add loongarch64 and sw_64 support --- 0001-add-loongarch64-and-sw_64-support.patch | 43 ++++++++++++++++++++ xz.spec | 11 ++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 0001-add-loongarch64-and-sw_64-support.patch diff --git a/0001-add-loongarch64-and-sw_64-support.patch b/0001-add-loongarch64-and-sw_64-support.patch new file mode 100644 index 0000000..28d9787 --- /dev/null +++ b/0001-add-loongarch64-and-sw_64-support.patch @@ -0,0 +1,43 @@ +From 82ab9c400cc3fb1243111a183c4aace0a331ec65 Mon Sep 17 00:00:00 2001 +From: houlifei +Date: Thu, 21 Dec 2023 17:42:19 +0800 +Subject: [PATCH] add loongarch64 and sw_64 support + +--- + build-aux/config.guess | 6 ++++++ + build-aux/config.sub | 2 ++ + 2 files changed, 8 insertions(+) + +diff --git a/build-aux/config.guess b/build-aux/config.guess +index 256083a..6cc7413 100755 +--- a/build-aux/config.guess ++++ b/build-aux/config.guess +@@ -992,6 +992,12 @@ EOF + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ loongarch64:Linux:*:*) ++ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ exit ;; ++ sw_64:Linux:*:*) ++ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; +diff --git a/build-aux/config.sub b/build-aux/config.sub +index 9ccf09a..ce0e05c 100755 +--- a/build-aux/config.sub ++++ b/build-aux/config.sub +@@ -446,6 +446,8 @@ case $basic_machine in + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ ++ | loongarch64-* \ ++ | sw_64-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) +-- +2.33.0 + diff --git a/xz.spec b/xz.spec index 8b04edd..5bfcf7b 100644 --- a/xz.spec +++ b/xz.spec @@ -1,6 +1,6 @@ Name: xz Version: 5.2.5 -Release: 3 +Release: 4 Summary: A free general-purpose data compreession software with LZMA2 algorithm License: Public Domain, LGPLv2.1 and GPLv2+ URL: http://tukaani.org/xz @@ -8,8 +8,14 @@ Source0: http://tukaani.org/%{name}/%{name}-%{version}.tar.xz Source1: colorxzgrep.sh Source2: colorxzgrep.csh +Source3: 0001-add-loongarch64-and-sw_64-support.patch + Patch6000: backport-CVE-2022-1271.patch +%ifarch loongarch64 sw_64 +Patch6001: 0001-add-loongarch64-and-sw_64-support.patch +%endif + BuildRequires: perl-interpreter gcc Requires: %{name} = %{version}-%{release} @@ -111,6 +117,9 @@ LD_LIBRARY_PATH=$PWD/src/liblzma/.libs make check %{_mandir}/de/man1/*xz* %changelog +* Mon Dec 25 2023 houlifei - 5.2.5-4 +- add loongarch64 and sw_64 support + * Fri Sep 23 2022 wangjiang - 5.2.5-3 - Type:enhancement - CVE:NA -- Gitee