From 6b03da43d99215556aad473d99ebc4e043cdde20 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 19 Oct 2006 11:03:20 +0000 Subject: [PATCH] * binutils on dietlibc. * Pass -lcompat by default in the dietlibc stdenv. svn path=/nixpkgs/trunk/; revision=6770 --- .../misc/binutils-static/binutils-2.17.nix | 11 ---------- .../tools/misc/binutils-static/builder.sh | 21 ------------------- .../tools/misc/binutils-static/default.nix | 11 ---------- pkgs/shells/bash/default.nix | 2 -- pkgs/top-level/all-packages.nix | 8 +++++-- 5 files changed, 6 insertions(+), 47 deletions(-) delete mode 100644 pkgs/development/tools/misc/binutils-static/binutils-2.17.nix delete mode 100644 pkgs/development/tools/misc/binutils-static/builder.sh delete mode 100644 pkgs/development/tools/misc/binutils-static/default.nix diff --git a/pkgs/development/tools/misc/binutils-static/binutils-2.17.nix b/pkgs/development/tools/misc/binutils-static/binutils-2.17.nix deleted file mode 100644 index 7cd4b1444a61..000000000000 --- a/pkgs/development/tools/misc/binutils-static/binutils-2.17.nix +++ /dev/null @@ -1,11 +0,0 @@ -{stdenv, fetchurl, noSysDirs}: - -stdenv.mkDerivation { - name = "binutils-2.17"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/binutils-2.17.tar.bz2; - md5 = "e26e2e06b6e4bf3acf1dc8688a94c0d1"; - }; - inherit noSysDirs; -} diff --git a/pkgs/development/tools/misc/binutils-static/builder.sh b/pkgs/development/tools/misc/binutils-static/builder.sh deleted file mode 100644 index 6372dd3e774b..000000000000 --- a/pkgs/development/tools/misc/binutils-static/builder.sh +++ /dev/null @@ -1,21 +0,0 @@ -source $stdenv/setup - -configureFlags=" --disable-nls --disable-shared --enable-static" -makeFlags="LDFLAGS=-all-static" - -patchConfigure() { - # Clear the default library search path. - if test "$noSysDirs" = "1"; then - echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt - fi -} - -preConfigure=patchConfigure - -preBuild() { - make configure-host -} - -preBuild=preBuild - -genericBuild diff --git a/pkgs/development/tools/misc/binutils-static/default.nix b/pkgs/development/tools/misc/binutils-static/default.nix deleted file mode 100644 index 4875ba10f1b0..000000000000 --- a/pkgs/development/tools/misc/binutils-static/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{stdenv, fetchurl, noSysDirs}: - -stdenv.mkDerivation { - name = "binutils-2.16.1"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/binutils-2.16.1.tar.bz2; - md5 = "6a9d529efb285071dad10e1f3d2b2967"; - }; - inherit noSysDirs; -} diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix index a8dd2e3dd63e..77fc114878a5 100644 --- a/pkgs/shells/bash/default.nix +++ b/pkgs/shells/bash/default.nix @@ -13,9 +13,7 @@ stdenv.mkDerivation ({ }; } -# libcompat.a is needed on dietlibc for stpcpy(). // (if stdenv ? isDietLibC then { - NIX_LDFLAGS = "-lcompat"; patches = [./winsize.patch]; } else {}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9f490c2104dd..95e4f7645db5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -79,6 +79,9 @@ rec { useDietLibC = stdenv: stdenv // { mkDerivation = args: stdenv.mkDerivation (args // { NIX_CFLAGS_LINK = "-static"; + + # libcompat.a contains some commonly used functions. + NIX_LDFLAGS = "-lcompat"; # These are added *after* the command-line flags, so we'll # always optimise for size. @@ -979,8 +982,9 @@ rec { cross = "sparc-linux"; }; - binutilsStatic = import ../development/tools/misc/binutils-static { - inherit fetchurl stdenv noSysDirs; + binutilsDiet = import ../development/tools/misc/binutils/binutils-2.17.nix { + inherit fetchurl noSysDirs; + stdenv = useDietLibC stdenv; }; bison = bison1875;