aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/musl.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-23 02:41:35 +0900
committerOphestra <cat@gensokyo.uk>2026-01-24 11:22:25 +0900
commitf6eaf76ec9d342ee1cef1590623dec390318801f (patch)
tree8695e393d1ca795f6fc574a8de8d7a6794a789ba /internal/rosa/musl.go
parent5c127a70350c19c99bca388c94a4518d885c3ac3 (diff)
internal/rosa: patch library paths
This removes the need for reference LDFLAGS in the standard toolchain. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/musl.go')
-rw-r--r--internal/rosa/musl.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/rosa/musl.go b/internal/rosa/musl.go
index 3f9bcf69..41760758 100644
--- a/internal/rosa/musl.go
+++ b/internal/rosa/musl.go
@@ -29,8 +29,12 @@ func (t Toolchain) NewMusl(attr *MuslAttr) pkg.Artifact {
target := "install"
script := `
-mv -v /work/lib/* /work/system/lib
-rmdir -v /work/lib/
+mkdir -p /work/system/bin
+COMPAT_LINKER_NAME="ld-musl-$(uname -m).so.1"
+ln -vs ../lib/libc.so /work/system/bin/linker
+ln -vs libc.so "/work/system/lib/${COMPAT_LINKER_NAME}"
+rm -v "/work/lib/${COMPAT_LINKER_NAME}"
+rmdir -v /work/lib
`
if attr.Headers {
target = "install-headers"