From f44fbbf0dbd2f7eca6424bbd3cab703a9869f5c8 Mon Sep 17 00:00:00 2001 From: "fenghui@nfschina.com" Date: Mon, 31 Mar 2025 18:54:56 +0800 Subject: [PATCH] arch: Support sw_64 arch Project:TC2024110202 Signed-off-by: fenghui@nfschina.com --- emacs-Support-sw_64-arch.patch | 52 ++++++++++++++++++++++++++++++++++ emacs.spec | 10 ++++++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 emacs-Support-sw_64-arch.patch diff --git a/emacs-Support-sw_64-arch.patch b/emacs-Support-sw_64-arch.patch new file mode 100644 index 0000000..0f8c04b --- /dev/null +++ b/emacs-Support-sw_64-arch.patch @@ -0,0 +1,52 @@ +From 7d161495cc0e90c06ce1a4b4dc6230ad389c5481 Mon Sep 17 00:00:00 2001 +From: "fenghui@nfschina.com" +Date: Mon, 31 Mar 2025 18:10:08 +0800 +Subject: [PATCH 1/1] Support sw_64 arch + +--- + configure.ac | 2 +- + src/unexelf.c | 8 +++++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index eca5025..f0e0384 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -740,7 +740,7 @@ case "${canonical}" in + *-apple-darwin* ) + case "${canonical}" in + *-apple-darwin[0-9].*) unported=yes ;; +- i[3456]86-* | x86_64-* | arm-* | aarch64-* ) ;; ++ i[3456]86-* | x86_64-* | arm-* | sw_64-* | aarch64-* ) ;; + * ) unported=yes ;; + esac + opsys=darwin +diff --git a/src/unexelf.c b/src/unexelf.c +index feb26ff..df74863 100644 +--- a/src/unexelf.c ++++ b/src/unexelf.c +@@ -120,7 +120,7 @@ typedef struct { + /* + * NetBSD does not have normal-looking user-land ELF support. + */ +-# if defined __alpha__ || defined __sparc_v9__ || defined _LP64 ++# if defined __alpha__ || defined __sparc_v9__ || defined _LP64 || defined __sw_64__ + # define ELFSIZE 64 + # else + # define ELFSIZE 32 +@@ -150,6 +150,12 @@ typedef struct { + # define pHDRR HDRR * + # endif /* __alpha__ */ + ++# ifdef __sw_64__ ++# include ++# define HDRR struct ecoff_symhdr ++# define pHDRR HDRR * ++# endif /* __sw_64__ */ ++ + #ifdef __mips__ /* was in pkgsrc patches for 20.7 */ + # define SHT_MIPS_DEBUG DT_MIPS_FLAGS + # define HDRR struct Elf_Shdr +-- +2.41.0 + diff --git a/emacs.spec b/emacs.spec index 4782e97..cc27f27 100644 --- a/emacs.spec +++ b/emacs.spec @@ -1,4 +1,4 @@ -%define anolis_release 2 +%define anolis_release 3 %global _hardened_build 1 # This file is encoded in UTF-8. -*- coding: utf-8 -*- @@ -19,6 +19,7 @@ Patch1: emacs-spellchecker.patch Patch2: emacs-system-crypto-policies.patch Patch3: emacs-libdir-vs-systemd.patch Patch4: 0001-Fix-man.el-shell-injection-vulnerability.patch +Patch5: emacs-Support-sw_64-arch.patch BuildRequires: gcc BuildRequires: atk-devel @@ -208,6 +209,10 @@ ln -s ../../%{name}/%{version}/etc/NEWS doc %build +%ifarch sw_64 +%_update_config_guess +%_update_config_sub +%endif export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}" %set_build_flags @@ -512,6 +517,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %{_includedir}/emacs-module.h %changelog +* Mon Mar 31 2025 fenghui - 1:29.4-3 +- arch: Support sw_64 arch + * Wed Mar 05 2025 yangjinlin01 - 1:29.4-2 - fix the CVE-2025-1244 -- Gitee