From 94b86e18a0dbc8b6f56b92d4b8c00016e6b1c3b9 Mon Sep 17 00:00:00 2001 From: Super User Date: Wed, 12 Mar 2025 10:29:16 +0800 Subject: [PATCH] Add sw_64 native compiler support. Project:TC2024110202 Signed-off-by: Super User --- numpy-1.24.4-sw.patch | 23 +++++++++++++++++++++++ numpy.spec | 7 +++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 numpy-1.24.4-sw.patch diff --git a/numpy-1.24.4-sw.patch b/numpy-1.24.4-sw.patch new file mode 100644 index 0000000..08d9f4b --- /dev/null +++ b/numpy-1.24.4-sw.patch @@ -0,0 +1,23 @@ +diff -Nur numpy-1.24.4-orig/numpy/core/include/numpy/npy_cpu.h numpy-1.24.4-mody/numpy/core/include/numpy/npy_cpu.h +--- numpy-1.24.4-orig/numpy/core/include/numpy/npy_cpu.h 2025-03-12 10:16:46.398212197 +0800 ++++ numpy-1.24.4-mody/numpy/core/include/numpy/npy_cpu.h 2025-03-12 10:17:40.911151661 +0800 +@@ -62,6 +62,8 @@ + #define NPY_CPU_IA64 + #elif defined(__hppa) + #define NPY_CPU_HPPA ++#elif defined(__sw_64__) ++ #define NPY_CPU_SW_64 + #elif defined(__alpha__) + #define NPY_CPU_ALPHA + #elif defined(__arm__) || defined(__aarch64__) || defined(_M_ARM64) +diff -Nur numpy-1.24.4-orig/numpy/core/include/numpy/npy_endian.h numpy-1.24.4-mody/numpy/core/include/numpy/npy_endian.h +--- numpy-1.24.4-orig/numpy/core/include/numpy/npy_endian.h 2025-03-12 10:16:46.398212197 +0800 ++++ numpy-1.24.4-mody/numpy/core/include/numpy/npy_endian.h 2025-03-12 10:18:10.983118269 +0800 +@@ -41,6 +41,7 @@ + || defined(NPY_CPU_AMD64) \ + || defined(NPY_CPU_IA64) \ + || defined(NPY_CPU_ALPHA) \ ++ || defined(NPY_CPU_SW_64) \ + || defined(NPY_CPU_ARMEL) \ + || defined(NPY_CPU_ARMEL_AARCH32) \ + || defined(NPY_CPU_ARMEL_AARCH64) \ diff --git a/numpy.spec b/numpy.spec index 7bfe40b..4e5e81f 100644 --- a/numpy.spec +++ b/numpy.spec @@ -1,4 +1,4 @@ -%define anolis_release 2 +%define anolis_release 3 %bcond_with tests %global blaslib flexiblas @@ -14,7 +14,7 @@ License: BSD and Python and ASL 2.0 URL: http://www.%{name}.org/ Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz Source1: https://%{name}.org/doc/1.24/%{name}-html.zip - +Patch0: numpy-1.24.4-sw.patch %description NumPy is a community-driven open source project developed by a diverse group of contributors. The NumPy leadership has made a @@ -159,6 +159,9 @@ python3 runtests.py \ %doc docs/* THANKS.* site.cfg.example %changelog +* Wed Mar 12 2025 yangguanghui - 1:1.24.4-3 +- Add sw_64 native compiler support. + * Wed Mar 13 2024 Zhao Hang - 1.24.4-2 - Rebuild with python3.11 -- Gitee