summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-05-15 23:32:10 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-22 13:13:33 +0100
commitdfe68bd9642d65c7157dbfea62795ba3a848d530 (patch)
tree442470839913ee145090f4b17d6bd4dc7a46f79d /meta
parente51c0c398c4bbaec18c7e041be210e57847f362d (diff)
downloadpoky-dfe68bd9642d65c7157dbfea62795ba3a848d530.tar.gz
python2: Fix build with gcc8
(From OE-Core rev: 910f68c9c8dc26e12d28ef29e956af63d100f121) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.14.bb1
-rw-r--r--meta/recipes-devtools/python/python/fix-gc-alignment.patch43
-rw-r--r--meta/recipes-devtools/python/python_2.7.14.bb1
3 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-native_2.7.14.bb b/meta/recipes-devtools/python/python-native_2.7.14.bb
index 7c491fa3e0..b822583c53 100644
--- a/meta/recipes-devtools/python/python-native_2.7.14.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.14.bb
@@ -16,6 +16,7 @@ SRC_URI += "\
16 file://builddir.patch \ 16 file://builddir.patch \
17 file://parallel-makeinst-create-bindir.patch \ 17 file://parallel-makeinst-create-bindir.patch \
18 file://revert_use_of_sysconfigdata.patch \ 18 file://revert_use_of_sysconfigdata.patch \
19 file://fix-gc-alignment.patch \
19 " 20 "
20 21
21S = "${WORKDIR}/Python-${PV}" 22S = "${WORKDIR}/Python-${PV}"
diff --git a/meta/recipes-devtools/python/python/fix-gc-alignment.patch b/meta/recipes-devtools/python/python/fix-gc-alignment.patch
new file mode 100644
index 0000000000..b63cd08747
--- /dev/null
+++ b/meta/recipes-devtools/python/python/fix-gc-alignment.patch
@@ -0,0 +1,43 @@
1Upstream-Status: Submitted
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4Fix for over-aligned GC info
5Patch by Florian Weimer
6
7See: https://bugzilla.redhat.com/show_bug.cgi?id=1540316
8Upstream discussion: https://mail.python.org/pipermail/python-dev/2018-January/152000.html
9
10diff --git a/Include/objimpl.h b/Include/objimpl.h
11index 55e83eced6..aa906144dc 100644
12--- a/Include/objimpl.h
13+++ b/Include/objimpl.h
14@@ -248,6 +248,18 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t);
15 /* for source compatibility with 2.2 */
16 #define _PyObject_GC_Del PyObject_GC_Del
17
18+/* Former over-aligned definition of PyGC_Head, used to compute the
19+ size of the padding for the new version below. */
20+union _gc_head;
21+union _gc_head_old {
22+ struct {
23+ union _gc_head *gc_next;
24+ union _gc_head *gc_prev;
25+ Py_ssize_t gc_refs;
26+ } gc;
27+ long double dummy;
28+};
29+
30 /* GC information is stored BEFORE the object structure. */
31 typedef union _gc_head {
32 struct {
33@@ -255,7 +267,8 @@ typedef union _gc_head {
34 union _gc_head *gc_prev;
35 Py_ssize_t gc_refs;
36 } gc;
37- long double dummy; /* force worst-case alignment */
38+ double dummy; /* force worst-case alignment */
39+ char dummy_padding[sizeof(union _gc_head_old)];
40 } PyGC_Head;
41
42 extern PyGC_Head *_PyGC_generation0;
43 \ No newline at end of file
diff --git a/meta/recipes-devtools/python/python_2.7.14.bb b/meta/recipes-devtools/python/python_2.7.14.bb
index 0a09926dfb..41a8609b15 100644
--- a/meta/recipes-devtools/python/python_2.7.14.bb
+++ b/meta/recipes-devtools/python/python_2.7.14.bb
@@ -30,6 +30,7 @@ SRC_URI += "\
30 file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ 30 file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
31 file://pass-missing-libraries-to-Extension-for-mul.patch \ 31 file://pass-missing-libraries-to-Extension-for-mul.patch \
32 file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ 32 file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
33 file://fix-gc-alignment.patch \
33" 34"
34 35
35S = "${WORKDIR}/Python-${PV}" 36S = "${WORKDIR}/Python-${PV}"