pyodide/packages/numpy/patches/add-emscripten-cpu.patch

28 lines
1.1 KiB
Diff
Raw Normal View History

2018-03-20 22:58:59 +00:00
diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
2018-09-10 16:55:37 +00:00
index 5edd8f42e..31560eac3 100644
2018-03-20 22:58:59 +00:00
--- a/numpy/core/include/numpy/npy_cpu.h
+++ b/numpy/core/include/numpy/npy_cpu.h
2018-09-10 16:55:37 +00:00
@@ -102,6 +102,8 @@
2018-03-20 22:58:59 +00:00
#define NPY_CPU_ARCEB
2018-09-10 16:55:37 +00:00
#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
#define NPY_CPU_RISCV64
2018-03-20 22:58:59 +00:00
+#elif defined(__EMSCRIPTEN__)
+ #define NPY_CPU_EMSCRIPTEN
#else
#error Unknown CPU, please report this to numpy maintainers with \
information about your platform (OS, CPU and compiler)
diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
2018-09-10 16:55:37 +00:00
index 649bdb0a6..ec2f6eda5 100644
2018-03-20 22:58:59 +00:00
--- a/numpy/core/include/numpy/npy_endian.h
+++ b/numpy/core/include/numpy/npy_endian.h
2018-09-10 16:55:37 +00:00
@@ -47,7 +47,8 @@
2018-03-20 22:58:59 +00:00
|| defined(NPY_CPU_MIPSEL) \
|| defined(NPY_CPU_PPC64LE) \
2018-09-10 16:55:37 +00:00
|| defined(NPY_CPU_ARCEL) \
- || defined(NPY_CPU_RISCV64)
+ || defined(NPY_CPU_RISCV64) \
2018-03-20 22:58:59 +00:00
+ || defined(NPY_CPU_EMSCRIPTEN)
#define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
#elif defined(NPY_CPU_PPC) \
|| defined(NPY_CPU_SPARC) \