From 2d0f95853fb2662321c2e8b9babbe6410f68ab0e Mon Sep 17 00:00:00 2001
From: yueyaoqiang <yueyaoqiang@kylinos.cn>
Date: Fri, 28 Mar 2025 13:50:33 +0800
Subject: [PATCH] add support sw_64

---
 build-aux/config.guess                    | 3 +++
 build-aux/config.sub                      | 1 +
 gnulib/m4/host-cpu-c-abi.m4               | 3 +++
 tp/Texinfo/XS/config.guess                | 3 +++
 tp/Texinfo/XS/config.sub                  | 1 +
 tp/Texinfo/XS/gnulib/m4/host-cpu-c-abi.m4 | 3 +++
 6 files changed, 14 insertions(+)

diff --git a/build-aux/config.guess b/build-aux/config.guess
index e81d3ae..b053c02 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1036,6 +1036,9 @@ EOF
     loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
 	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
 	;;
+    sw_64:Linux:*:*)
+        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+        ;;
     m32r*:Linux:*:*)
 	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
 	;;
diff --git a/build-aux/config.sub b/build-aux/config.sub
index baf1512..60bd925 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1208,6 +1208,7 @@ case $cpu-$vendor in
 			| le32 | le64 \
 			| lm32 \
 			| loongarch32 | loongarch64 \
+			| sw_64 \
 			| m32c | m32r | m32rle \
 			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
 			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
diff --git a/gnulib/m4/host-cpu-c-abi.m4 b/gnulib/m4/host-cpu-c-abi.m4
index b922324..9d45f28 100644
--- a/gnulib/m4/host-cpu-c-abi.m4
+++ b/gnulib/m4/host-cpu-c-abi.m4
@@ -385,6 +385,9 @@ EOF
 #ifndef __loongarch64__
 #undef __loongarch64__
 #endif
+#ifndef __sw_64__
+#undef __sw_64__
+#endif
 #ifndef __m68k__
 #undef __m68k__
 #endif
diff --git a/tp/Texinfo/XS/config.guess b/tp/Texinfo/XS/config.guess
index e81d3ae..b053c02 100755
--- a/tp/Texinfo/XS/config.guess
+++ b/tp/Texinfo/XS/config.guess
@@ -1036,6 +1036,9 @@ EOF
     loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
 	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
 	;;
+    sw_64:Linux:*:*)
+        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+        ;;
     m32r*:Linux:*:*)
 	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
 	;;
diff --git a/tp/Texinfo/XS/config.sub b/tp/Texinfo/XS/config.sub
index d74fb6d..5ffdcdc 100755
--- a/tp/Texinfo/XS/config.sub
+++ b/tp/Texinfo/XS/config.sub
@@ -1203,6 +1203,7 @@ case $cpu-$vendor in
 			| le32 | le64 \
 			| lm32 \
 			| loongarch32 | loongarch64 | loongarchx32 \
+			| sw_64 \
 			| m32c | m32r | m32rle \
 			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
 			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
diff --git a/tp/Texinfo/XS/gnulib/m4/host-cpu-c-abi.m4 b/tp/Texinfo/XS/gnulib/m4/host-cpu-c-abi.m4
index b922324..9d45f28 100644
--- a/tp/Texinfo/XS/gnulib/m4/host-cpu-c-abi.m4
+++ b/tp/Texinfo/XS/gnulib/m4/host-cpu-c-abi.m4
@@ -385,6 +385,9 @@ EOF
 #ifndef __loongarch64__
 #undef __loongarch64__
 #endif
+#ifndef __sw_64__
+#undef __sw_64__
+#endif
 #ifndef __m68k__
 #undef __m68k__
 #endif
-- 
2.27.0

