1 |
commit: bd3586765e47208668f27f707ec7f6d06b5d92a8 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 2 13:56:16 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 2 13:56:33 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd358676 |
7 |
|
8 |
dev-lang/python: add upstream fix for testing w/gcc-5 #547626 |
9 |
|
10 |
dev-lang/python/files/python-3.4-gcc-5.patch | 37 ++++++++++++++++++++++++++++ |
11 |
dev-lang/python/python-3.3.5-r2.ebuild | 1 + |
12 |
dev-lang/python/python-3.4.3-r2.ebuild | 1 + |
13 |
3 files changed, 39 insertions(+) |
14 |
|
15 |
diff --git a/dev-lang/python/files/python-3.4-gcc-5.patch b/dev-lang/python/files/python-3.4-gcc-5.patch |
16 |
new file mode 100644 |
17 |
index 0000000..80afbd1 |
18 |
--- /dev/null |
19 |
+++ b/dev-lang/python/files/python-3.4-gcc-5.patch |
20 |
@@ -0,0 +1,37 @@ |
21 |
+changeset: 94583:689092296ad3 |
22 |
+branch: 3.4 |
23 |
+parent: 94579:645f3d750be1 |
24 |
+user: Victor Stinner <victor.stinner@×××××.com> |
25 |
+date: Wed Feb 11 14:23:35 2015 +0100 |
26 |
+summary: Issue #23433: Fix faulthandler._stack_overflow() |
27 |
+ |
28 |
+diff -r 645f3d750be1 -r 689092296ad3 Modules/faulthandler.c |
29 |
+--- a/Modules/faulthandler.c Tue Feb 10 14:49:32 2015 +0100 |
30 |
++++ b/Modules/faulthandler.c Wed Feb 11 14:23:35 2015 +0100 |
31 |
+@@ -911,12 +911,12 @@ |
32 |
+ } |
33 |
+ |
34 |
+ #if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION) |
35 |
+-static void* |
36 |
+-stack_overflow(void *min_sp, void *max_sp, size_t *depth) |
37 |
++static Py_uintptr_t |
38 |
++stack_overflow(Py_uintptr_t min_sp, Py_uintptr_t max_sp, size_t *depth) |
39 |
+ { |
40 |
+ /* allocate 4096 bytes on the stack at each call */ |
41 |
+ unsigned char buffer[4096]; |
42 |
+- void *sp = &buffer; |
43 |
++ Py_uintptr_t sp = (Py_uintptr_t)&buffer; |
44 |
+ *depth += 1; |
45 |
+ if (sp < min_sp || max_sp < sp) |
46 |
+ return sp; |
47 |
+@@ -929,7 +929,8 @@ |
48 |
+ faulthandler_stack_overflow(PyObject *self) |
49 |
+ { |
50 |
+ size_t depth, size; |
51 |
+- char *sp = (char *)&depth, *stop; |
52 |
++ Py_uintptr_t sp = (Py_uintptr_t)&depth; |
53 |
++ Py_uintptr_t stop; |
54 |
+ |
55 |
+ depth = 0; |
56 |
+ stop = stack_overflow(sp - STACK_OVERFLOW_MAX_SIZE, |
57 |
+ |
58 |
|
59 |
diff --git a/dev-lang/python/python-3.3.5-r2.ebuild b/dev-lang/python/python-3.3.5-r2.ebuild |
60 |
index 59fc5b7..f14b121 100644 |
61 |
--- a/dev-lang/python/python-3.3.5-r2.ebuild |
62 |
+++ b/dev-lang/python/python-3.3.5-r2.ebuild |
63 |
@@ -75,6 +75,7 @@ src_prepare() { |
64 |
|
65 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
66 |
epatch "${FILESDIR}/${PN}-3.3.5-ncurses-pkg-config.patch" |
67 |
+ epatch "${FILESDIR}/${PN}-3.4-gcc-5.patch" #547626 |
68 |
|
69 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
70 |
Lib/distutils/command/install.py \ |
71 |
|
72 |
diff --git a/dev-lang/python/python-3.4.3-r2.ebuild b/dev-lang/python/python-3.4.3-r2.ebuild |
73 |
index 888e7a7..80d86b6 100644 |
74 |
--- a/dev-lang/python/python-3.4.3-r2.ebuild |
75 |
+++ b/dev-lang/python/python-3.4.3-r2.ebuild |
76 |
@@ -70,6 +70,7 @@ src_prepare() { |
77 |
|
78 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
79 |
epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch" |
80 |
+ epatch "${FILESDIR}/${PN}-3.4-gcc-5.patch" #547626 |
81 |
|
82 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
83 |
Lib/distutils/command/install.py \ |