From 7fc40ecb9bd03ec4243c124a30b2952d69a5455adbe76508a97099dfa3edda92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 6 Apr 2018 10:15:40 +0000 Subject: [PATCH] Accepting request 593954 from home:marxin:branches:devel:languages:python:Factory - Add gcc8-miscompilation-fix.patch (boo#1084650). OBS-URL: https://build.opensuse.org/request/show/593954 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=227 --- gcc8-miscompilation-fix.patch | 33 +++++++++++++++++++++++++++++++++ python-base.changes | 5 +++++ python-base.spec | 2 ++ 3 files changed, 40 insertions(+) create mode 100644 gcc8-miscompilation-fix.patch diff --git a/gcc8-miscompilation-fix.patch b/gcc8-miscompilation-fix.patch new file mode 100644 index 0000000..3c5da6c --- /dev/null +++ b/gcc8-miscompilation-fix.patch @@ -0,0 +1,33 @@ +diff --git a/Include/objimpl.h b/Include/objimpl.h +index 55e83eced6..aa906144dc 100644 +--- a/Include/objimpl.h ++++ b/Include/objimpl.h +@@ -248,6 +248,18 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); + /* for source compatibility with 2.2 */ + #define _PyObject_GC_Del PyObject_GC_Del + ++/* Former over-aligned definition of PyGC_Head, used to compute the ++ size of the padding for the new version below. */ ++union _gc_head; ++union _gc_head_old { ++ struct { ++ union _gc_head *gc_next; ++ union _gc_head *gc_prev; ++ Py_ssize_t gc_refs; ++ } gc; ++ long double dummy; ++}; ++ + /* GC information is stored BEFORE the object structure. */ + typedef union _gc_head { + struct { +@@ -255,7 +267,8 @@ typedef union _gc_head { + union _gc_head *gc_prev; + Py_ssize_t gc_refs; + } gc; +- long double dummy; /* force worst-case alignment */ ++ double dummy; /* force worst-case alignment */ ++ char dummy_padding[sizeof(union _gc_head_old)]; + } PyGC_Head; + + extern PyGC_Head *_PyGC_generation0; diff --git a/python-base.changes b/python-base.changes index 73a4f9b..cbc3c08 100644 --- a/python-base.changes +++ b/python-base.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 6 10:11:22 UTC 2018 - mliska@suse.cz + +- Add gcc8-miscompilation-fix.patch (boo#1084650). + ------------------------------------------------------------------- Tue Feb 20 13:14:27 UTC 2018 - bwiedemann@suse.com diff --git a/python-base.spec b/python-base.spec index 69106f1..3c823a4 100644 --- a/python-base.spec +++ b/python-base.spec @@ -62,6 +62,7 @@ Patch39: python-fix-shebang.patch Patch40: python-skip_random_failing_tests.patch # PATCH-FIX-UPSTREAM sorted tar https://github.com/python/cpython/pull/2263 Patch41: python-sorted_tar.patch +Patch42: gcc8-miscompilation-fix.patch # COMMON-PATCH-END %define python_version %(echo %{tarversion} | head -c 3) BuildRequires: automake @@ -170,6 +171,7 @@ other applications. %patch40 -p1 %endif %patch41 -p1 +%patch42 -p1 # drop Autoconf version requirement sed -i 's/^version_required/dnl version_required/' configure.ac