* Make gcc work properly again in nix-env installations (e.g., when

used outside of builders).

svn path=/nixpkgs/trunk/; revision=3317
This commit is contained in:
Eelco Dolstra 2005-07-12 14:02:36 +00:00
parent 023e502340
commit 620d5b9d4a
1 changed files with 6 additions and 4 deletions

View File

@ -112,7 +112,9 @@ if test -n "$NIX_GCC_WRAPPER_EXEC_HOOK"; then
. "$NIX_GCC_WRAPPER_EXEC_HOOK" . "$NIX_GCC_WRAPPER_EXEC_HOOK"
fi fi
res=0
@gccProg@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]} 2> $NIX_BUILD_TOP/.gcc.errors || res=$? # Call the real `gcc'. Filter out warnings about unused `-B' flags,
grep -v 'file path prefix' < $NIX_BUILD_TOP/.gcc.errors >&2 || true # since they confuse some programs.
exit $res @gccProg@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]} \
| (grep -v 'file path prefix' || true)
exit ${PIPESTATUS[0]}