mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 19:38:40 +00:00
Merging r242722:
------------------------------------------------------------------------ r242722 | dim | 2015-07-20 15:24:40 -0700 (Mon, 20 Jul 2015) | 6 lines Avoid early pipefail exits due to grep failures in stage comparisons. If objects or executables did not contain any RPATH, grep would return nonzero, and the whole stage comparison loop would unexpectedly exit. Fix this by checking the grep result explicitly. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242861 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8715f45dbc
commit
1761bba3dc
@ -343,10 +343,12 @@ function clean_RPATH() {
|
||||
local InstallPath="$1"
|
||||
for Candidate in `find $InstallPath/{bin,lib} -type f`; do
|
||||
if file $Candidate | grep ELF | egrep 'executable|shared object' > /dev/null 2>&1 ; then
|
||||
rpath=`objdump -x $Candidate | grep 'RPATH' | sed -e's/^ *RPATH *//'`
|
||||
if [ -n "$rpath" ]; then
|
||||
newrpath=`echo $rpath | sed -e's/.*\(\$ORIGIN[^:]*\).*/\1/'`
|
||||
chrpath -r $newrpath $Candidate 2>&1 > /dev/null 2>&1
|
||||
if rpath=`objdump -x $Candidate | grep 'RPATH'` ; then
|
||||
rpath=`echo $rpath | sed -e's/^ *RPATH *//'`
|
||||
if [ -n "$rpath" ]; then
|
||||
newrpath=`echo $rpath | sed -e's/.*\(\$ORIGIN[^:]*\).*/\1/'`
|
||||
chrpath -r $newrpath $Candidate 2>&1 > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user