gcc: add glibc to rpath (#36)

This way, the binaries glibc builds will actually get linked to our libc.so at runtime, instead of the system one.

Reviewed-on: #36
Reviewed-by: vlinkz <vlinkz@snowflakeos.org>
Co-authored-by: Piper McCorkle <contact@piperswe.me>
Co-committed-by: Piper McCorkle <contact@piperswe.me>
This commit is contained in:
Piper McCorkle 2025-10-07 06:17:07 +00:00 committed by vlinkz
parent be0d6bc0e1
commit a5b66548d3
5 changed files with 6 additions and 2 deletions

View file

@ -8,9 +8,9 @@
},
"branch": "main",
"submodules": false,
"revision": "f39cac8caec87b3d93bd2f941bcf8768dc46d912",
"revision": "187b21870e60c650fb7f08c00b99e6f648c53198",
"url": null,
"hash": "sha256-LgdIew95Y3PBTTj8vV70gbWIyMPf3Fl30cM2WPWylNk="
"hash": "sha256-UZpbkervrxpUHgIEDHExevG7Aza36vjLMZFagzTJqLA="
},
"lib": {
"type": "Git",

View file

@ -9,6 +9,7 @@ let
gccFlags = [
"-Wl,-dynamic-linker=${foundation.stage1-musl}/lib/libc.so"
"-Wl,-rpath,${foundation.stage1-musl}/lib"
"-B${foundation.stage1-musl}/lib"
];
in

View file

@ -31,6 +31,7 @@ let
gccFlags = [
"-Wl,-dynamic-linker=${config.deps.host.glibc.dynamicLinker}"
"-Wl,-rpath,${config.deps.host.glibc.package}/lib"
"-L${config.deps.host.glibc.package}/lib"
"-B${config.deps.host.glibc.package}/lib"
"-L${config.package.outPath}${libPrefix}/lib"

View file

@ -22,6 +22,7 @@ let
gccFlags = [
"-Wl,-dynamic-linker=${config.deps.host.glibc.dynamicLinker}"
"-Wl,-rpath,${config.deps.host.glibc.package}/lib"
"-L${config.deps.host.glibc.package}/lib"
"-B${config.deps.host.glibc.package}/lib"
"-L${config.package.outPath}/lib"

View file

@ -22,6 +22,7 @@ let
gccFlags = [
"-Wl,-dynamic-linker=${config.deps.host.glibc.dynamicLinker}"
"-Wl,-rpath,${config.deps.host.glibc.package}/lib"
"-L${config.deps.host.glibc.package}/lib"
"-B${config.deps.host.glibc.package}/lib"
"-L${config.package.outPath}/lib"