From d96aa474da407c806ef6b68c669f8027e366f302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=B7=E5=90=8E=E9=93=B6?= <@kanghou-silver> Date: Wed, 17 Apr 2024 19:06:24 +0800 Subject: [PATCH 1/2] add sw8a --- rpm-4.14.3-sw8a.patch | 83 +++++++++++++++++++++++++++++++++++++++++++ rpm.spec | 6 +++- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 rpm-4.14.3-sw8a.patch diff --git a/rpm-4.14.3-sw8a.patch b/rpm-4.14.3-sw8a.patch new file mode 100644 index 0000000..b64819e --- /dev/null +++ b/rpm-4.14.3-sw8a.patch @@ -0,0 +1,83 @@ +diff -uNar rpm-4.14.3.org/lib/rpmrc.c rpm-4.14.3.new/lib/rpmrc.c +--- rpm-4.14.3.org/lib/rpmrc.c 2024-04-17 17:09:56.322914055 +0800 ++++ rpm-4.14.3.new/lib/rpmrc.c 2024-04-17 17:12:14.035829226 +0800 +@@ -1250,7 +1250,7 @@ + + # if defined(__GNUC__) && defined(__alpha__) + { +- strcpy(un.machine, "sw_64sw6b"); ++ strcpy(un.machine, "sw_64sw8a"); + } + # endif + +diff -uNar rpm-4.14.3.org/macros.in rpm-4.14.3.new/macros.in +--- rpm-4.14.3.org/macros.in 2024-04-17 17:09:56.310913540 +0800 ++++ rpm-4.14.3.new/macros.in 2024-04-17 17:11:21.152557731 +0800 +@@ -1155,7 +1155,7 @@ + + #------------------------------------------------------------------------------ + # arch macro for all supported Sw_64 processors +-%sw_64 sw_64 sw_64sw6b ++%sw_64 sw_64 sw_64sw8a + + #------------------------------------------------------------------------------ + # arch macro for all supported Alpha processors +diff -uNar rpm-4.14.3.org/rpmrc.in rpm-4.14.3.new/rpmrc.in +--- rpm-4.14.3.org/rpmrc.in 2024-04-17 17:09:56.309913497 +0800 ++++ rpm-4.14.3.new/rpmrc.in 2024-04-17 17:13:44.157700226 +0800 +@@ -26,7 +26,7 @@ + optflags: ia32e -O2 -g + + optflags: sw_64 -O2 -g -mieee +-optflags: sw_64sw6b -O2 -g -mieee -mtune=sw6b ++optflags: sw_64sw8a -O2 -g -mieee -mtune=sw8a + + optflags: alpha -O2 -g -mieee + optflags: alphaev5 -O2 -g -mieee -mtune=ev5 +@@ -178,7 +178,7 @@ + arch_canon: em64t: em64t 1 + + arch_canon: sw_64: sw_64 2 +-arch_canon: sw_64sw6b: sw_64sw6b 2 ++arch_canon: sw_64sw8a: sw_64sw8a 2 + + arch_canon: alpha: alpha 2 + arch_canon: alphaev5: alphaev5 2 +@@ -318,7 +318,7 @@ + buildarchtranslate: i386: i386 + + buildarchtranslate: sw_64: sw_64 +-buildarchtranslate: sw_64sw6b: sw_64 ++buildarchtranslate: sw_64sw8a: sw_64 + + buildarchtranslate: alphaev5: alpha + buildarchtranslate: alphaev56: alpha +@@ -412,7 +412,7 @@ + arch_compat: alphaev5: alpha + arch_compat: alpha: axp noarch + +-arch_compat: sw_64sw6b: sw_64 ++arch_compat: sw_64sw8a: sw_64 + arch_compat: sw_64: axp noarch + + arch_compat: athlon: i686 +@@ -580,7 +580,7 @@ + buildarch_compat: alphaev5: alpha + buildarch_compat: alpha: noarch + +-buildarch_compat: sw_64sw6b: sw_64 ++buildarch_compat: sw_64sw8a: sw_64 + buildarch_compat: sw_64: noarch + + buildarch_compat: m68k: noarch +diff -uNar rpm-4.14.3.org/tools/elfdeps.c rpm-4.14.3.new/tools/elfdeps.c +--- rpm-4.14.3.org/tools/elfdeps.c 2024-04-17 17:09:56.322914055 +0800 ++++ rpm-4.14.3.new/tools/elfdeps.c 2024-04-17 17:26:51.110511169 +0800 +@@ -86,7 +86,6 @@ + if (ehdr->e_ident[EI_CLASS] == ELFCLASS64) { + switch (ehdr->e_machine) { + case EM_ALPHA: +- case EM_SW_64: + case EM_FAKE_ALPHA: + /* alpha doesn't traditionally have 64bit markers */ + break; diff --git a/rpm.spec b/rpm.spec index 548131c..8a84822 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.3 +%define anolis_release .0.4 %define _legacy_common_support 1 # build against xz? %bcond_without xz @@ -152,6 +152,7 @@ Patch1002: rpm-4.14.2-unversioned-python.patch Patch2000: 1000-rpm-anolis-support-loongarch.patch Patch2001: rpm-4.14.3-sw.patch Patch2002: 2002-rpm-anolis-support-sw_64.patch +Patch2003: rpm-4.14.3-sw8a.patch # Partially GPL/LGPL dual-licensed and some bits with BSD # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD @@ -701,6 +702,9 @@ make check || cat tests/rpmtests.log %doc doc/librpm/html/* %changelog +* Thu Apr 17 2024 wxiat - 4.14.3-24.0.2 +- Add sw8a Architecture + * Thu Jan 18 2024 Weisson - 4.14.3-24.0.3 - update config to support sw64 Architecture. -- Gitee From 2c38cf0119b02c8173b873b49180ad9423901b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=B7=E5=90=8E=E9=93=B6?= Date: Fri, 6 Sep 2024 02:21:03 +0000 Subject: [PATCH 2/2] rpm-4.14.3-sw8a.patch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 康后银 --- rpm-4.14.3-sw8a.patch | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/rpm-4.14.3-sw8a.patch b/rpm-4.14.3-sw8a.patch index b64819e..6e98eaa 100644 --- a/rpm-4.14.3-sw8a.patch +++ b/rpm-4.14.3-sw8a.patch @@ -70,14 +70,3 @@ diff -uNar rpm-4.14.3.org/rpmrc.in rpm-4.14.3.new/rpmrc.in buildarch_compat: sw_64: noarch buildarch_compat: m68k: noarch -diff -uNar rpm-4.14.3.org/tools/elfdeps.c rpm-4.14.3.new/tools/elfdeps.c ---- rpm-4.14.3.org/tools/elfdeps.c 2024-04-17 17:09:56.322914055 +0800 -+++ rpm-4.14.3.new/tools/elfdeps.c 2024-04-17 17:26:51.110511169 +0800 -@@ -86,7 +86,6 @@ - if (ehdr->e_ident[EI_CLASS] == ELFCLASS64) { - switch (ehdr->e_machine) { - case EM_ALPHA: -- case EM_SW_64: - case EM_FAKE_ALPHA: - /* alpha doesn't traditionally have 64bit markers */ - break; -- Gitee