Date: Sun, 12 Apr 2020 01:40:28 +0000 (UTC) From: Craig Leres <leres@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r531470 - in head/devel/xtensa-esp32-elf: . files Message-ID: <202004120140.03C1eSAT038096@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: leres Date: Sun Apr 12 01:40:28 2020 New Revision: 531470 URL: https://svnweb.freebsd.org/changeset/ports/531470 Log: devel/xtensa-esp32-elf: Fix build with python3 and remove DEPRECATED Chase a Python 3.7 internal api change with a patch to the toolchain version of gdb. Unpin the USES=python version. Added: head/devel/xtensa-esp32-elf/files/ head/devel/xtensa-esp32-elf/files/0001-gdb-7.12.1.patch (contents, props changed) Modified: head/devel/xtensa-esp32-elf/Makefile Modified: head/devel/xtensa-esp32-elf/Makefile ============================================================================== --- head/devel/xtensa-esp32-elf/Makefile Sun Apr 12 01:22:10 2020 (r531469) +++ head/devel/xtensa-esp32-elf/Makefile Sun Apr 12 01:40:28 2020 (r531470) @@ -3,7 +3,7 @@ PORTNAME= xtensa-esp32-elf DISTVERSION= 1.22.0.g20171219 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel MASTER_SITES= SOURCEWARE/binutils/releases/binutils:source1 \ GNU/binutils:source1 \ @@ -38,9 +38,6 @@ COMMENT= Espressif ESP32 toolchain LICENSE= GPLv2 LGPL21 LICENSE_COMB= multi -DEPRECATED= Uses deprecated version of python -EXPIRATION_DATE= 2020-09-15 - BROKEN_armv6= fails to build: failed in step 'Installing pass-2 core C gcc compiler' BROKEN_armv7= fails to build: failed in step 'Installing pass-2 core C gcc compiler' BROKEN_powerpc64= fails to build: [ERROR] collect2: error: ld returned 1 exit status @@ -56,7 +53,7 @@ BUILD_DEPENDS= bash:shells/bash \ makeinfo:print/texinfo \ wget:ftp/wget -USES= autoreconf:build bison gmake libtool python:2.7 +USES= autoreconf:build bison gmake libtool python USE_GCC= 7 USE_GITHUB= yes USE_LDCONFIG= ${PREFIX}/${PORTNAME}/libexec/gcc/${PORTNAME}/5.2.0 @@ -76,6 +73,8 @@ post-extract: ${LN} -s ${DISTDIR}/${F:C/:source[0-9]+$//} \ ${BUILD_WRKSRC}/.build/tarballs .endfor + ${MKDIR} ${WRKSRC}/local-patches/gdb/7.10 + ${CP} ${FILESDIR}/0001-gdb-7.12.1.patch ${WRKSRC}/local-patches/gdb/7.10 echo CT_LOG_PROGRESS_BAR=n >> \ ${BUILD_WRKSRC}/samples/${PORTNAME}/crosstool.config Added: head/devel/xtensa-esp32-elf/files/0001-gdb-7.12.1.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/xtensa-esp32-elf/files/0001-gdb-7.12.1.patch Sun Apr 12 01:40:28 2020 (r531470) @@ -0,0 +1,46 @@ +Derived from: + + https://github.com/crosstool-ng/crosstool-ng/issues/1206 + _PyImport_FixupBuiltin Solution patch #1206 + +--- a/gdb/python/python.c.orig 2019-06-14 11:41:02.944671520 +0800 ++++ b/gdb/python/python.c 2019-06-14 11:55:32.000000000 +0800 +@@ -1624,6 +1624,17 @@ finalize_python (void *ignore) + } + #endif + ++#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 ++ + /* Provide a prototype to silence -Wmissing-prototypes. */ + extern initialize_file_ftype _initialize_python; + +@@ -1743,6 +1754,9 @@ message == an error message without a st + 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); + #endif +@@ -1752,9 +1766,7 @@ message == an error message without a st + 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004120140.03C1eSAT038096>