mcst-linux-kernel/patches-2024.06.26/python3-numpy-1.24.2/0001-define-e2k-arch.patch

34 lines
1.4 KiB
Diff
Raw Normal View History

2024-07-09 13:51:45 +03:00
diff -rupN a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
--- a/numpy/core/include/numpy/npy_cpu.h 2023-03-15 22:49:28.138409188 +0300
+++ b/numpy/core/include/numpy/npy_cpu.h 2023-03-15 22:56:24.855588754 +0300
@@ -20,6 +20,7 @@
* NPY_CPU_RISCV64
* NPY_CPU_LOONGARCH
* NPY_CPU_WASM
+ * NPY_CPU_E2K
*/
#ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_
#define NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_
@@ -109,6 +110,8 @@
#elif defined(__EMSCRIPTEN__)
/* __EMSCRIPTEN__ is defined by emscripten: an LLVM-to-Web compiler */
#define NPY_CPU_WASM
+#elif defined(__e2k__)
+ #define NPY_CPU_E2K
#else
#error Unknown CPU, please report this to numpy maintainers with \
information about your platform (OS, CPU and compiler)
diff -rupN a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
--- a/numpy/core/include/numpy/npy_endian.h 2023-03-15 22:49:49.193212863 +0300
+++ b/numpy/core/include/numpy/npy_endian.h 2023-03-15 22:57:35.768096981 +0300
@@ -50,7 +50,8 @@
|| defined(NPY_CPU_ARCEL) \
|| defined(NPY_CPU_RISCV64) \
|| defined(NPY_CPU_LOONGARCH) \
- || defined(NPY_CPU_WASM)
+ || defined(NPY_CPU_WASM) \
+ || defined(NPY_CPU_E2K)
#define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
#elif defined(NPY_CPU_PPC) \