diff options
author | Martijn Kaijser <martijn@xbmc.org> | 2017-03-21 19:23:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-21 19:23:24 +0100 |
commit | e6d68f421a62b400499fef2b62bb6020c193c052 (patch) | |
tree | 1ecfd6280be7d1342154cb64acb9d962855f039a | |
parent | badda83520bd447ba42a31e2e8c8f4cdbac9ec33 (diff) | |
parent | ae91f5e357ef59ee15c465ed3a5d7a08400df808 (diff) |
Merge pull request #11885 from koying/python27droidL
FIX: [python] no abort + droid libs
-rw-r--r-- | tools/depends/target/python27/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/target/python27/Python-no-abort.patch | 24 | ||||
-rw-r--r-- | tools/depends/target/python27/python-android-binmodule.patch | 31 |
3 files changed, 57 insertions, 0 deletions
diff --git a/tools/depends/target/python27/Makefile b/tools/depends/target/python27/Makefile index 720811e77b..ae92244d59 100644 --- a/tools/depends/target/python27/Makefile +++ b/tools/depends/target/python27/Makefile @@ -39,6 +39,8 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) cd $(PLATFORM); patch -p0 < ../Python-2.7.10-android.patch cd $(PLATFORM); patch -p0 < ../Python-no-export-path.patch cd $(PLATFORM); patch -p0 < ../fix-ffi.patch + cd $(PLATFORM); patch -l -p0 < ../python-android-binmodule.patch + cd $(PLATFORM); patch -p1 < ../Python-no-abort.patch ifeq ($(OS),ios) cd $(PLATFORM); patch -p0 < ../make-fork-optional.patch cd $(PLATFORM); patch -p0 < ../Python-2.6.5-urllib.diff diff --git a/tools/depends/target/python27/Python-no-abort.patch b/tools/depends/target/python27/Python-no-abort.patch new file mode 100644 index 0000000000..3ee24e0ece --- /dev/null +++ b/tools/depends/target/python27/Python-no-abort.patch @@ -0,0 +1,24 @@ +diff -ur orig/Modules/posixmodule.c arm-linux-androideabi-21/Modules/posixmodule.c +--- orig/Modules/posixmodule.c 2016-07-30 22:35:02.016158026 +0200 ++++ arm-linux-androideabi-21/Modules/posixmodule.c 2016-08-27 13:02:46.755833610 +0200 +@@ -8632,7 +8632,7 @@ + static PyObject * + posix_abort(PyObject *self, PyObject *noargs) + { +- abort(); ++ // abort(); + /*NOTREACHED*/ + Py_FatalError("abort() called from Python code didn't abort!"); + return NULL; +diff -ur orig/Python/pythonrun.c arm-linux-androideabi-21/Python/pythonrun.c +--- orig/Python/pythonrun.c 2009-10-27 13:48:52.000000000 +0100 ++++ arm-linux-androideabi-21/Python/pythonrun.c 2016-08-27 13:03:38.051914732 +0200 +@@ -1697,7 +1697,7 @@ + DebugBreak(); + #endif + #endif /* MS_WINDOWS */ +- abort(); ++ // abort(); + } + + /* Clean up and exit */ diff --git a/tools/depends/target/python27/python-android-binmodule.patch b/tools/depends/target/python27/python-android-binmodule.patch new file mode 100644 index 0000000000..c28ddf6719 --- /dev/null +++ b/tools/depends/target/python27/python-android-binmodule.patch @@ -0,0 +1,31 @@ +--- Python/dynload_shlib.c 2014-08-13 15:13:49.879675283 +0200 ++++ Python/dynload_shlib.c 2014-08-13 19:03:57.456363680 +0200 +@@ -112,10 +112,6 @@ + dlopenflags = PyThreadState_GET()->interp->dlopenflags; + #endif + +- if (Py_VerboseFlag) +- PySys_WriteStderr("dlopen(\"%s\", %x);\n", pathname, +- dlopenflags); +- + #ifdef __VMS + /* VMS currently don't allow a pathname, use a logical name instead */ + /* Concatenate 'python_module_' and shortname */ +@@ -125,8 +121,17 @@ + PyOS_snprintf(pathbuf, sizeof(pathbuf), "python_module_%-.200s", + shortname); + pathname = pathbuf; ++#elif defined(ANDROID) ++ /* Android does not allow a pathname and wants lib*.so */ ++ PyOS_snprintf(pathbuf, sizeof(pathbuf), "lib%-.200s.so", ++ shortname); ++ pathname = pathbuf; + #endif + ++ if (Py_VerboseFlag) ++ PySys_WriteStderr("dlopen(\"%s\", %x);\n", pathname, ++ dlopenflags); ++ + handle = dlopen(pathname, dlopenflags); + + if (handle == NULL) { |