Repository navigation
Conversation
This script builds a distro-free glibc rootfs for cross-compiling with clang, including dependencies like gcc, glibc, and others. It manages downloads, configurations, and installations for various architectures.
Member
Author
|
@premun, upstream for dotnet/dotnet-buildtools-prereqs-docker#1845. |
Updated script to support building musl rootfs alongside glibc. Adjusted usage instructions and dependency handling for libc selection.
The strip step passed every `*.so*`, `*.a` and `*.o` file to a single `llvm-strip` call. Some of them are linker scripts (`libc.so`, `libpthread.so`, `libm.a`, ...), and `llvm-strip` stops at the first file that isn't an object, so everything after it kept its debug info. The error was hidden, and how much got stripped depended on `find` order. Strip only ELF objects and archives instead. On Ubuntu 24.04 this takes the x64 rootfs from 200 MB to 92 MB, arm64 from 213 MB to 87 MB and riscv64 from 212 MB to 138 MB. Co-authored-by: Cursor <cursoragent@cursor.com>
The runtime uses the loongarch64 signal context definitions (`FPU_CTX_MAGIC`, `struct sctx_info`, `struct fpu_context`) that musl added in 1.2.6. It also matches the musl version in the current Alpine edge based loongarch64 image. Co-authored-by: Cursor <cursoragent@cursor.com>
Member
Author
|
Also included musl libc support (from dotnet/dotnet-buildtools-prereqs-docker#1855). |
This branch has not been deployed
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.
This script builds a distro-free glibc rootfs for cross-compiling with clang, including dependencies like gcc, glibc, and others. It manages downloads, configurations, and installations for various architectures.