* gcc-wrapper: Propagate the wrapped gcc, binutils and glibc to the

user environment.  (NIXPKGS-63)

svn path=/nixpkgs/branches/stdenv-updates/; revision=10664
This commit is contained in:
Eelco Dolstra 2008-02-13 19:41:37 +00:00
parent 908d8286ce
commit 89815eb9a0
3 changed files with 26 additions and 18 deletions

View File

@ -53,13 +53,13 @@ doSubstitute() {
# Can't use substitute() here, because replace may not have been
# built yet (in the bootstrap).
sed \
-e "s^@out@^$out^" \
-e "s^@shell@^$shell^" \
-e "s^@gcc@^$gcc^" \
-e "s^@gccProg@^$gccProg^" \
-e "s^@binutils@^$binutils^" \
-e "s^@libc@^$libc^" \
-e "s^@ld@^$ldPath/ld^" \
-e "s^@out@^$out^g" \
-e "s^@shell@^$shell^g" \
-e "s^@gcc@^$gcc^g" \
-e "s^@gccProg@^$gccProg^g" \
-e "s^@binutils@^$binutils^g" \
-e "s^@libc@^$libc^g" \
-e "s^@ld@^$ldPath/ld^g" \
< "$src" > "$dst"
}
@ -111,3 +111,11 @@ doSubstitute "$addFlags" "$out/nix-support/add-flags.sh"
doSubstitute "$setupHook" "$out/nix-support/setup-hook"
cp -p $utils $out/nix-support/utils.sh
# Propagate the wrapped gcc so that if you install the wrapper, you get
# tools like gcov, the manpages, etc. as well (including for binutils
# and Glibc).
if test -z "$nativeTools"; then
echo $gcc $binutils $libc > $out/nix-support/propagated-user-env-packages
fi

View File

@ -14,7 +14,7 @@ preConfigure() {
for i in configure io/ftwtest-sh; do
# Can't use substituteInPlace here because replace hasn't been
# built yet in the bootstrap.
sed -i "$i" -e "s^/bin/pwd^$(type -tP pwd)^"
sed -i "$i" -e "s^/bin/pwd^$PWD_P^g"
done
# In the glibc 2.6/2.7 tarballs C-translit.h is a little bit older

View File

@ -11,14 +11,14 @@ mkdir $out
# Can't use substitute() here, because replace may not have been
# built yet (in the bootstrap).
sed \
-e "s^@preHook@^$preHook^" \
-e "s^@postHook@^$postHook^" \
-e "s^@initialPath@^$initialPath^" \
-e "s^@gcc@^$gcc^" \
-e "s^@shell@^$shell^" \
-e "s^@param1@^$p1^" \
-e "s^@param2@^$p2^" \
-e "s^@param3@^$p3^" \
-e "s^@param4@^$p4^" \
-e "s^@param5@^$p5^" \
-e "s^@preHook@^$preHook^g" \
-e "s^@postHook@^$postHook^g" \
-e "s^@initialPath@^$initialPath^g" \
-e "s^@gcc@^$gcc^g" \
-e "s^@shell@^$shell^g" \
-e "s^@param1@^$p1^g" \
-e "s^@param2@^$p2^g" \
-e "s^@param3@^$p3^g" \
-e "s^@param4@^$p4^g" \
-e "s^@param5@^$p5^g" \
< "$setup" > "$out/setup"