Skip to content

Commit e34a139

Browse files
committedJul 25, 2017
Merge branch 'gcc-6' into gcc-7
2 parents ca8aa5d + 70d4d22 commit e34a139

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎pkgs/build-support/cc-wrapper/default.nix

+6-2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ let
130130
# Work around "stdenv-darwin-boot-2 is not allowed to refer to path /nix/store/...-expand-response-params.c"
131131
cp "$src" expand-response-params.c
132132
"$CC" -std=c99 -O3 -o "$out" expand-response-params.c
133+
strip -S $out
134+
${optionalString hostPlatform.isLinux "patchelf --shrink-rpath $out"}
133135
'';
134136
} else "";
135137

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

150+
outputs = [ "out" "man" ];
148151

149152
passthru = {
150153
inherit libc nativeTools nativeLibc nativePrefix isGNU isClang default_cxx_stdlib_compile
@@ -164,7 +167,7 @@ stdenv.mkDerivation {
164167

165168
buildCommand =
166169
''
167-
mkdir -p $out/bin $out/nix-support
170+
mkdir -p $out/bin $out/nix-support $man/nix-support
168171
169172
wrap() {
170173
local dst="$1"
@@ -275,7 +278,8 @@ stdenv.mkDerivation {
275278
# Propagate the wrapped cc so that if you install the wrapper,
276279
# you get tools like gcov, the manpages, etc. as well (including
277280
# for binutils and Glibc).
278-
echo ${cc} ${cc.man or ""} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages
281+
echo ${cc} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages
282+
echo ${cc.man or ""} > $man/nix-support/propagated-user-env-packages
279283
280284
echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs
281285
''

0 commit comments

Comments
 (0)
Please sign in to comment.