aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-06 16:52:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-11 22:13:15 +0100
commit7e9593665848fd32c3afb688a886661aea1384ac (patch)
treef1706161e30972181cb2046598d0af5601546c49
parent59618f872651eaca0b8db435cbc76c22a17c5cc9 (diff)
downloadopenembedded-core-7e9593665848fd32c3afb688a886661aea1384ac.zip
openembedded-core-7e9593665848fd32c3afb688a886661aea1384ac.tar.gz
openembedded-core-7e9593665848fd32c3afb688a886661aea1384ac.tar.bz2
python-numpy: Fix issues with recent glibc versions
Fix issues building on recent glibc versions (for python*-numpy-native). (From OE-Core rev: 08a46b2477c1ea0e76695b51b59dc1bb46b1b521) (From OE-Core rev: d17b2f44f69a160c227cbd808a2cf62c994ed92e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch47
-rw-r--r--meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb1
-rw-r--r--meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb1
3 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch b/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch
new file mode 100644
index 0000000..08cb078
--- /dev/null
+++ b/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch
@@ -0,0 +1,47 @@
+From 154b2c19f392817a936aea0190e276f8228cb489 Mon Sep 17 00:00:00 2001
+From: "Erik M. Bray" <erik.bray@lri.fr>
+Date: Mon, 12 Dec 2016 13:07:16 +0100
+Subject: [PATCH] BUG: xlocale.h is not available in newlib--all the defines
+ used here from xlocale.h are instead found in locale.h
+
+Added a feature check for xlocale.h, with fallback to locale.h if it is
+missing.
+---
+ numpy/core/setup_common.py | 1 +
+ numpy/core/src/multiarray/numpyos.c | 8 +++++++-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+Upstream-Status: Backport
+RP 2017/9/6
+
+diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
+index ba7521e3043..a1729e65656 100644
+--- a/numpy/core/setup_common.py
++++ b/numpy/core/setup_common.py
+@@ -113,6 +113,7 @@ def check_api_version(apiversion, codegen_dir):
+ "xmmintrin.h", # SSE
+ "emmintrin.h", # SSE2
+ "features.h", # for glibc version linux
++ "xlocale.h" # see GH#8367
+ ]
+
+ # optional gcc compiler builtins and their call arguments and optional a
+diff --git a/numpy/core/src/multiarray/numpyos.c b/numpy/core/src/multiarray/numpyos.c
+index 450ec40b6e0..84617ea78c3 100644
+--- a/numpy/core/src/multiarray/numpyos.c
++++ b/numpy/core/src/multiarray/numpyos.c
+@@ -15,7 +15,13 @@
+
+ #ifdef HAVE_STRTOLD_L
+ #include <stdlib.h>
+-#include <xlocale.h>
++#ifdef HAVE_XLOCALE_H
++ /*
++ * the defines from xlocale.h are included in locale.h on some sytems;
++ * see gh-8367
++ */
++ #include <xlocale.h>
++#endif
+ #endif
+
+
diff --git a/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb b/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb
index c4bc354..04c96d7 100644
--- a/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb
+++ b/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb
@@ -9,6 +9,7 @@ SRC_URI = "https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME
file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
file://remove-build-path-in-comments.patch \
file://fix_shebang_f2py.patch \
+ file://d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch \
${CONFIGFILESURI} "
UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/"
diff --git a/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb b/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb
index d5fe50c..8f9665f 100644
--- a/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb
+++ b/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb
@@ -9,6 +9,7 @@ SRC_URI = "https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME
file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
file://remove-build-path-in-comments.patch \
file://fix_shebang_f2py.patch \
+ file://d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch \
${CONFIGFILESURI} "
UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/"