From d67f1d269e5521004009b0ea65a8d227db8912e1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 19 Jan 2010 17:41:54 +0000 Subject: [PATCH] * binutils creates hard links to the programs in $out/bin in $out//bin. Because the fixup phase causes those to be replaced by identical copies, use symlinks instead of hardlinks. This saves about 9 MB. svn path=/nixpkgs/branches/stdenv-updates/; revision=19549 --- pkgs/development/tools/misc/binutils/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index d8e1d611432e..1bb110e35fd3 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -27,6 +27,12 @@ stdenv.mkDerivation rec { if test "$noSysDirs" = "1"; then echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt fi + + # Use symlinks instead of hard links to save space ("strip" in the + # fixup phase strips each hard link separately). + for i in binutils/Makefile.in gas/Makefile.in ld/Makefile.in; do + substituteInPlace $i --replace 'ln ' 'ln -s ' + done ''; configureFlags = "--disable-werror" # needed for dietlibc build