From bd028b24bb1f90e04b5f430568aca710ad786b68 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Thu, 20 Aug 2015 13:50:34 +0300 Subject: [PATCH] gcc 4.9: Fix multi-out fixups - $out/libexec/ now contains subdirectories that we want to patchelf too - $out/libexec/ now contains some .so and a related .la file, which must not be passed to patchelf --- pkgs/development/compilers/gcc/builder.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 8cf04ce1c35..bfe3b6a559f 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -231,14 +231,14 @@ 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 + for i in $(find "$out"/libexec/gcc/*/*/* -type f -a \! -name '*.la'); 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 + for i in "$lib"/lib/{libtsan,libasan,libubsan}.so.*.*.*; do PREV_RPATH=`patchelf --print-rpath "$i"` NEW_RPATH=`echo "$PREV_RPATH" | sed "s,:${out}[^:]*,,g"` patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK