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

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