mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
Remove obsolete useKlibc stdenv adapter
This commit is contained in:
parent
5cc92eb0d8
commit
d135422009
@ -29,33 +29,6 @@ rec {
|
||||
overrideSetup = stdenv: setupScript: stdenv.override { inherit setupScript; };
|
||||
|
||||
|
||||
# Return a modified stdenv that uses klibc to create small
|
||||
# statically linked binaries.
|
||||
useKlibc = stdenv: klibc: stdenv //
|
||||
{ mkDerivation = args: stdenv.mkDerivation (args // {
|
||||
NIX_CFLAGS_LINK = "-static";
|
||||
|
||||
# These are added *after* the command-line flags, so we'll
|
||||
# always optimise for size.
|
||||
NIX_CFLAGS_COMPILE =
|
||||
args.NIX_CFLAGS_COMPILE or "" + " -Os -s";
|
||||
|
||||
configureFlags =
|
||||
args.configureFlags or "" + " --disable-shared"; # brrr...
|
||||
|
||||
NIX_GCC = pkgs.runCommand "klibc-wrapper" {} ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${klibc}/bin/klcc $out/bin/gcc
|
||||
ln -s ${klibc}/bin/klcc $out/bin/cc
|
||||
mkdir -p $out/nix-support
|
||||
echo 'PATH=$PATH:${stdenv.gcc.binutils}/bin' > $out/nix-support/setup-hook
|
||||
'';
|
||||
});
|
||||
isKlibc = true;
|
||||
isStatic = true;
|
||||
};
|
||||
|
||||
|
||||
# Return a modified stdenv that tries to build statically linked
|
||||
# binaries.
|
||||
makeStaticBinaries = stdenv: stdenv //
|
||||
|
Loading…
Reference in New Issue
Block a user