From 6e25deb76d3a2e2689c75154a028c14ba066a5cc Mon Sep 17 00:00:00 2001 From: zhangshaoning Date: Mon, 21 Apr 2025 17:02:41 +0800 Subject: [PATCH] Add sw_64 support (cherry picked from commit 28e9d33ec35ba9dd6a8d7dfdd1389aeb4405dcfb) --- 0001-add-sw_64-support.patch | 74 ++++++++++++++++++++++++++++++++++++ python3.spec | 7 +++- 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 0001-add-sw_64-support.patch diff --git a/0001-add-sw_64-support.patch b/0001-add-sw_64-support.patch new file mode 100644 index 0000000..5b34ae8 --- /dev/null +++ b/0001-add-sw_64-support.patch @@ -0,0 +1,74 @@ +From 2332dbe2dedcd5ab9cf08f8ee6bf33cf5ffb6f26 Mon Sep 17 00:00:00 2001 +From: mahailiang +Date: Mon, 4 Nov 2024 20:44:53 +0800 +Subject: [PATCH] add sw_64 support + +--- + Modules/_ctypes/libffi_osx/types.c | 4 ++-- + config.guess | 3 +++ + config.sub | 1 + + configure.ac | 2 ++ + 4 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/Modules/_ctypes/libffi_osx/types.c b/Modules/_ctypes/libffi_osx/types.c +index 761d223..6c30067 100644 +--- a/Modules/_ctypes/libffi_osx/types.c ++++ b/Modules/_ctypes/libffi_osx/types.c +@@ -43,7 +43,7 @@ FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT); + /* Size and alignment are fake here. They must not be 0. */ + FFI_INTEGRAL_TYPEDEF(void, 1, 1, FFI_TYPE_VOID); + +-#if defined ALPHA || defined SPARC64 || defined X86_64 || \ ++#if defined ALPHA || defined SPARC64 || defined SW_64 || defined X86_64 || \ + defined S390X || defined IA64 || defined POWERPC64 + FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER); + #else +@@ -112,4 +112,4 @@ FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE); + #else + FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); + FFI_INTEGRAL_TYPEDEF(longdouble, 8, 8, FFI_TYPE_LONGDOUBLE); +-#endif +\ No newline at end of file ++#endif +diff --git a/config.guess b/config.guess +index e81d3ae..7a93969 100755 +--- a/config.guess ++++ b/config.guess +@@ -1140,6 +1140,9 @@ EOF + sparc:Linux:*:* | sparc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; ++ sw_64*:Linux:*:*) ++ echo $UNAME_MACHINE-unknown-linux-$LIBC ++ exit ;; + tile*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; +diff --git a/config.sub b/config.sub +index d74fb6d..ee5806d 100755 +--- a/config.sub ++++ b/config.sub +@@ -1262,6 +1262,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/configure.ac b/configure.ac +index 1b8c272..a8b8803 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -952,6 +952,8 @@ cat > conftest.c < - 3.11.6-12 +- Add sw_64 support + * Tue Feb 11 2025 Funda Wang - 3.11.6-11 - Type:CVE - CVE:CVE-2025-0938 -- Gitee