Merge pull request #195236 from Et7f3/musl-split-binary
This commit is contained in:
commit
bdd04ab2f9
1 changed files with 3 additions and 6 deletions
|
@ -85,7 +85,7 @@ stdenv.mkDerivation rec {
|
||||||
"--syslibdir=${placeholder "out"}/lib"
|
"--syslibdir=${placeholder "out"}/lib"
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "bin" "dev" ];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
dontDisableStatic = true;
|
||||||
dontAddStaticConfigureFlags = true;
|
dontAddStaticConfigureFlags = true;
|
||||||
|
@ -108,15 +108,12 @@ stdenv.mkDerivation rec {
|
||||||
# Apparently glibc provides scsi itself?
|
# Apparently glibc provides scsi itself?
|
||||||
(cd $dev/include && ln -s $(ls -d ${linuxHeaders}/include/* | grep -v "scsi$") .)
|
(cd $dev/include && ln -s $(ls -d ${linuxHeaders}/include/* | grep -v "scsi$") .)
|
||||||
|
|
||||||
mkdir -p $out/bin
|
|
||||||
|
|
||||||
|
|
||||||
${lib.optionalString (stdenv.targetPlatform.libc == "musl" && stdenv.targetPlatform.isx86_32)
|
${lib.optionalString (stdenv.targetPlatform.libc == "musl" && stdenv.targetPlatform.isx86_32)
|
||||||
"install -D libssp_nonshared.a $out/lib/libssp_nonshared.a"
|
"install -D libssp_nonshared.a $out/lib/libssp_nonshared.a"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create 'ldd' symlink, builtin
|
# Create 'ldd' symlink, builtin
|
||||||
ln -rs $out/lib/libc.so $out/bin/ldd
|
ln -s $out/lib/libc.so $bin/bin/ldd
|
||||||
|
|
||||||
# (impure) cc wrapper around musl for interactive usuage
|
# (impure) cc wrapper around musl for interactive usuage
|
||||||
for i in musl-gcc musl-clang ld.musl-clang; do
|
for i in musl-gcc musl-clang ld.musl-clang; do
|
||||||
|
@ -127,7 +124,7 @@ stdenv.mkDerivation rec {
|
||||||
--replace $out/lib/musl-gcc.specs $dev/lib/musl-gcc.specs
|
--replace $out/lib/musl-gcc.specs $dev/lib/musl-gcc.specs
|
||||||
|
|
||||||
# provide 'iconv' utility, using just-built headers, libc/ldso
|
# provide 'iconv' utility, using just-built headers, libc/ldso
|
||||||
$CC ${iconv_c} -o $out/bin/iconv \
|
$CC ${iconv_c} -o $bin/bin/iconv \
|
||||||
-I$dev/include \
|
-I$dev/include \
|
||||||
-L$out/lib -Wl,-rpath=$out/lib \
|
-L$out/lib -Wl,-rpath=$out/lib \
|
||||||
-lc \
|
-lc \
|
||||||
|
|
Loading…
Reference in a new issue