Skip to content

Commit 1a42998

Browse files
authored
Merge pull request kivy#1351 from tito/fix-hostpython2-segfault
Fix segfault on hostpython2 when compiling for x86_64
2 parents 333a323 + ee427a3 commit 1a42998

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
@@ -9,6 +9,7 @@ class Hostpython2Recipe(Recipe):
99
version = '2.7.2'
1010
url = 'https://python.org/ftp/python/{version}/Python-{version}.tar.bz2'
1111
name = 'hostpython2'
12+
patches = ['fix-segfault-pygchead.patch']
1213

1314
conflicts = ['hostpython3']
1415

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)