summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-03-17 05:18:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-20 22:57:56 +0000
commit7a0ba5cbb1ea0a379c1e61fb58d7595e8f8480c4 (patch)
tree8df3afeed2a73f9837267dfa4fe88627aaf42a24
parentcd3408e7b845891b63de04249982330e02f13ee8 (diff)
downloadopenembedded-core-7a0ba5cbb1ea0a379c1e61fb58d7595e8f8480c4.tar.gz
openembedded-core-7a0ba5cbb1ea0a379c1e61fb58d7595e8f8480c4.tar.bz2
openembedded-core-7a0ba5cbb1ea0a379c1e61fb58d7595e8f8480c4.zip
python-numpy: Fix build on musl
Match API version in cached _numpyconfig.h to the one mandated by numpy version in use. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h3
-rw-r--r--meta/recipes-devtools/python/python-numpy/add-glibc-check.patch36
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h3
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h3
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h3
-rw-r--r--meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h3
-rw-r--r--meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h3
-rw-r--r--meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h3
-rw-r--r--meta/recipes-devtools/python/python-numpy_1.10.4.bb1
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 @@
#define NPY_HAVE_COMPLEX_DOUBLE 1
#define NPY_HAVE_COMPLEX_FLOAT 1
#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
#define NPY_USE_C99_FORMATS 1
#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
#ifndef __STDC_FORMAT_MACROS
#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 @@
+Dont punish musl for glibc's trignometeric functions problems
+additionally ensure that glibc specific macros are not used
+unconditionally
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: numpy-1.10.4/numpy/core/src/private/npy_config.h
+===================================================================
+--- numpy-1.10.4.orig/numpy/core/src/private/npy_config.h
++++ numpy-1.10.4/numpy/core/src/private/npy_config.h
+@@ -75,10 +75,12 @@
+
+ #if defined(HAVE_FEATURES_H)
+ #include <features.h>
++#ifdef __GLIBC__
+ #define TRIG_OK __GLIBC_PREREQ(2, 16)
+ #else
+ #define TRIG_OK 0
+ #endif
++#endif
+
+ #if !TRIG_OK
+ #undef HAVE_CASIN
+Index: numpy-1.10.4/numpy/core/src/npymath/ieee754.c.src
+===================================================================
+--- numpy-1.10.4.orig/numpy/core/src/npymath/ieee754.c.src
++++ numpy-1.10.4/numpy/core/src/npymath/ieee754.c.src
+@@ -612,7 +612,7 @@ void npy_set_floatstatus_invalid(void)
+ }
+
+
+-#elif defined(__GLIBC__) || defined(__APPLE__) || \
++#elif defined(__linux__) || defined(__APPLE__) || \
+ defined(__CYGWIN__) || defined(__MINGW32__) || \
+ (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
+ # 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 @@
#define NPY_SIZEOF_COMPLEX_DOUBLE 16
#define NPY_SIZEOF_LONGDOUBLE 8
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
#define NPY_SIZEOF_PY_INTPTR_T 4
#define NPY_SIZEOF_PY_LONG_LONG 8
#define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
#define NPY_USE_C99_FORMATS 1
#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
#ifndef __STDC_FORMAT_MACROS
#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 @@
#define NPY_SIZEOF_COMPLEX_DOUBLE 16
#define NPY_SIZEOF_LONGDOUBLE 16
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
#define NPY_SIZEOF_PY_INTPTR_T 8
#define NPY_SIZEOF_PY_LONG_LONG 8
#define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
#define NPY_USE_C99_FORMATS 1
#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
#ifndef __STDC_FORMAT_MACROS
#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 @@
#define NPY_SIZEOF_COMPLEX_DOUBLE 16
#define NPY_SIZEOF_LONGDOUBLE 16
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
#define NPY_SIZEOF_PY_INTPTR_T 8
#define NPY_SIZEOF_PY_LONG_LONG 8
#define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
#define NPY_USE_C99_FORMATS 1
#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
#ifndef __STDC_FORMAT_MACROS
#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 @@
#define NPY_SIZEOF_COMPLEX_DOUBLE 16
#define NPY_SIZEOF_LONGDOUBLE 16
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
#define NPY_SIZEOF_PY_INTPTR_T 4
#define NPY_SIZEOF_PY_LONG_LONG 8
#define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
#define NPY_USE_C99_FORMATS 1
#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
#ifndef __STDC_FORMAT_MACROS
#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 @@
#define NPY_SIZEOF_COMPLEX_DOUBLE 16
#define NPY_SIZEOF_LONGDOUBLE 16
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
#define NPY_SIZEOF_PY_INTPTR_T 8
#define NPY_SIZEOF_PY_LONG_LONG 8
#define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
#define NPY_USE_C99_FORMATS 1
#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
#ifndef __STDC_FORMAT_MACROS
#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 @@
#define NPY_SIZEOF_COMPLEX_DOUBLE 16
#define NPY_SIZEOF_LONGDOUBLE 16
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
#define NPY_SIZEOF_PY_INTPTR_T 8
#define NPY_SIZEOF_PY_LONG_LONG 8
#define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
#define NPY_USE_C99_FORMATS 1
#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
#ifndef __STDC_FORMAT_MACROS
#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"
SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \
file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
file://remove-build-path-in-comments.patch \
+ file://add-glibc-check.patch \
${CONFIGFILESURI} "
CONFIGFILESURI ?= ""