Export a self-consistent drop-in sysroot per arch#5
Merged
Conversation
penguin compiles per-project init.d/*.c drop-ins against a per-arch sysroot: crt startup objects + libc.so + libgcc_s.so.1 + the ld-musl loader. Today the crt comes from the embedded-toolchains image while the libc comes from the dylibs, and those must be the same musl toolchain -- pairing embedded-toolchains crt with penguin-tools' nixpkgs musl libc makes the drop-in crash at startup. Stage igloo_static/sysroots/<arch>/lib/ in each bundle with the crt objects (Scrt1.o, crti.o, crtn.o, crtbeginS.o, crtendS.o) resolved from this arch's own cross cc via -print-file-name, plus libc.so/libgcc_s.so.1 symlinked into the matching dylibs dir. This lets penguin source the whole drop-in toolchain from penguin-tools and drop both the embedded-toolchains crt and hyperfs. Verified the armel bundle stages all five crt objects (correct ARM relocatable ELF) with libc/libgcc resolving into dylibs/armel.
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.
penguin compiles per-project
init.d/*.cdrop-ins against a per-arch sysroot needing crt startup objects +libc.so+libgcc_s.so.1+ theld-muslloader. The crt and the libc must come from the same musl toolchain; pairing the embedded-toolchains crt with penguin-tools' nixpkgs-musl libc makes the drop-in crash at startup (this is what broke penguin's per-arch tests when the integration overwrote the system dylibs).This stages
igloo_static/sysroots/<arch>/lib/in each bundle with:Scrt1.o,crti.o,crtn.o,crtbeginS.o,crtendS.o) resolved from this arch's own crossccvia-print-file-name, andlibc.so/libgcc_s.so.1symlinked into the matchingdylibs/<arch>/.That gives penguin a self-consistent drop-in toolchain sourced entirely from penguin-tools, so it can drop both the embedded-toolchains crt and hyperfs. Verified the armel bundle stages all five crt objects (correct ARM relocatable ELF) with libc/libgcc resolving into
dylibs/armel.Follow-up (penguin side): point the sysroots stage at
sysroots/<arch>, update DYLIB_DIRS to canonical names, remove the hyperfs download.