summarylogtreecommitdiffstats
path: root/0001-Build-on-Python-3.8.patch
diff options
context:
space:
mode:
authorNicolas Iooss2020-04-26 14:21:34 +0200
committerNicolas Iooss2020-04-26 14:21:34 +0200
commit8f59e894b720701fd0d2c29cc6586b1fb8094e48 (patch)
treea2168d3066ce7c0432677f2f1560e68cd79fe8bb /0001-Build-on-Python-3.8.patch
parent2ca227176c4ff0884982b728ff2fd89b7cd31670 (diff)
downloadaur-gcc-python-plugin.tar.gz
gcc-python-plugin 0.17-1 update
This does not build with Python 3.8, and upstream does not seem very active :( gzip gcc-with-python.1 PYTHONPATH=./ CC_FOR_CPYCHECKER=cc LD_LIBRARY_PATH=gcc-c-api: CC=cc ./gcc-with-python generate-tables-of-passes-rst.py test.c > docs/tables-of-passes.rst TypeError: 'gcc.WrapperMeta' object is not iterable make: *** [Makefile:344: docs/tables-of-passes.rst] Error 1
Diffstat (limited to '0001-Build-on-Python-3.8.patch')
-rw-r--r--0001-Build-on-Python-3.8.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/0001-Build-on-Python-3.8.patch b/0001-Build-on-Python-3.8.patch
new file mode 100644
index 000000000000..564c9b7c308a
--- /dev/null
+++ b/0001-Build-on-Python-3.8.patch
@@ -0,0 +1,29 @@
+From 3a4b484eaeda215a086cca967421ca249f7d7b48 Mon Sep 17 00:00:00 2001
+From: Stefano Rivera <stefano@rivera.za.net>
+Date: Thu, 20 Feb 2020 16:37:40 -0800
+Subject: [PATCH] Build on Python 3.8
+
+PEP-590 replaced tp_print with tp_vectorcall_offset
+---
+ cpybuilder.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cpybuilder.py b/cpybuilder.py
+index 8d8cab7f5e0f..674050737b0a 100644
+--- a/cpybuilder.py
++++ b/cpybuilder.py
+@@ -254,7 +254,11 @@ class PyTypeObject(NamedEntity):
+ result += ' sizeof(%(struct_name)s), /*tp_basicsize*/\n' % self.__dict__
+ result += ' 0, /*tp_itemsize*/\n'
+ result += self.c_ptr_field('tp_dealloc')
++ result += '#if PY_VERSION_HEX >= 0x03080000\n'
++ result += ' 0, /*tp_vectorcall_offset*/\n'
++ result += '#else\n'
+ result += self.c_ptr_field('tp_print')
++ result += '#endif\n'
+ result += self.c_ptr_field('tp_getattr')
+ result += self.c_ptr_field('tp_setattr')
+ result += '#if PY_MAJOR_VERSION < 3\n' % self.__dict__
+--
+2.26.0
+