aboutsummaryrefslogtreecommitdiff
path: root/pkgs/stdenv/linux/make-bootstrap-tools.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-03-08 09:57:58 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-03-08 09:58:19 +0100
commit09af15654f0c8091f1b9e0bbb2e523cdee194442 (patch)
treee648edef1ce4c64c533f2593aa22b8015cf0e506 /pkgs/stdenv/linux/make-bootstrap-tools.nix
parentf306e67e15bdbe9a8358c9f81319fc4fcbadc2eb (diff)
parent0ee75214f336474e127c2e3546c0406a0c4d5fa7 (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/linux/make-bootstrap-tools.nix')
-rw-r--r--pkgs/stdenv/linux/make-bootstrap-tools.nix18
1 files changed, 9 insertions, 9 deletions
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