1
0
forked from rosa/hakurei

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>
This commit is contained in:
2026-05-05 02:44:26 +09:00
parent b84bb09a80
commit fefefdf734
2 changed files with 37 additions and 29 deletions

View File

@@ -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