python: float=hard -> float=softfp for arm

This commit is contained in:
Fredrik Fornwall 2016-05-18 18:49:44 -04:00
parent 9fa59b1c25
commit 6945bd1ee2
2 changed files with 1 additions and 48 deletions

View File

@ -9,7 +9,7 @@ TERMUX_PKG_HOSTBUILD=true
_MAJOR_VERSION=3.5
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.1
TERMUX_PKG_BUILD_REVISION=4
TERMUX_PKG_BUILD_REVISION=5
TERMUX_PKG_SRCURL=http://www.python.org/ftp/python/${TERMUX_PKG_VERSION}/Python-${TERMUX_PKG_VERSION}.tar.xz
# The flag --with(out)-pymalloc (disable/enable specialized mallocs) is enabled by default and causes m suffix versions of python.

View File

@ -1,47 +0,0 @@
The math module uses function pointers to math functions, which breaks
using the system libm on ARM since we compile with -mhard-float.
diff -u -r ../Python-3.4.3/Modules/mathmodule.c ./Modules/mathmodule.c
--- ../Python-3.4.3/Modules/mathmodule.c 2015-02-25 06:27:46.000000000 -0500
+++ ./Modules/mathmodule.c 2015-04-29 16:50:52.895371496 -0400
@@ -727,7 +727,7 @@
*/
static PyObject *
-math_1_to_whatever(PyObject *arg, double (*func) (double),
+math_1_to_whatever(PyObject *arg, __NDK_FPABI_MATH__ double (*func) (double),
PyObject *(*from_double_func) (double),
int can_overflow)
{
@@ -765,7 +765,7 @@
errno = ERANGE for overflow). */
static PyObject *
-math_1a(PyObject *arg, double (*func) (double))
+math_1a(PyObject *arg, __NDK_FPABI_MATH__ double (*func) (double))
{
double x, r;
x = PyFloat_AsDouble(arg);
@@ -808,19 +808,19 @@
*/
static PyObject *
-math_1(PyObject *arg, double (*func) (double), int can_overflow)
+math_1(PyObject *arg, __NDK_FPABI_MATH__ double (*func) (double), int can_overflow)
{
return math_1_to_whatever(arg, func, PyFloat_FromDouble, can_overflow);
}
static PyObject *
-math_1_to_int(PyObject *arg, double (*func) (double), int can_overflow)
+math_1_to_int(PyObject *arg, __NDK_FPABI_MATH__ double (*func) (double), int can_overflow)
{
return math_1_to_whatever(arg, func, PyLong_FromDouble, can_overflow);
}
static PyObject *
-math_2(PyObject *args, double (*func) (double, double), char *funcname)
+math_2(PyObject *args, __NDK_FPABI_MATH__ double (*func) (double, double), char *funcname)
{
PyObject *ox, *oy;
double x, y, r;