FreeBSD Bugzilla – Attachment 196055 Details for
Bug 230494
devel/gdb: Fix build with Python 3.7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
updated patch file
devel_gdb.patch (text/plain), 2.93 KB, created by
Yasuhiro Kimura
on 2018-08-10 11:00:36 UTC
(
hide
)
Description:
updated patch file
Filename:
MIME Type:
Creator:
Yasuhiro Kimura
Created:
2018-08-10 11:00:36 UTC
Size:
2.93 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 476799) >+++ Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= gdb > PORTVERSION= 8.1 >-PORTREVISION= 5 >+PORTREVISION= 6 > CATEGORIES= devel > MASTER_SITES= GNU > >Index: files/patch-python3.7 >=================================================================== >--- files/patch-python3.7 (nonexistent) >+++ files/patch-python3.7 (working copy) >@@ -0,0 +1,85 @@ >+From aeab512851bf6ed623d1c6c4305b6ce05e51a10c Mon Sep 17 00:00:00 2001 >+From: Paul Koning <paul_koning@dell.com> >+Date: Fri, 8 Jun 2018 13:26:36 -0400 >+Subject: [PATCH] Fix build issue with Python 3.7 >+ >+Originally reported in >+https://bugzilla.redhat.com/show_bug.cgi?id=1577396 -- gdb build fails >+with Python 3.7 due to references to a Python internal function whose >+declaration changed in 3.7. >+ >+gdb/ChangeLog >+2018-06-08 Paul Koning <paul_koning@dell.com> >+ >+ PR gdb/23252 >+ >+ * python/python.c (do_start_initialization): >+ Avoid call to internal Python API. >+ (init__gdb_module): New function. >+--- >+ gdb/ChangeLog | 8 ++++++++ >+ gdb/python/python.c | 18 +++++++++++++++--- >+ 2 files changed, 23 insertions(+), 3 deletions(-) >+ >+diff --git gdb/ChangeLog gdb/ChangeLog >+index dbee2a3..12157bb 100644 >+--- gdb/ChangeLog >++++ gdb/ChangeLog >+@@ -1,3 +1,11 @@ >++2018-06-08 Paul Koning <paul_koning@dell.com> >++ >++ PR gdb/23252 >++ >++ * python/python.c (do_start_initialization): >++ Avoid call to internal Python API. >++ (init__gdb_module): New function. >++ >+ 2018-06-08 Gary Benson <gbenson@redhat.com> >+ >+ * linux-thread-db.c (valprint.h): New include. >+diff --git gdb/python/python.c gdb/python/python.c >+index 1805c90..20fc674 100644 >+--- gdb/python/python.c >++++ gdb/python/python.c >+@@ -1667,6 +1667,17 @@ finalize_python (void *ignore) >+ restore_active_ext_lang (previous_active); >+ } >+ >++#ifdef IS_PY3K >++/* This is called via the PyImport_AppendInittab mechanism called >++ during initialization, to make the built-in _gdb module known to >++ Python. */ >++PyMODINIT_FUNC >++init__gdb_module (void) >++{ >++ return PyModule_Create (&python_GdbModuleDef); >++} >++#endif >++ >+ static bool >+ do_start_initialization () >+ { >+@@ -1707,6 +1718,9 @@ do_start_initialization () >+ remain alive for the duration of the program's execution, so >+ it is not freed after this call. */ >+ Py_SetProgramName (progname_copy); >++ >++ /* Define _gdb as a built-in module. */ >++ PyImport_AppendInittab ("_gdb", init__gdb_module); >+ #else >+ Py_SetProgramName (progname.release ()); >+ #endif >+@@ -1716,9 +1730,7 @@ do_start_initialization () >+ PyEval_InitThreads (); >+ >+ #ifdef IS_PY3K >+- gdb_module = PyModule_Create (&python_GdbModuleDef); >+- /* Add _gdb module to the list of known built-in modules. */ >+- _PyImport_FixupBuiltin (gdb_module, "_gdb"); >++ gdb_module = PyImport_ImportModule ("_gdb"); >+ #else >+ gdb_module = Py_InitModule ("_gdb", python_GdbMethods); >+ #endif >+-- >+2.9.3 >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
koobs
:
maintainer-approval?
(
ports-secteam
)
Actions:
View
|
Diff
Attachments on
bug 230494
:
196044
| 196055