diff options
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 26 | ||||
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/linux/make-bootstrap-tools.nix | 5 |
3 files changed, 30 insertions, 3 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 350fff482528f..6d30e6c01ffbf 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -1305,6 +1305,23 @@ showPhaseHeader() { } +showPhaseFooter() { + local phase="$1" + local startTime="$2" + local endTime="$3" + local delta=$(( endTime - startTime )) + (( $delta < 30 )) && return + + local H=$((delta/3600)) + local M=$((delta%3600/60)) + local S=$((delta%60)) + echo -n "$phase completed in " + (( $H > 0 )) && echo -n "$H hours " + (( $M > 0 )) && echo -n "$M minutes " + echo "$S seconds" +} + + genericBuild() { if [ -f "${buildCommandPath:-}" ]; then source "$buildCommandPath" @@ -1340,11 +1357,20 @@ genericBuild() { showPhaseHeader "$curPhase" dumpVars + local startTime=$(date +"%s") + # Evaluate the variable named $curPhase if it exists, otherwise the # function named $curPhase. eval "${!curPhase:-$curPhase}" + local endTime=$(date +"%s") + + showPhaseFooter "$curPhase" "$startTime" "$endTime" + if [ "$curPhase" = unpackPhase ]; then + # make sure we can cd into the directory + [ -z "${sourceRoot}" ] || chmod +x "${sourceRoot}" + cd "${sourceRoot:-.}" fi done diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 822b69642f21d..e9104dd88cfa1 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -205,7 +205,7 @@ in # Rebuild binutils to use from stage2 onwards. overrides = self: super: { binutils-unwrapped = super.binutils-unwrapped.override { - gold = false; + enableGold = false; }; inherit (prevStage) ccWrapperStdenv diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 1d6ebe6284f54..2263341b23fca 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -37,7 +37,7 @@ in with pkgs; rec { bootBinutils = binutils.bintools.override { withAllTargets = false; # Don't need two linkers, disable whatever's not primary/default. - gold = false; + enableGold = false; # bootstrap is easier w/static enableShared = false; }; @@ -175,7 +175,7 @@ in with pkgs; rec { for i in as ld ar ranlib nm strip readelf objdump; do cp ${bootBinutils.out}/bin/$i $out/bin done - cp '${lib.getLib binutils.bintools}'/lib/* "$out/lib/" + cp -r '${lib.getLib binutils.bintools}'/lib/* "$out/lib/" chmod -R u+w $out @@ -189,6 +189,7 @@ in with pkgs; rec { nuke-refs $out/bin/* nuke-refs $out/lib/* + nuke-refs $out/lib/*/* nuke-refs $out/libexec/gcc/*/*/* nuke-refs $out/lib/gcc/*/*/* nuke-refs $out/lib/gcc/*/*/include-fixed/*{,/*} |