diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-22 01:56:23 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-22 11:10:01 +0900 |
| commit | 9dfbf95db02054204defbe422099c02b790a19fc (patch) | |
| tree | f8c318ebfc5c824b2eb5e7a8aac3b835ee05a4ed /internal/rosa/package/musl/package.az | |
| parent | 29f86b3446c9fe35d2a359df45471abdaa35cea4 (diff) | |
internal/rosa: initial cross-compilation support
This successfully cross-compiles the toolchain. More work is needed to
support cross-compilation on all native helpers and existing packages.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/package/musl/package.az')
| -rw-r--r-- | internal/rosa/package/musl/package.az | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/rosa/package/musl/package.az b/internal/rosa/package/musl/package.az index c264c782..7afa7e2f 100644 --- a/internal/rosa/package/musl/package.az +++ b/internal/rosa/package/musl/package.az @@ -24,6 +24,9 @@ package musl-headers { exec = make { defaults = false; + configure = { + "target": triple; + }; make = [ "DESTDIR=/work", "install-headers" ]; check = nil; install = "# headers installed during make"; @@ -46,9 +49,20 @@ package musl { env = [ "LDFLAGS=" + earlyLDFLAGS, ]; + early = ` +[ -e '/system/`+arch+`' ] && \ + ln -s ../../../../`+arch+`/system/lib/`+triple+` /system/lib/clang/*/lib || true +`; exec = make { defaults = false; + configure = { + "target": triple; + + "AR": "ar"; + "RANLIB": "ranlib"; + "CC": "'clang --target="+triple+" -rtlib=compiler-rt'"; + }; check = nil; postInstall = ` mkdir -p /work/system/bin @@ -61,5 +75,6 @@ rmdir -v /work/lib `; }; + cross = [ early-compiler-rt ]; tools = [ coreutils ]; } |
