diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-05 02:44:26 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-05 02:44:26 +0900 |
| commit | fefefdf7348736e54798ea8ec828918142841531 (patch) | |
| tree | 318486eda869d7478d19581708b7a6de29a59241 /internal/rosa/musl.go | |
| parent | b84bb09a800ba1afe7e06583c59aa78a792ae86f (diff) | |
internal/rosa/llvm: insert Rosa OS paths via musl ldso
This is cleaner than unconditionally adding rpath, and avoids breaking rpath priority.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/musl.go')
| -rw-r--r-- | internal/rosa/musl.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/rosa/musl.go b/internal/rosa/musl.go index 0cc3356a..43c33d43 100644 --- a/internal/rosa/musl.go +++ b/internal/rosa/musl.go @@ -53,6 +53,23 @@ rmdir -v /work/lib Chmod: true, Env: env, + + Patches: []KV{ + {"ldso-rosa", `diff --git a/ldso/dynlink.c b/ldso/dynlink.c +index 715948f4..c2fece68 100644 +--- a/ldso/dynlink.c ++++ b/ldso/dynlink.c +@@ -1157,7 +1157,7 @@ static struct dso *load_library(const char *name, struct dso *needed_by) + sys_path = ""; + } + } +- if (!sys_path) sys_path = "/lib:/usr/local/lib:/usr/lib"; ++ if (!sys_path) sys_path = "/system/lib:/system/lib/" LDSO_ARCH "-rosa-linux-musl:/lib:/usr/local/lib:/usr/lib"; + fd = path_open(name, sys_path, buf, sizeof buf); + } + pathname = buf; +`}, + }, }, &helper, Coreutils, ), version |
