{{ message }}
Conversation
…vents GCC 12 removed ggc_force_collect in favor of an enum-based ggc_collect() API. Python 3.7 made PyEval_InitThreads() a no-op, Python 3.12 deprecated Py_UnbufferedStdioFlag, and Python 3.13+ provides PyUnicode_AsUTF8 as the public replacement for _PyUnicode_AsString. GCC 10 added PLUGIN_START_PARSE_FUNCTION, PLUGIN_FINISH_PARSE_FUNCTION, and PLUGIN_INCLUDE_FILE events that were not yet wired up. gcc-python-compat.h: * Guard extern declaration of ggc_force_collect with #if (GCC_VERSION < 12000); the variable was removed in GCC 12 (gcc/ggc-internal.h ChangeLog-2021). gcc-python-wrapper.c (force_gcc_gc): * For GCC >= 12, call ggc_collect(GGC_COLLECT_FORCE) instead of setting ggc_force_collect and calling ggc_collect(). gcc-python.c (plugin_init): * Guard Py_UnbufferedStdioFlag assignment with #if PY_VERSION_HEX < 0x030c0000; deprecated in Python 3.12. * Guard PyEval_InitThreads() call with #if PY_VERSION_HEX < 0x03070000; no-op since Python 3.7, deprecated since Python 3.9. gcc-python.h: * For Python >= 3.13, define PyGccString_AsString as PyUnicode_AsUTF8 (public API) instead of _PyUnicode_AsString (private alias). gcc-python-callbacks.c: * Add PyGcc_CallbackFor_PLUGIN_INCLUDE_FILE to pass the included filename as a Python string to registered callbacks. * Wire up PLUGIN_START_PARSE_FUNCTION and PLUGIN_FINISH_PARSE_FUNCTION (gcc_data is a tree function decl) using the existing PyGcc_CallbackFor_tree handler. * Wire up PLUGIN_INCLUDE_FILE using the new handler. All three events were added in GCC 10. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The README and the Sphinx requirements page still describe the plugin as supporting GCC 4.6 or later (tested up to GCC 8) and Python 2.7 or 3.2+. That support is historical: current GCC releases no longer build the plugin, and Python 2 is long end-of-life. Document the maintenance baseline instead: Python 3 is the target, GCC plugin compatibility is established per GCC release, no current GCC release is claimed as supported until it has been built and tested, and x86_64 and ppc64le are the intended test platforms. README.rst: * Add a "Maintenance status" section. * Requirements: replace the GCC 4.6+ and Python 2.7/3.2+ claims. Note that the plugin headers must match the exact GCC version, and that the plugin is compiled as C++, so the matching C++ compiler is required. * Usage: replace the x86_64-only note with the intended test platforms. docs/basics.rst: * Requirements: same GCC and Python changes as README.rst. * Build-time dependencies: drop the Python 2 package list; use dnf and add gcc-c++. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Makefile defaults to "python" and "python-config". Many current distributions provide neither command, and where they exist they may refer to Python 2 or to an unintended interpreter. Default to python3 and python3-config instead. PYTHON and PYTHON_CONFIG can still be overridden on the make command line. Makefile: * Default PYTHON to python3 and PYTHON_CONFIG to python3-config. * Update the comment describing the defaults, and drop the commented-out python3 example, which is now the default. docs/basics.rst: * Describe the new default and how to select another Python 3. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
.travis.yml targets Travis CI's long-retired Ubuntu Precise/Trusty images, builds with GCC 4.8 through 9, and installs Python 2 packages. Replace it with a GitHub Actions workflow. Following the maintenance plan, start with one reproducible job rather than a large matrix: Linux x86_64, Python 3 and a single GCC release, in a pinned ubuntu:22.04 container. GCC 11 and later do not build the current sources (checked with GCC 11 through 16), so the job uses GCC 10, the release before those API changes. Ubuntu 22.04 provides GCC 10 together with Python 3.10; the test tooling still relies on distutils and configparser.SafeConfigParser, which Python 3.12 removed. The job builds the plugin serially, because the Makefile is not yet safe for parallel builds, checks that GCC loads the plugin, and runs the cpybuilder and dejagnu selftests. The main test suite also runs, but does not fail the job for now, since some tests are expected to fail with current Python releases. Further GCC releases and architectures will be added to the matrix as their compatibility fixes land. .travis.yml: Remove. .github/workflows/ci.yml: New file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Sets up the maintenance baseline before any GCC compatibility work.
Testing
make -pnconfirms the new defaults and that command-line overrides still win.Notes for review
sixdependency are untouched here.make -jyet, which is why CI builds serially. Fixed in the next series.