Skip to content

Commit

Permalink
Merge branch 'gcc-6' into gcc-7
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Jul 25, 2017
2 parents ca8aa5d + 70d4d22 commit e34a139
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkgs/build-support/cc-wrapper/default.nix
Expand Up @@ -130,6 +130,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 "";

Expand All @@ -145,6 +147,7 @@ stdenv.mkDerivation {
inherit cc shell libc_bin libc_dev libc_lib binutils_bin coreutils_bin;
gnugrep_bin = if nativeTools then "" else gnugrep;

outputs = [ "out" "man" ];

passthru = {
inherit libc nativeTools nativeLibc nativePrefix isGNU isClang default_cxx_stdlib_compile
Expand All @@ -164,7 +167,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"
Expand Down Expand Up @@ -275,7 +278,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).
echo ${cc} ${cc.man or ""} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages
echo ${cc} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages
echo ${cc.man or ""} > $man/nix-support/propagated-user-env-packages
echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs
''
Expand Down

0 comments on commit e34a139

Please sign in to comment.