summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch40
-rw-r--r--meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch29
-rw-r--r--meta/recipes-devtools/python/python3-numpy_1.22.0.bb (renamed from meta/recipes-devtools/python/python3-numpy_1.21.5.bb)5
3 files changed, 49 insertions, 25 deletions
diff --git a/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch b/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
index b60ca1d216..676bdbb3af 100644
--- a/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
+++ b/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
@@ -1,4 +1,4 @@
-From dbcf296f84e5cef6a3ff0f1c469a4508f1e0fb15 Mon Sep 17 00:00:00 2001
+From eb6d6579150bf4684603ce377c51e90ad3bb8109 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 15 Nov 2020 15:32:39 -0800
Subject: [PATCH] numpy/core: Define RISCV-32 support
@@ -8,39 +8,33 @@ Helps compile on riscv32
Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- numpy/core/include/numpy/npy_cpu.h | 9 +++++++--
+ numpy/core/include/numpy/npy_cpu.h | 3 +++
numpy/core/include/numpy/npy_endian.h | 1 +
- 2 files changed, 8 insertions(+), 2 deletions(-)
+ 2 files changed, 4 insertions(+)
diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
-index 4dbf9d84e..bc41a7eda 100644
+index 78d229e..04be511 100644
--- a/numpy/core/include/numpy/npy_cpu.h
+++ b/numpy/core/include/numpy/npy_cpu.h
-@@ -18,6 +18,7 @@
- * NPY_CPU_ARCEL
+@@ -19,6 +19,7 @@
* NPY_CPU_ARCEB
* NPY_CPU_RISCV64
+ * NPY_CPU_LOONGARCH
+ * NPY_CPU_RISCV32
* NPY_CPU_WASM
*/
- #ifndef _NPY_CPUARCH_H_
-@@ -100,8 +101,12 @@
- #define NPY_CPU_ARCEL
- #elif defined(__arc__) && defined(__BIG_ENDIAN__)
+ #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_
+@@ -104,6 +105,8 @@
#define NPY_CPU_ARCEB
--#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
-- #define NPY_CPU_RISCV64
-+#elif defined(__riscv)
-+ #if __riscv_xlen == 64
-+ #define NPY_CPU_RISCV64
-+ #elif __riscv_xlen == 32
-+ #define NPY_CPU_RISCV32
-+ #endif
+ #elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+ #define NPY_CPU_RISCV64
++#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 32
++ #define NPY_CPU_RISCV32
+ #elif defined(__loongarch__)
+ #define NPY_CPU_LOONGARCH
#elif defined(__EMSCRIPTEN__)
- /* __EMSCRIPTEN__ is defined by emscripten: an LLVM-to-Web compiler */
- #define NPY_CPU_WASM
diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
-index aa367a002..d59484573 100644
+index 5e58a7f..0926212 100644
--- a/numpy/core/include/numpy/npy_endian.h
+++ b/numpy/core/include/numpy/npy_endian.h
@@ -49,6 +49,7 @@
@@ -48,9 +42,9 @@ index aa367a002..d59484573 100644
|| defined(NPY_CPU_ARCEL) \
|| defined(NPY_CPU_RISCV64) \
+ || defined(NPY_CPU_RISCV32) \
+ || defined(NPY_CPU_LOONGARCH) \
|| defined(NPY_CPU_WASM)
#define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
- #elif defined(NPY_CPU_PPC) \
--
-2.29.2
+2.20.1
diff --git a/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch b/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch
new file mode 100644
index 0000000000..66e322116a
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch
@@ -0,0 +1,29 @@
+From 0f0601e79f9ce7614d157284523e6cd8af2259d5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Wed, 5 Jan 2022 12:12:47 +0100
+Subject: [PATCH] numpy/core/setup.py: disable svml for now
+
+The check really doesn't work in cross compiling,
+as it is using host python to see what arch we're
+building on. Issue reported upstream:
+https://github.com/numpy/numpy/issues/20736
+
+Upstream-Status: Inappropriate [needs upstream fix]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ numpy/core/setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/numpy/core/setup.py b/numpy/core/setup.py
+index a5f423d..945f2dd 100644
+--- a/numpy/core/setup.py
++++ b/numpy/core/setup.py
+@@ -70,7 +70,7 @@ def can_link_svml():
+ """
+ machine = platform.machine()
+ system = platform.system()
+- return "x86_64" in machine and system == "Linux"
++ return False
+
+ def check_svml_submodule(svmlpath):
+ if not os.path.exists(svmlpath + "/README.md"):
diff --git a/meta/recipes-devtools/python/python3-numpy_1.21.5.bb b/meta/recipes-devtools/python/python3-numpy_1.22.0.bb
index bdf99b492b..556e2dd5c9 100644
--- a/meta/recipes-devtools/python/python3-numpy_1.21.5.bb
+++ b/meta/recipes-devtools/python/python3-numpy_1.22.0.bb
@@ -11,8 +11,9 @@ SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${S
file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
file://0001-numpy-core-Define-RISCV-32-support.patch \
file://run-ptest \
-"
-SRC_URI[sha256sum] = "1a7ee0ffb35dc7489aebe5185a483f4c43b0d2cf784c3c9940f975a7dde56506"
+ file://0001-numpy-core-setup.py-disable-svml-for-now.patch \
+ "
+SRC_URI[sha256sum] = "f2be14ba396780a6f662b8ba1a24466c9cf18a6a386174f614668e58387a13d7"
UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"