From 29e18cd8ae93d043436cb28e3a077c7c4a296e07 Mon Sep 17 00:00:00 2001
From: Hailiang <mahailiang@uniontech.com>
Date: Fri, 7 Mar 2025 10:44:48 +0800
Subject: [PATCH] add sw_64 support

---
 deps/jemalloc/build-aux/config.guess              | 3 +++
 deps/jemalloc/build-aux/config.sub                | 1 +
 deps/jemalloc/include/jemalloc/internal/quantum.h | 3 +++
 3 files changed, 7 insertions(+)

diff --git a/deps/jemalloc/build-aux/config.guess b/deps/jemalloc/build-aux/config.guess
index f772702..32ae30a 100755
--- a/deps/jemalloc/build-aux/config.guess
+++ b/deps/jemalloc/build-aux/config.guess
@@ -1102,6 +1102,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
+    sw_64:Linux:*:*)
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+	exit ;;
     tile*:Linux:*:*)
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
diff --git a/deps/jemalloc/build-aux/config.sub b/deps/jemalloc/build-aux/config.sub
index b0f8492..ec6bae2 100755
--- a/deps/jemalloc/build-aux/config.sub
+++ b/deps/jemalloc/build-aux/config.sub
@@ -1241,6 +1241,7 @@ case $cpu-$vendor in
 			| sparclite \
 			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
 			| spu \
+			| sw_64 \
 			| tahoe \
 			| thumbv7* \
 			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
diff --git a/deps/jemalloc/include/jemalloc/internal/quantum.h b/deps/jemalloc/include/jemalloc/internal/quantum.h
index c22d753..3fbef00 100644
--- a/deps/jemalloc/include/jemalloc/internal/quantum.h
+++ b/deps/jemalloc/include/jemalloc/internal/quantum.h
@@ -62,6 +62,9 @@
 	defined(__SH4_SINGLE_ONLY__))
 #    define LG_QUANTUM		4
 #  endif
+#  ifdef __sw_64__
+#    define LG_QUANTUM		4
+#  endif
 #  ifdef __tile__
 #    define LG_QUANTUM		4
 #  endif
-- 
2.20.1

