From patchwork Wed Jul 23 18:33:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 373028 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 3F61C1401A8 for ; Thu, 24 Jul 2014 04:33:52 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4EA9887B76; Wed, 23 Jul 2014 18:33:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vxRb6o86rpa5; Wed, 23 Jul 2014 18:33:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2BD068B088; Wed, 23 Jul 2014 18:33:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 5AC3E1BFA34 for ; Wed, 23 Jul 2014 18:33:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5632C8B040 for ; Wed, 23 Jul 2014 18:33:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X7KKisUfQuHy for ; Wed, 23 Jul 2014 18:33:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by fraxinus.osuosl.org (Postfix) with ESMTP id 27D9A8B03E for ; Wed, 23 Jul 2014 18:33:44 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id B4CC4A8E; Wed, 23 Jul 2014 20:33:43 +0200 (CEST) Received: from localhost (AToulouse-651-1-283-15.w109-220.abo.wanadoo.fr [109.220.222.15]) by mail.free-electrons.com (Postfix) with ESMTPSA id D9C7BFB7; Wed, 23 Jul 2014 20:33:25 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Wed, 23 Jul 2014 20:33:21 +0200 Message-Id: <1406140401-16997-5-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1406140401-16997-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1406140401-16997-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH 4/4] python-numpy: add patch to fix build on uClibc X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Fixes: http://autobuild.buildroot.org/results/01d/01da44bc4b644a46326d8fbd87708b7a98971487/ Signed-off-by: Thomas Petazzoni --- .../python-numpy-0001-no-fenv-on-uclibc.patch | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 package/python-numpy/python-numpy-0001-no-fenv-on-uclibc.patch diff --git a/package/python-numpy/python-numpy-0001-no-fenv-on-uclibc.patch b/package/python-numpy/python-numpy-0001-no-fenv-on-uclibc.patch new file mode 100644 index 0000000..633dbcd --- /dev/null +++ b/package/python-numpy/python-numpy-0001-no-fenv-on-uclibc.patch @@ -0,0 +1,79 @@ +Don't use on uClibc + +The python-numpy code already has provisions to not use 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 + +Index: b/numpy/core/include/numpy/ufuncobject.h +=================================================================== +--- a/numpy/core/include/numpy/ufuncobject.h ++++ b/numpy/core/include/numpy/ufuncobject.h +@@ -413,11 +413,11 @@ + (void) fpsetsticky(0); \ + } + +-#elif defined(__GLIBC__) || defined(__APPLE__) || \ ++#elif (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \ + defined(__CYGWIN__) || defined(__MINGW32__) || \ + (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + +-#if defined(__GLIBC__) || defined(__APPLE__) || \ ++#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \ + defined(__MINGW32__) || defined(__FreeBSD__) + #include + #elif defined(__CYGWIN__) +Index: b/numpy/core/src/npymath/ieee754.c.src +=================================================================== +--- a/numpy/core/src/npymath/ieee754.c.src ++++ b/numpy/core/src/npymath/ieee754.c.src +@@ -586,11 +586,11 @@ + } + + +-#elif defined(__GLIBC__) || defined(__APPLE__) || \ ++#elif (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \ + defined(__CYGWIN__) || defined(__MINGW32__) || \ + (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + +-# if defined(__GLIBC__) || defined(__APPLE__) || \ ++# if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \ + defined(__MINGW32__) || defined(__FreeBSD__) + # include + # elif defined(__CYGWIN__) +Index: b/numpy/numarray/_capi.c +=================================================================== +--- a/numpy/numarray/_capi.c ++++ b/numpy/numarray/_capi.c +@@ -10,7 +10,7 @@ + #include + #endif + +-#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) ++#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + #include + #elif defined(__CYGWIN__) + #include "numpy/fenv/fenv.h" +@@ -258,7 +258,7 @@ + } + + /* Likewise for Integer overflows */ +-#if defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) ++#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + static int int_overflow_error(Float64 value) { /* For x86_64 */ + feraiseexcept(FE_OVERFLOW); + return (int) value; +@@ -3007,7 +3007,7 @@ + return retstatus; + } + +-#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) ++#elif (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + + static int + NA_checkFPErrors(void)