gcc: fixup references. ToDo: port to gcc-4.9

This commit is contained in:
Vladimír Čunát 2014-08-30 15:54:07 +02:00
parent 38ba4eb693
commit b8c7091335
2 changed files with 13 additions and 7 deletions

View file

@ -231,10 +231,17 @@ postInstall() {
rm -rf $out/bin/gccbug
# Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
for i in $out/libexec/gcc/*/*/*; do
if PREV_RPATH=`patchelf --print-rpath $i`; then
patchelf --set-rpath `echo $PREV_RPATH | sed 's,:[^:]*bootstrap-tools/lib,,'` $i
fi
for i in "$out"/libexec/gcc/*/*/*; do
PREV_RPATH=`patchelf --print-rpath "$i"`
NEW_RPATH=`echo "$PREV_RPATH" | sed 's,:[^:]*bootstrap-tools/lib,,g'`
patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK
done
# For some reason the libs retain RPATH to $out
for i in "$lib"/lib/{libtsan.so.0.0.0,libasan.so.0.0.0}; do
PREV_RPATH=`patchelf --print-rpath "$i"`
NEW_RPATH=`echo "$PREV_RPATH" | sed "s,:${out}[^:]*,,g"`
patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK
done
# Get rid of some "fixed" header files

View file

@ -214,10 +214,9 @@ stdenv.mkDerivation ({
inherit patches;
outputs = [ "out" "lib" ];
outputs = [ "out" "lib" "doc" ];
setOutputFlags = false;
NIX_NO_SELF_RPATH = true;
libc_dev = stdenv.gcc.libc_dev;