diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-03-08 09:57:58 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-03-08 09:58:19 +0100 |
commit | 09af15654f0c8091f1b9e0bbb2e523cdee194442 (patch) | |
tree | e648edef1ce4c64c533f2593aa22b8015cf0e506 /pkgs/stdenv | |
parent | f306e67e15bdbe9a8358c9f81319fc4fcbadc2eb (diff) | |
parent | 0ee75214f336474e127c2e3546c0406a0c4d5fa7 (diff) |
Merge master into closure-size
The kde-5 stuff still didn't merge well.
I hand-fixed what I saw, but there may be more problems.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 22 | ||||
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 9 | ||||
-rw-r--r-- | pkgs/stdenv/linux/make-bootstrap-tools.nix | 18 | ||||
-rw-r--r-- | pkgs/stdenv/nix/default.nix | 3 |
4 files changed, 34 insertions, 18 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 2255bbfe669f..650bdc2e2e19 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -189,6 +189,17 @@ _addRpathPrefix() { fi } +# Return success if the specified file is an ELF object. +isELF() { + local fn="$1" + local magic + exec {fd}< "$fn" + read -n 4 -u $fd magic + exec {fd}<&- + if [[ "$magic" =~ ELF ]]; then return 0; else return 1; fi +} + + ###################################################################### # Initialisation. @@ -371,6 +382,13 @@ export NIX_BUILD_CORES paxmark() { true; } +# Prevent OpenSSL-based applications from using certificates in +# /etc/ssl. +if [ -z "$SSL_CERT_FILE" ]; then + export SSL_CERT_FILE=/no-cert-file.crt +fi + + ###################################################################### # Textual substitution functions. @@ -639,14 +657,14 @@ configurePhase() { # Add --disable-dependency-tracking to speed up some builds. if [ -z "$dontAddDisableDepTrack" ]; then - if grep -q dependency-tracking $configureScript; then + if grep -q dependency-tracking "$configureScript"; then configureFlags="--disable-dependency-tracking $configureFlags" fi fi # By default, disable static builds. if [ -z "$dontDisableStatic" ]; then - if grep -q enable-static $configureScript; then + if grep -q enable-static "$configureScript"; then configureFlags="--disable-static $configureFlags" fi fi diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index b1e7e6e11ecf..fc7166efee51 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -78,11 +78,11 @@ rec { dontPatchShebangs=1 ${commonPreHook} ''; - shell = "${bootstrapTools}/bin/sh"; + shell = "${bootstrapTools}/bin/bash"; initialPath = [bootstrapTools]; - fetchurlBoot = import ../../build-support/fetchurl { - stdenv = stage0.stdenv; - curl = bootstrapTools; + + fetchurlBoot = import ../../build-support/fetchurl/boot.nix { + inherit system; }; cc = if isNull gccPlain @@ -334,7 +334,6 @@ rec { awk --version grep --version gcc --version - curl --version ldlinux=$(echo ${bootstrapTools}/lib/ld-linux*.so.?) export CPP="cpp -idirafter ${bootstrapTools}/include-glibc -B${bootstrapTools}" diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 5732437970d5..763fea6f84bd 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -10,12 +10,6 @@ rec { aclSupport = false; }); - curlMinimal = curl.override { - zlibSupport = false; - sslSupport = false; - scpSupport = false; - }; - busyboxMinimal = busybox.override { useMusl = true; enableStatic = true; @@ -57,7 +51,15 @@ rec { cp -d ${glibc.out}/lib/crt?.o $out/lib cp -rL ${glibc.dev}/include $out - chmod -R u+w $out/include + chmod -R u+w "$out" + + # glibc can contain linker scripts: find them, copy their deps, + # and get rid of absolute paths (nuke-refs would make them useless) + local lScripts=$(grep --files-with-matches --max-count=1 'GNU ld script' -R "$out/lib") + cp -d -t "$out/lib/" $(cat $lScripts | tr " " "\n" | grep -F '${glibc}' | sort -u) + for f in $lScripts; do + substituteInPlace "$f" --replace '${glibc}/lib/' "" + done # Hopefully we won't need these. rm -rf $out/include/mtd $out/include/rdma $out/include/sound $out/include/video @@ -83,8 +85,6 @@ rec { cp -d ${gnumake}/bin/* $out/bin cp -d ${patch}/bin/* $out/bin cp ${patchelf}/bin/* $out/bin - cp ${curlMinimal}/bin/curl $out/bin - cp -d ${curlMinimal}/lib/libcurl* $out/lib cp -d ${gnugrep.pcre.out}/lib/libpcre*.so* $out/lib # needed by grep diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix index 75e1c3814ed0..30ac92837cba 100644 --- a/pkgs/stdenv/nix/default.nix +++ b/pkgs/stdenv/nix/default.nix @@ -18,10 +18,9 @@ import ../generic rec { nativePrefix = stdenv.lib.optionalString stdenv.isSunOS "/usr"; nativeLibc = true; inherit stdenv; - binutils = pkgs.binutils; + inherit (pkgs) binutils coreutils gnugrep; cc = pkgs.gcc.cc; isGNU = true; - coreutils = pkgs.coreutils; shell = pkgs.bash + "/bin/sh"; }; |