diff options
Diffstat (limited to 'pkgs/build-support/cc-wrapper/default.nix')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 9 |
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 905135e7adc..502362514eb 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 '' |