kumquat-buildroot/package/python-numpy/0001-no-fenv-on-uclibc.patch
Alexey Brodkin 8fbb91c3ac python-numpy: Bump to the most recent release 1.13.1
Note previously used location for releases on SourceForge is no longer
supported (latest tarball v1.11.2 available there is dated 2016-10-04)
so as other distros
(see, Fedora http://pkgs.fedoraproject.org/cgit/rpms/numpy.git/tree/numpy.spec?id=7013948f8ba073c69a91a545f0a0898cb62652fa#n22)
we get release tarball directly from GitHub.

Also note 0001-no-fenv-on-uclibc.patch was rebased on v1.13.1.

0002-Don-t-blindly-enable-frexpl-and-ldexpl-for-uClibc.patch is no
longer needed. Since https://github.com/numpy/numpy/pull/4852, there
is a wrapper for frexpl and ldexpl like for the other math functions.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Cc: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Arnout: improve explanation of 0002-Don-t-blindly-enable-frexpl-and-ldexpl-for-uClibc.patch]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-09-19 22:06:15 +02:00

50 lines
2.1 KiB
Diff

From 1d309b81a6fdac33dfb5148f618bafe6ebdff958 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Fri, 15 Sep 2017 12:51:36 +0300
Subject: [PATCH] Don't use <fenv.h> on uClibc
The python-numpy code already has provisions to not use <fenv.h> when
not available. However, it uses __GLIBC__ to know whether fenv.h is
available or not, but uClibc defines __GLIBC__, so python-numpy thinks
fenv.h is available.
This patch fixes that by changing all defined(__GLIBC__) occurences by
(defined(__GLIBC__) && !defined(__UCLIBC__)).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
numpy/core/include/numpy/ufuncobject.h | 2 +-
numpy/core/src/npymath/ieee754.c.src | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/numpy/core/include/numpy/ufuncobject.h b/numpy/core/include/numpy/ufuncobject.h
index d0ac1fd7d732..65e49fcd5b7a 100644
--- a/numpy/core/include/numpy/ufuncobject.h
+++ b/numpy/core/include/numpy/ufuncobject.h
@@ -319,7 +319,7 @@ typedef struct _loop1d_info {
#if defined(sun) || defined(__BSD__) || defined(__OpenBSD__) || \
(defined(__FreeBSD__) && (__FreeBSD_version < 502114)) || \
defined(__NetBSD__) || \
- defined(__GLIBC__) || defined(__APPLE__) || \
+ (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \
defined(__CYGWIN__) || defined(__MINGW32__) || \
(defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) || \
defined(_AIX) || \
diff --git a/numpy/core/src/npymath/ieee754.c.src b/numpy/core/src/npymath/ieee754.c.src
index 0370ea6c77aa..e63e409b6604 100644
--- a/numpy/core/src/npymath/ieee754.c.src
+++ b/numpy/core/src/npymath/ieee754.c.src
@@ -612,7 +612,7 @@ void npy_set_floatstatus_invalid(void)
}
-#elif defined(__GLIBC__) || defined(__APPLE__) || \
+#elif (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \
defined(__CYGWIN__) || defined(__MINGW32__) || \
(defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
# include <fenv.h>
--
2.7.5