dev-lang/python: add upstream fix for testing w/gcc-5 #547626
authorMike Frysinger <vapier@gentoo.org>
Fri, 2 Oct 2015 13:56:16 +0000 (09:56 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 2 Oct 2015 13:56:33 +0000 (09:56 -0400)
dev-lang/python/files/python-3.4-gcc-5.patch [new file with mode: 0644]
dev-lang/python/python-3.3.5-r2.ebuild
dev-lang/python/python-3.4.3-r2.ebuild

diff --git a/dev-lang/python/files/python-3.4-gcc-5.patch b/dev-lang/python/files/python-3.4-gcc-5.patch
new file mode 100644 (file)
index 0000000..80afbd1
--- /dev/null
@@ -0,0 +1,37 @@
+changeset:   94583:689092296ad3
+branch:      3.4
+parent:      94579:645f3d750be1
+user:        Victor Stinner <victor.stinner@gmail.com>
+date:        Wed Feb 11 14:23:35 2015 +0100
+summary:     Issue #23433: Fix faulthandler._stack_overflow()
+
+diff -r 645f3d750be1 -r 689092296ad3 Modules/faulthandler.c
+--- a/Modules/faulthandler.c   Tue Feb 10 14:49:32 2015 +0100
++++ b/Modules/faulthandler.c   Wed Feb 11 14:23:35 2015 +0100
+@@ -911,12 +911,12 @@
+ }
+ #if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION)
+-static void*
+-stack_overflow(void *min_sp, void *max_sp, size_t *depth)
++static Py_uintptr_t
++stack_overflow(Py_uintptr_t min_sp, Py_uintptr_t max_sp, size_t *depth)
+ {
+     /* allocate 4096 bytes on the stack at each call */
+     unsigned char buffer[4096];
+-    void *sp = &buffer;
++    Py_uintptr_t sp = (Py_uintptr_t)&buffer;
+     *depth += 1;
+     if (sp < min_sp || max_sp < sp)
+         return sp;
+@@ -929,7 +929,8 @@
+ faulthandler_stack_overflow(PyObject *self)
+ {
+     size_t depth, size;
+-    char *sp = (char *)&depth, *stop;
++    Py_uintptr_t sp = (Py_uintptr_t)&depth;
++    Py_uintptr_t stop;
+     depth = 0;
+     stop = stack_overflow(sp - STACK_OVERFLOW_MAX_SIZE,
+
index 59fc5b7947d0c420722ce11ffbdc7fee125141a2..f14b1216b49d427da3f7561f66fd4f9ca6a9f998 100644 (file)
@@ -75,6 +75,7 @@ src_prepare() {
 
        EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
        epatch "${FILESDIR}/${PN}-3.3.5-ncurses-pkg-config.patch"
+       epatch "${FILESDIR}/${PN}-3.4-gcc-5.patch" #547626
 
        sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
                Lib/distutils/command/install.py \
index 888e7a716e9d58eb53d28e53b33757a62f52c8d6..80d86b644b84344c278dbbb435d1512117a46b85 100644 (file)
@@ -70,6 +70,7 @@ src_prepare() {
 
        EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
        epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
+       epatch "${FILESDIR}/${PN}-3.4-gcc-5.patch" #547626
 
        sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
                Lib/distutils/command/install.py \