Merge commit staging+systemd into closure-size

Many non-conflict problems weren't (fully) resolved in this commit yet.
This commit is contained in:
Vladimír Čunát
2015-10-03 13:33:37 +02:00
6304 changed files with 708451 additions and 130034 deletions
+7 -6
View File
@@ -7,9 +7,9 @@
{ name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? ""
, cc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell
, zlib ? null, extraPackages ? []
, zlib ? null, extraPackages ? [], extraBuildCommands ? ""
, dyld ? null # TODO: should this be a setup-hook on dyld?
, setupHook ? ./setup-hook.sh
, isGNU ? false, isClang ? cc.isClang or false
}:
with stdenv.lib;
@@ -43,7 +43,7 @@ stdenv.mkDerivation {
inherit cc shell libc_bin libc_dev libc_lib binutils_bin coreutils_bin;
passthru = { inherit libc nativeTools nativeLibc nativePrefix; };
passthru = { inherit libc nativeTools nativeLibc nativePrefix isGNU isClang; };
buildCommand =
''
@@ -228,13 +228,14 @@ stdenv.mkDerivation {
''
+ ''
substituteAll ${setupHook} $out/nix-support/setup-hook.tmp
substituteAll ${./setup-hook.sh} $out/nix-support/setup-hook.tmp
cat $out/nix-support/setup-hook.tmp >> $out/nix-support/setup-hook
rm $out/nix-support/setup-hook.tmp
substituteAll ${./add-flags} $out/nix-support/add-flags.sh
cp -p ${./utils.sh} $out/nix-support/utils.sh
'';
''
+ extraBuildCommands;
# The dynamic linker has different names on different Linux platforms.
dynamicLinker =
@@ -245,7 +246,7 @@ stdenv.mkDerivation {
if stdenv.isArm then "ld-linux*.so.3" else
if stdenv.system == "powerpc-linux" then "ld.so.1" else
if stdenv.system == "mips64el-linux" then "ld.so.1" else
if stdenv.system == "x86_64-darwin" then "${dyld}/lib/dyld" else
if stdenv.system == "x86_64-darwin" then "/usr/lib/dyld" else
abort "Don't know the name of the dynamic linker for this platform.")
else "";
@@ -1,44 +0,0 @@
# This is an alternate setup hook for gcc-wrapper that uses the -I flag to
# add include search paths instead of -isystem. We need this for some packages
# because -isystem can change the search order specified by prior -I flags.
# Changing the search order can point gcc to the wrong package's headers.
# The -I flag will never change the order of prior flags.
export NIX_CC=@out@
addCVars () {
if [ -d $1/include ]; then
export NIX_CFLAGS_COMPILE+=" -I $1/include"
fi
if [ -d $1/lib64 -a ! -L $1/lib64 ]; then
export NIX_LDFLAGS+=" -L$1/lib64"
fi
if [ -d $1/lib ]; then
export NIX_LDFLAGS+=" -L$1/lib"
fi
}
envHooks+=(addCVars)
# Note: these come *after* $out in the PATH (see setup.sh).
if [ -n "@gcc@" ]; then
addToSearchPath PATH @gcc@/bin
fi
if [ -n "@binutils_bin@" ]; then
addToSearchPath PATH @binutils_bin@/bin
fi
if [ -n "@libc_bin@" ]; then
addToSearchPath PATH @libc_bin@/bin
fi
if [ -n "@coreutils_bin@" ]; then
addToSearchPath PATH @coreutils_bin@/bin
fi
export CC=gcc
export CXX=g++
+1 -1
View File
@@ -2,7 +2,7 @@ export NIX_CC=@out@
addCVars () {
if [ -d $1/include ]; then
export NIX_CFLAGS_COMPILE+=" -isystem $1/include"
export NIX_CFLAGS_COMPILE+=" ${ccIncludeFlag:--isystem} $1/include"
fi
if [ -d $1/lib64 -a ! -L $1/lib64 ]; then