Skip to content

Linux updates improved#467

Open
arichardson wants to merge 27 commits intomainfrom
linux-updates-improved
Open

Linux updates improved#467
arichardson wants to merge 27 commits intomainfrom
linux-updates-improved

Conversation

@arichardson
Copy link
Copy Markdown
Member

This is a rebased and somewhat improved version of PR #451.

I dropped the linux-headers target since it is not needed to solve cyclic dependencies, otherwise the result should be mostly the same.

@heshamelmatary could you test this?

arichardson and others added 19 commits March 29, 2026 00:09
When using the macos system python, we replace <venv>/bin/python
``/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python`
which does not exist, only a python3.9 and python3 binary exist.
To fix this problem, use two approaches: 1) if <venv>/bin/python
is a symlink, resolve that and 2) try checking for python3.
Similar to pyrefly silence all the warnings that are too annoying to
fix immediately to establish a baseline to prevent regressions.
These should not be used for other projects, they are just there to add
an easy way of building linux using GCC instead of the default clang.
In the future we may want to also allow using GCC to compile other
targets but for now this is sufficient.
Now that there's RVY muslc and busybox
Instead of having one common target info, use one for each Linux
repository. Since these all build different versions of Linux and
install to different root directories, it does not make sense to
share the same target info. This greatly simplifies finding the correct
dependencies and is overall cleaner.
This is needed to resolve the cyclic dependency between
compiler-rt-builtins (which needs musl and linux headers) and musl
which needs compiler-rt-builtins to build correctly.
Install just the headers first, then build compiler-rt-builtins and then
build muslc.

Co-authored-by: Alex Richardson <alexrichardson@google.com>
When installing the muslc headers (for compiler-rt), we should reuse the
same source and build directory as the full "stage2" build that depends
on compiler-rt and the linux headers.
compiler-rt only depends on the C and kernel headers, not an entire
sysroot which will unnecessarily builds muslc. This could also trigger
circular deps conflicts because dynamically-linked muslc depends on
compiler-rt library.

Co-authored-by: Alex Richardson <alexrichardson@google.com>
heshamelmatary and others added 8 commits March 28, 2026 18:18
If building muslc on its own, it only requires the Linux kernel headers
and compiler-rt builtin libraries.
Dynamically linked muslc does need compiler-rt builtins
There are no guarantees the kernel sets up valid stdio fds for init, so
explicitly set it up in the init script.
This is already done in AutotoolsProject.
We have to limit it to <82 to ensure that projects that still need
pkg_resources continue working.
@arichardson arichardson force-pushed the linux-updates-improved branch from 0356f7f to 8966b80 Compare March 29, 2026 01:19
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.

2 participants