* binutils on dietlibc.

* Pass -lcompat by default in the dietlibc stdenv.

svn path=/nixpkgs/trunk/; revision=6770
This commit is contained in:
Eelco Dolstra 2006-10-19 11:03:20 +00:00
parent c696045af0
commit 6b03da43d9
5 changed files with 6 additions and 47 deletions

View file

@ -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;
}

View file

@ -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

View file

@ -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;
}

View file

@ -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 {})

View file

@ -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;