Skip to content

feat(userland): ported the CPython 3.12 interpreter#125

Merged
FlareCoding merged 8 commits into
masterfrom
pr/python-interpreter-port
May 25, 2026
Merged

feat(userland): ported the CPython 3.12 interpreter#125
FlareCoding merged 8 commits into
masterfrom
pr/python-interpreter-port

Conversation

@FlareCoding
Copy link
Copy Markdown
Owner

@FlareCoding FlareCoding commented May 25, 2026

Note

Medium Risk
Touches kernel syscalls, handle flags, VMA stack size, and PTY ioctls alongside a large new cross-build path; regressions could affect all userland static links and TTY/shell apps, not only Python.

Overview
Adds a static CPython 3.12.8 userland app that cross-builds against the musl sysroot, applies Stellux-specific configure/patches, trims the stdlib, and stages /usr + bin/python3 into a per-arch rootfs overlay copied into initrd (with initrd/usr/ gitignored).

Build/CI now builds and caches compiler-rt builtins per arch (make compiler-rt, libclang_rt.builtins-*) so static links (especially Python on aarch64) do not depend on host cross builtins; toolchain-check, help, and userland/mk/toolchain.mk prefer sysroot builtins.

Kernel/userland fixes to support Python and richer TTY behavior: O_CLOEXEC on open with fcntl F_GETFD/F_SETFD (CLOEXEC stored in handle flags, masked from F_GETFL/F_SETFL); user stack grown to 512 KiB; PTY slave Linux termios/winsize ioctls (TCGETS/TCSETS, TIOCGWINSZ) plus Stellux raw/cooked ioctl IDs moved to 0x7301/0x7302 (user apps updated). CI kernel-unit-tests workflow caches/builds compiler-rt like libc++.

Reviewed by Cursor Bugbot for commit f6de95b. Bugbot is set up for automated code reviews on this repo. Configure here.

@FlareCoding FlareCoding force-pushed the pr/python-interpreter-port branch from 122a36f to 43ed7eb Compare May 25, 2026 22:29
Comment thread kernel/syscall/handlers/sys_fd.cpp
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fb67227. Configure here.

Comment thread kernel/pty/pty.cpp
@FlareCoding FlareCoding merged commit bb2653e into master May 25, 2026
15 checks passed
@FlareCoding FlareCoding deleted the pr/python-interpreter-port branch May 25, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant