summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-08-14 11:38:00 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-08-14 11:38:00 +0200
commit9eb901b70ddda39b714619804864f4d4c06a2edd (patch)
tree8cd3aa260535c7aad9c335cf54deef13c05a1cd0 /pkgs/build-support
parent62dac1bdd9b91a47eb7266bed94558cafd7ad07f (diff)
parent505e94256ef247dc5425068304583f8dc1b2064a (diff)
downloadnixlib-9eb901b70ddda39b714619804864f4d4c06a2edd.tar
nixlib-9eb901b70ddda39b714619804864f4d4c06a2edd.tar.gz
nixlib-9eb901b70ddda39b714619804864f4d4c06a2edd.tar.bz2
nixlib-9eb901b70ddda39b714619804864f4d4c06a2edd.tar.lz
nixlib-9eb901b70ddda39b714619804864f4d4c06a2edd.tar.xz
nixlib-9eb901b70ddda39b714619804864f4d4c06a2edd.tar.zst
nixlib-9eb901b70ddda39b714619804864f4d4c06a2edd.zip
Merge remote-tracking branch 'origin/gcc-6' into staging
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index 905135e7adce..502362514ebc 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -84,6 +84,8 @@ let
       # Work around "stdenv-darwin-boot-2 is not allowed to refer to path /nix/store/...-expand-response-params.c"
       cp "$src" expand-response-params.c
       "$CC" -std=c99 -O3 -o "$out" expand-response-params.c
+      strip -S $out
+      ${optionalString hostPlatform.isLinux "patchelf --shrink-rpath $out"}
     '';
   } else "";
 
@@ -102,6 +104,8 @@ stdenv.mkDerivation {
   binPrefix = prefix;
   inherit infixSalt;
 
+  outputs = [ "out" "man" ];
+
   passthru = {
     inherit libc nativeTools nativeLibc nativePrefix isGNU isClang default_cxx_stdlib_compile
             prefix;
@@ -120,7 +124,7 @@ stdenv.mkDerivation {
 
   buildCommand =
     ''
-      mkdir -p $out/bin $out/nix-support
+      mkdir -p $out/bin $out/nix-support $man/nix-support
 
       wrap() {
         local dst="$1"
@@ -231,7 +235,8 @@ stdenv.mkDerivation {
       # Propagate the wrapped cc so that if you install the wrapper,
       # you get tools like gcov, the manpages, etc. as well (including
       # for binutils and Glibc).
-      printWords ${cc} ${cc.man or ""} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages
+      printWords ${cc} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages
+      printWords ${cc.man or ""}  > $man/nix-support/propagated-user-env-packages
 
       printWords ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs
     ''