1 Star 0 Fork 14

康后银/emacs

forked from src-anolis-os/emacs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
1001-emacs-add-sw.patch 2.68 KB
一键复制 编辑 原始数据 按行查看 历史
康后银 提交于 2023-06-20 14:24 . add sw
From f0cc006e3b7f490ece36996dfbef46712cdaf36f Mon Sep 17 00:00:00 2001
From: wxiat <nijie@wxiat.com>
Date: Tue, 20 Jun 2023 14:20:50 +0800
Subject: [PATCH] add sw
Signed-off-by: wxiat <nijie@wxiat.com>
---
build-aux/config.guess | 8 ++++++++
build-aux/config.sub | 1 +
configure.ac | 2 +-
src/unexelf.c | 8 +++++++-
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 457a63a..827cd81 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -926,6 +926,14 @@ EOF
UNAME_MACHINE=aarch64_be
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
+ sw_64:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ sw) UNAME_MACHINE=sw_64 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo "$UNAME_MACHINE"-sunway-linux-"$LIBC"
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 90f19bb..eb9e11d 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1159,6 +1159,7 @@ case $cpu-$vendor in
| aarch64 | aarch64_be \
| loongarch32 | loongarch64 | loongarchx32 \
| abacus \
+ | sw_64 \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
| alphapca5[67] | alpha64pca5[67] \
diff --git a/configure.ac b/configure.ac
index 0b34532..d4d637c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -703,7 +703,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-* | aarch64-* | sw_64-* ) ;;
* ) unported=yes ;;
esac
opsys=darwin
diff --git a/src/unexelf.c b/src/unexelf.c
index b5cded5..6c1e121 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 <sys/exec_ecoff.h>
+# 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.31.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kanghou-silver/emacs.git
git@gitee.com:kanghou-silver/emacs.git
kanghou-silver
emacs
emacs
a8

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385