nixpkgs/pkgs/development/libraries/glibc-2.11/default.nix
Ludovic Courtès 04a15b29b0 glibc 2.11: Factorize the libc/info/locales expressions.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18526
2009-11-22 16:03:56 +00:00

54 lines
1.1 KiB
Nix

{ stdenv, fetchurl, kernelHeaders
, installLocales ? true
, profilingLibraries ? false
, cross ? null
, gccCross ? null
}:
let build = import ./common.nix;
in
build ({
name = "glibc" +
stdenv.lib.optionalString (cross != null) "-${cross.config}";
inherit fetchurl stdenv kernelHeaders installLocales profilingLibraries
cross gccCross;
builder = ./builder.sh;
preInstall = ''
ensureDir $out/lib
ln -s ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
'';
postInstall = ''
rm $out/lib/libgcc_s.so.1
'';
meta.description = "The GNU C Library";
}
//
(if cross != null
then {
preConfigure = ''
sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig"
cat > config.cache << "EOF"
libc_cv_forced_unwind=yes
libc_cv_c_cleanup=yes
libc_cv_gnu89_inline=yes
EOF
export BUILD_CC=gcc
export CC="$crossConfig-gcc"
export AR="$crossConfig-ar"
export RANLIB="$crossConfig-ranlib"
# The host strip will destroy everything in the target binaries
# otherwise.
dontStrip=1
'';
}
else {}))