diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-03-17 05:18:21 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-20 23:12:27 +0000 |
commit | 0d9f515e1eca0564503fddcaa337fecfd45b368e (patch) | |
tree | dc2ae66ce609abc1ff71bbd84f8ff1000fddd454 | |
parent | e1f3f4cc3c2468cd8972a5fdf7ff7397edfead7a (diff) | |
download | poky-0d9f515e1eca0564503fddcaa337fecfd45b368e.tar.gz |
python-numpy: Fix build on musl
Match API version in cached _numpyconfig.h to the
one mandated by numpy version in use.
(From OE-Core rev: 7a0ba5cbb1ea0a379c1e61fb58d7595e8f8480c4)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 files changed, 51 insertions, 7 deletions
diff --git a/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h index be57ac27bf..191e5a19e2 100644 --- a/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h +++ b/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h | |||
@@ -20,10 +20,11 @@ | |||
20 | #define NPY_HAVE_COMPLEX_DOUBLE 1 | 20 | #define NPY_HAVE_COMPLEX_DOUBLE 1 |
21 | #define NPY_HAVE_COMPLEX_FLOAT 1 | 21 | #define NPY_HAVE_COMPLEX_FLOAT 1 |
22 | #define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 | 22 | #define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 |
23 | #define NPY_ENABLE_SEPARATE_COMPILATION 1 | ||
23 | #define NPY_USE_C99_FORMATS 1 | 24 | #define NPY_USE_C99_FORMATS 1 |
24 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) | 25 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) |
25 | #define NPY_ABI_VERSION 0x01000009 | 26 | #define NPY_ABI_VERSION 0x01000009 |
26 | #define NPY_API_VERSION 0x00000007 | 27 | #define NPY_API_VERSION 0x0000000A |
27 | 28 | ||
28 | #ifndef __STDC_FORMAT_MACROS | 29 | #ifndef __STDC_FORMAT_MACROS |
29 | #define __STDC_FORMAT_MACROS 1 | 30 | #define __STDC_FORMAT_MACROS 1 |
diff --git a/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch b/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch new file mode 100644 index 0000000000..29768f34d2 --- /dev/null +++ b/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Dont punish musl for glibc's trignometeric functions problems | ||
2 | additionally ensure that glibc specific macros are not used | ||
3 | unconditionally | ||
4 | |||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | Upstream-Status: Pending | ||
7 | Index: numpy-1.10.4/numpy/core/src/private/npy_config.h | ||
8 | =================================================================== | ||
9 | --- numpy-1.10.4.orig/numpy/core/src/private/npy_config.h | ||
10 | +++ numpy-1.10.4/numpy/core/src/private/npy_config.h | ||
11 | @@ -75,10 +75,12 @@ | ||
12 | |||
13 | #if defined(HAVE_FEATURES_H) | ||
14 | #include <features.h> | ||
15 | +#ifdef __GLIBC__ | ||
16 | #define TRIG_OK __GLIBC_PREREQ(2, 16) | ||
17 | #else | ||
18 | #define TRIG_OK 0 | ||
19 | #endif | ||
20 | +#endif | ||
21 | |||
22 | #if !TRIG_OK | ||
23 | #undef HAVE_CASIN | ||
24 | Index: numpy-1.10.4/numpy/core/src/npymath/ieee754.c.src | ||
25 | =================================================================== | ||
26 | --- numpy-1.10.4.orig/numpy/core/src/npymath/ieee754.c.src | ||
27 | +++ numpy-1.10.4/numpy/core/src/npymath/ieee754.c.src | ||
28 | @@ -612,7 +612,7 @@ void npy_set_floatstatus_invalid(void) | ||
29 | } | ||
30 | |||
31 | |||
32 | -#elif defined(__GLIBC__) || defined(__APPLE__) || \ | ||
33 | +#elif defined(__linux__) || defined(__APPLE__) || \ | ||
34 | defined(__CYGWIN__) || defined(__MINGW32__) || \ | ||
35 | (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) | ||
36 | # include <fenv.h> | ||
diff --git a/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h index c0c42851ba..05d2b8b949 100644 --- a/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h +++ b/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 | 8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 |
9 | #define NPY_SIZEOF_LONGDOUBLE 8 | 9 | #define NPY_SIZEOF_LONGDOUBLE 8 |
10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16 | 10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16 |
11 | #define NPY_ENABLE_SEPARATE_COMPILATION 1 | ||
11 | #define NPY_SIZEOF_PY_INTPTR_T 4 | 12 | #define NPY_SIZEOF_PY_INTPTR_T 4 |
12 | #define NPY_SIZEOF_PY_LONG_LONG 8 | 13 | #define NPY_SIZEOF_PY_LONG_LONG 8 |
13 | #define NPY_SIZEOF_LONGLONG 8 | 14 | #define NPY_SIZEOF_LONGLONG 8 |
@@ -23,7 +24,7 @@ | |||
23 | #define NPY_USE_C99_FORMATS 1 | 24 | #define NPY_USE_C99_FORMATS 1 |
24 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) | 25 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) |
25 | #define NPY_ABI_VERSION 0x01000009 | 26 | #define NPY_ABI_VERSION 0x01000009 |
26 | #define NPY_API_VERSION 0x00000007 | 27 | #define NPY_API_VERSION 0x0000000A |
27 | 28 | ||
28 | #ifndef __STDC_FORMAT_MACROS | 29 | #ifndef __STDC_FORMAT_MACROS |
29 | #define __STDC_FORMAT_MACROS 1 | 30 | #define __STDC_FORMAT_MACROS 1 |
diff --git a/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h index be57ac27bf..8e2b5d0940 100644 --- a/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h +++ b/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 | 8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 |
9 | #define NPY_SIZEOF_LONGDOUBLE 16 | 9 | #define NPY_SIZEOF_LONGDOUBLE 16 |
10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 | 10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 |
11 | #define NPY_ENABLE_SEPARATE_COMPILATION 1 | ||
11 | #define NPY_SIZEOF_PY_INTPTR_T 8 | 12 | #define NPY_SIZEOF_PY_INTPTR_T 8 |
12 | #define NPY_SIZEOF_PY_LONG_LONG 8 | 13 | #define NPY_SIZEOF_PY_LONG_LONG 8 |
13 | #define NPY_SIZEOF_LONGLONG 8 | 14 | #define NPY_SIZEOF_LONGLONG 8 |
@@ -23,7 +24,7 @@ | |||
23 | #define NPY_USE_C99_FORMATS 1 | 24 | #define NPY_USE_C99_FORMATS 1 |
24 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) | 25 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) |
25 | #define NPY_ABI_VERSION 0x01000009 | 26 | #define NPY_ABI_VERSION 0x01000009 |
26 | #define NPY_API_VERSION 0x00000007 | 27 | #define NPY_API_VERSION 0x0000000A |
27 | 28 | ||
28 | #ifndef __STDC_FORMAT_MACROS | 29 | #ifndef __STDC_FORMAT_MACROS |
29 | #define __STDC_FORMAT_MACROS 1 | 30 | #define __STDC_FORMAT_MACROS 1 |
diff --git a/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h index be57ac27bf..8e2b5d0940 100644 --- a/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h +++ b/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 | 8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 |
9 | #define NPY_SIZEOF_LONGDOUBLE 16 | 9 | #define NPY_SIZEOF_LONGDOUBLE 16 |
10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 | 10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 |
11 | #define NPY_ENABLE_SEPARATE_COMPILATION 1 | ||
11 | #define NPY_SIZEOF_PY_INTPTR_T 8 | 12 | #define NPY_SIZEOF_PY_INTPTR_T 8 |
12 | #define NPY_SIZEOF_PY_LONG_LONG 8 | 13 | #define NPY_SIZEOF_PY_LONG_LONG 8 |
13 | #define NPY_SIZEOF_LONGLONG 8 | 14 | #define NPY_SIZEOF_LONGLONG 8 |
@@ -23,7 +24,7 @@ | |||
23 | #define NPY_USE_C99_FORMATS 1 | 24 | #define NPY_USE_C99_FORMATS 1 |
24 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) | 25 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) |
25 | #define NPY_ABI_VERSION 0x01000009 | 26 | #define NPY_ABI_VERSION 0x01000009 |
26 | #define NPY_API_VERSION 0x00000007 | 27 | #define NPY_API_VERSION 0x0000000A |
27 | 28 | ||
28 | #ifndef __STDC_FORMAT_MACROS | 29 | #ifndef __STDC_FORMAT_MACROS |
29 | #define __STDC_FORMAT_MACROS 1 | 30 | #define __STDC_FORMAT_MACROS 1 |
diff --git a/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h index 73cbfb1baa..0f45d5bd44 100644 --- a/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h +++ b/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 | 8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 |
9 | #define NPY_SIZEOF_LONGDOUBLE 16 | 9 | #define NPY_SIZEOF_LONGDOUBLE 16 |
10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 | 10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 |
11 | #define NPY_ENABLE_SEPARATE_COMPILATION 1 | ||
11 | #define NPY_SIZEOF_PY_INTPTR_T 4 | 12 | #define NPY_SIZEOF_PY_INTPTR_T 4 |
12 | #define NPY_SIZEOF_PY_LONG_LONG 8 | 13 | #define NPY_SIZEOF_PY_LONG_LONG 8 |
13 | #define NPY_SIZEOF_LONGLONG 8 | 14 | #define NPY_SIZEOF_LONGLONG 8 |
@@ -23,7 +24,7 @@ | |||
23 | #define NPY_USE_C99_FORMATS 1 | 24 | #define NPY_USE_C99_FORMATS 1 |
24 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) | 25 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) |
25 | #define NPY_ABI_VERSION 0x01000009 | 26 | #define NPY_ABI_VERSION 0x01000009 |
26 | #define NPY_API_VERSION 0x00000007 | 27 | #define NPY_API_VERSION 0x0000000A |
27 | 28 | ||
28 | #ifndef __STDC_FORMAT_MACROS | 29 | #ifndef __STDC_FORMAT_MACROS |
29 | #define __STDC_FORMAT_MACROS 1 | 30 | #define __STDC_FORMAT_MACROS 1 |
diff --git a/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h index be57ac27bf..8e2b5d0940 100644 --- a/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h +++ b/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 | 8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 |
9 | #define NPY_SIZEOF_LONGDOUBLE 16 | 9 | #define NPY_SIZEOF_LONGDOUBLE 16 |
10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 | 10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 |
11 | #define NPY_ENABLE_SEPARATE_COMPILATION 1 | ||
11 | #define NPY_SIZEOF_PY_INTPTR_T 8 | 12 | #define NPY_SIZEOF_PY_INTPTR_T 8 |
12 | #define NPY_SIZEOF_PY_LONG_LONG 8 | 13 | #define NPY_SIZEOF_PY_LONG_LONG 8 |
13 | #define NPY_SIZEOF_LONGLONG 8 | 14 | #define NPY_SIZEOF_LONGLONG 8 |
@@ -23,7 +24,7 @@ | |||
23 | #define NPY_USE_C99_FORMATS 1 | 24 | #define NPY_USE_C99_FORMATS 1 |
24 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) | 25 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) |
25 | #define NPY_ABI_VERSION 0x01000009 | 26 | #define NPY_ABI_VERSION 0x01000009 |
26 | #define NPY_API_VERSION 0x00000007 | 27 | #define NPY_API_VERSION 0x0000000A |
27 | 28 | ||
28 | #ifndef __STDC_FORMAT_MACROS | 29 | #ifndef __STDC_FORMAT_MACROS |
29 | #define __STDC_FORMAT_MACROS 1 | 30 | #define __STDC_FORMAT_MACROS 1 |
diff --git a/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h index be57ac27bf..8e2b5d0940 100644 --- a/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h +++ b/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 | 8 | #define NPY_SIZEOF_COMPLEX_DOUBLE 16 |
9 | #define NPY_SIZEOF_LONGDOUBLE 16 | 9 | #define NPY_SIZEOF_LONGDOUBLE 16 |
10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 | 10 | #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 |
11 | #define NPY_ENABLE_SEPARATE_COMPILATION 1 | ||
11 | #define NPY_SIZEOF_PY_INTPTR_T 8 | 12 | #define NPY_SIZEOF_PY_INTPTR_T 8 |
12 | #define NPY_SIZEOF_PY_LONG_LONG 8 | 13 | #define NPY_SIZEOF_PY_LONG_LONG 8 |
13 | #define NPY_SIZEOF_LONGLONG 8 | 14 | #define NPY_SIZEOF_LONGLONG 8 |
@@ -23,7 +24,7 @@ | |||
23 | #define NPY_USE_C99_FORMATS 1 | 24 | #define NPY_USE_C99_FORMATS 1 |
24 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) | 25 | #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) |
25 | #define NPY_ABI_VERSION 0x01000009 | 26 | #define NPY_ABI_VERSION 0x01000009 |
26 | #define NPY_API_VERSION 0x00000007 | 27 | #define NPY_API_VERSION 0x0000000A |
27 | 28 | ||
28 | #ifndef __STDC_FORMAT_MACROS | 29 | #ifndef __STDC_FORMAT_MACROS |
29 | #define __STDC_FORMAT_MACROS 1 | 30 | #define __STDC_FORMAT_MACROS 1 |
diff --git a/meta/recipes-devtools/python/python-numpy_1.10.4.bb b/meta/recipes-devtools/python/python-numpy_1.10.4.bb index fa651cb441..8a562dcb99 100644 --- a/meta/recipes-devtools/python/python-numpy_1.10.4.bb +++ b/meta/recipes-devtools/python/python-numpy_1.10.4.bb | |||
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9f4e88b5748e8313caaf33d081ce65a3" | |||
6 | SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \ | 6 | SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \ |
7 | file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ | 7 | file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ |
8 | file://remove-build-path-in-comments.patch \ | 8 | file://remove-build-path-in-comments.patch \ |
9 | file://add-glibc-check.patch \ | ||
9 | ${CONFIGFILESURI} " | 10 | ${CONFIGFILESURI} " |
10 | 11 | ||
11 | CONFIGFILESURI ?= "" | 12 | CONFIGFILESURI ?= "" |