Add Perl 5.36 support#1
Open
riccardo-perotti wants to merge 1 commit into
Open
Conversation
Port perl-sys to Perl 5.36 — upstream (vickenty) is frozen ~2021 and
predates Perl's 5.31 embed.fnc flag rework:
- add build/embed.fnc/v5.36 (Perl 5.36.0's embed.fnc)
- STUB_TYPES += 5.36's new opaque structs (COP, REGEXP, PMOP, LOGOP,
OPSLAB, PERL_SI, yy_parser)
- regen.pl: skip functions whose types perl-sys can't map (niche
internals; none used by gt-core) so every render site stays consistent
- EmbedFnc.pm: honor the 'T' (no-pTHX) flag, renamed from 'n' in 5.36,
fixing a C "redefinition of parameter 'my_perl'"
- EmbedFnc.pm: select fns by linkability (A/p/b) instead of the stale
A/!M/!D heuristic, so reflagged core fns (hv_fetch, sv_iv, ...) bind
- build.rs: declare cargo:rerun-if-changed inputs
Builds gt-core's cdylib and passes cargo test 7/7 against Perl 5.36.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
JiraID:ROP-9262
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.
Ports
perl-systo Perl 5.36. Upstream (vickenty/perl-sys) is frozen ~2021 and predates Perl's 5.31embed.fncflag rework, so it can't generate bindings for 5.36. This is needed to build gt-core's Rust XScdylibon the new Debian Bookworm / Perl 5.36 base image.masterwas fast-forwarded from the dormant 2019 fork-point to current upstream HEAD (725fb43) first, so this PR is just the 5.36 changes.Changes (all under
build/)embed.fnc/v5.36— Perl 5.36.0'sembed.fnc(the per-version API data file perl-sys generates from).regen.pl—STUB_TYPES+= 5.36's new opaque structs (COP, REGEXP, PMOP, LOGOP, OPSLAB, PERL_SI, yy_parser); plus an up-front filter that skips functions whose types the mapper can't model (niche interpreter internals), keeping every render site consistent.lib/PerlSys/EmbedFnc.pm— honor theT("no implicit pTHX") flag, renamed fromnin 5.36 (fixes a Credefinition of parameter 'my_perl'in the interpreter-lifecycle wrappers); and select functions by linkability (A/p/b) rather than the staleA/!M/!Dheuristic, so core fns the 5.31 rework reflagged (hv_fetch,sv_iv, …) still bind.build.rs— declarecargo:rerun-if-changedinputs so generator edits actually re-trigger.Verification
Builds gt-core's
cdylib(libgtcore.so) and passescargo test7/7 against Perl 5.36 inperl-base-image-v2(via a Cargo[patch]to this fork).Follow-up
Jira Tickets
🤖 Generated with Claude Code