16 lines
412 B
Nix
16 lines
412 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
libc ? stdenv.cc.libc,
|
|
}:
|
|
# TheRock's compiler bypasses the Nix cc wrapper and needs explicit host paths.
|
|
lib.concatStringsSep " " [
|
|
"--gcc-toolchain=${stdenv.cc.cc}"
|
|
"-idirafter ${lib.getDev libc}/include"
|
|
"-B${libc}/lib"
|
|
"-L${libc}/lib"
|
|
"-L${stdenv.cc.cc.lib}/lib"
|
|
"-Wl,-rpath,${libc}/lib:${stdenv.cc.cc.lib}/lib"
|
|
"-Wl,--dynamic-linker=${stdenv.cc.bintools.dynamicLinker}"
|
|
]
|