Skip to content

Commit ee427a3

Browse files
committed
fix segfault on hostpython when compiling for x86_64. CF python/cpython@e348c8d#diff-fb41bdaf12f733cf6ab8a82677d03adc . Closes kivy#1297
1 parent 2b3d52b commit ee427a3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

pythonforandroid/recipes/hostpython2/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Hostpython2Recipe(Recipe):
1010
version = '2.7.2'
1111
url = 'https://python.org/ftp/python/{version}/Python-{version}.tar.bz2'
1212
name = 'hostpython2'
13+
patches = ['fix-segfault-pygchead.patch']
1314

1415
conflicts = ['hostpython3']
1516

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff -Naur Python-2.7.2.orig/Include/objimpl.h Python-2.7.2/Include/objimpl.h
2+
--- Python-2.7.2.orig/Include/objimpl.h 2011-06-11 17:46:23.000000000 +0200
3+
+++ Python-2.7.2/Include/objimpl.h 2018-09-04 17:33:09.254654565 +0200
4+
@@ -255,7 +255,7 @@
5+
union _gc_head *gc_prev;
6+
Py_ssize_t gc_refs;
7+
} gc;
8+
- long double dummy; /* force worst-case alignment */
9+
+ double dummy; /* force worst-case alignment */
10+
} PyGC_Head;
11+
12+
extern PyGC_Head *_PyGC_generation0;

0 commit comments

Comments
 (0)