Backport Python 2.7.15 fix for GCC 8 optimizations to other Pythons
it applies to.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
old_pythons=('1.0.1' '1.1' '1.2' '1.3' '1.4' '1.5.2')
|
||||
old_pyurl='https://legacy.python.org/download/releases/src'
|
||||
|
||||
pythons=('2.0.1' '2.1.3' '2.2.3' '2.3.7' '2.4.6' '2.5.6' '2.6.9' '2.7.14'
|
||||
pythons=('2.0.1' '2.1.3' '2.2.3' '2.3.7' '2.4.6' '2.5.6' '2.6.9' '2.7.15'
|
||||
'3.0.1' '3.1.5' '3.2.6' '3.3.7' '3.4.8' '3.5.5' '3.6.5')
|
||||
py_url='https://www.python.org/ftp/python'
|
||||
|
||||
|
@@ -24,7 +24,7 @@ pythons2 = [
|
||||
'Python-2.4.6',
|
||||
'Python-2.5.6',
|
||||
'Python-2.6.9',
|
||||
'Python-2.7.14',
|
||||
'Python-2.7.15',
|
||||
]
|
||||
|
||||
pythons3 = [
|
||||
|
34
scripts/python-builds/Python-2.3.7.patch
Normal file
34
scripts/python-builds/Python-2.3.7.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
diff -rupN a/Include/objimpl.h b/Include/objimpl.h
|
||||
--- a/Include/objimpl.h 2003-04-17 10:29:22.000000000 -0700
|
||||
+++ b/Include/objimpl.h 2019-09-30 15:42:32.012660303 -0700
|
||||
@@ -245,6 +245,20 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_R
|
||||
/* 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_old *gc_next;
|
||||
+ union _gc_head_old *gc_prev;
|
||||
+ int gc_refs;
|
||||
+ } gc;
|
||||
+ long double dummy;
|
||||
+};
|
||||
+
|
||||
/* GC information is stored BEFORE the object structure. */
|
||||
typedef union _gc_head {
|
||||
struct {
|
||||
@@ -252,7 +266,8 @@ typedef union _gc_head {
|
||||
union _gc_head *gc_prev;
|
||||
int gc_refs;
|
||||
} gc;
|
||||
- long double dummy; /* force worst-case alignment */
|
||||
+ double dummy; /* Force at least 8-byte alignment. */
|
||||
+ char dummy_padding[sizeof(union _gc_head_old)];
|
||||
} PyGC_Head;
|
||||
|
||||
extern PyGC_Head *_PyGC_generation0;
|
34
scripts/python-builds/Python-2.4.6.patch
Normal file
34
scripts/python-builds/Python-2.4.6.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
diff -rupN a/Include/objimpl.h b/Include/objimpl.h
|
||||
--- a/Include/objimpl.h 2003-04-17 10:29:22.000000000 -0700
|
||||
+++ b/Include/objimpl.h 2019-09-30 15:42:32.012660303 -0700
|
||||
@@ -245,6 +245,20 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_R
|
||||
/* 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_old *gc_next;
|
||||
+ union _gc_head_old *gc_prev;
|
||||
+ int gc_refs;
|
||||
+ } gc;
|
||||
+ long double dummy;
|
||||
+};
|
||||
+
|
||||
/* GC information is stored BEFORE the object structure. */
|
||||
typedef union _gc_head {
|
||||
struct {
|
||||
@@ -252,7 +266,8 @@ typedef union _gc_head {
|
||||
union _gc_head *gc_prev;
|
||||
int gc_refs;
|
||||
} gc;
|
||||
- long double dummy; /* force worst-case alignment */
|
||||
+ double dummy; /* Force at least 8-byte alignment. */
|
||||
+ char dummy_padding[sizeof(union _gc_head_old)];
|
||||
} PyGC_Head;
|
||||
|
||||
extern PyGC_Head *_PyGC_generation0;
|
@@ -1,7 +1,40 @@
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 25a82af..9700faa 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
diff -rupN a/Include/objimpl.h b/Include/objimpl.h
|
||||
--- a/Include/objimpl.h 2006-04-14 20:22:46.000000000 -0700
|
||||
+++ b/Include/objimpl.h 2019-09-30 15:52:15.197269278 -0700
|
||||
@@ -241,6 +241,20 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_R
|
||||
/* 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_old *gc_next;
|
||||
+ union _gc_head_old *gc_prev;
|
||||
+ Py_ssize_t gc_refs;
|
||||
+ } gc;
|
||||
+ long double dummy;
|
||||
+};
|
||||
+
|
||||
/* GC information is stored BEFORE the object structure. */
|
||||
typedef union _gc_head {
|
||||
struct {
|
||||
@@ -248,7 +262,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 at least 8-byte alignment. */
|
||||
+ char dummy_padding[sizeof(union _gc_head_old)];
|
||||
} PyGC_Head;
|
||||
|
||||
extern PyGC_Head *_PyGC_generation0;
|
||||
diff -rupN a/Makefile.pre.in b/Makefile.pre.in
|
||||
--- a/Makefile.pre.in 2008-09-21 17:22:44.000000000 -0700
|
||||
+++ b/Makefile.pre.in 2019-09-30 15:50:47.804578897 -0700
|
||||
@@ -458,7 +458,7 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
|
||||
$(SIGNAL_OBJS) \
|
||||
$(MODOBJS) \
|
||||
@@ -11,10 +44,9 @@ index 25a82af..9700faa 100644
|
||||
|
||||
Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
|
||||
$(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
|
||||
diff --git a/setup.py b/setup.py
|
||||
index fbae8df..92a7a08 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
diff -rupN a/setup.py b/setup.py
|
||||
--- a/setup.py 2008-10-16 11:58:19.000000000 -0700
|
||||
+++ b/setup.py 2019-09-30 15:50:47.808578930 -0700
|
||||
@@ -296,7 +296,8 @@ class PyBuildExt(build_ext):
|
||||
# if a file is found in one of those directories, it can
|
||||
# be assumed that no additional -I,-L directives are needed.
|
||||
|
@@ -1,7 +1,40 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 4fe1f45..d124268 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
diff -rupN a/Include/objimpl.h b/Include/objimpl.h
|
||||
--- a/Include/objimpl.h 2013-10-29 08:04:37.000000000 -0700
|
||||
+++ b/Include/objimpl.h 2019-09-30 16:18:58.318197021 -0700
|
||||
@@ -241,6 +241,20 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_R
|
||||
/* 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_old *gc_next;
|
||||
+ union _gc_head_old *gc_prev;
|
||||
+ Py_ssize_t gc_refs;
|
||||
+ } gc;
|
||||
+ long double dummy;
|
||||
+};
|
||||
+
|
||||
/* GC information is stored BEFORE the object structure. */
|
||||
typedef union _gc_head {
|
||||
struct {
|
||||
@@ -248,7 +262,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 at least 8-byte alignment. */
|
||||
+ char dummy_padding[sizeof(union _gc_head_old)];
|
||||
} PyGC_Head;
|
||||
|
||||
extern PyGC_Head *_PyGC_generation0;
|
||||
diff -rupN a/setup.py b/setup.py
|
||||
--- a/setup.py 2013-10-29 08:04:39.000000000 -0700
|
||||
+++ b/setup.py 2019-09-30 16:19:09.146284481 -0700
|
||||
@@ -408,7 +408,8 @@ class PyBuildExt(build_ext):
|
||||
# if a file is found in one of those directories, it can
|
||||
# be assumed that no additional -I,-L directives are needed.
|
||||
|
Reference in New Issue
Block a user