crossgcc: close stdin when search_tool() execute programs.
bzip2 --version |grep -c will wait for input on stdin. ./buildgcc will hang because of this. Add `cat /dev/null |` close the stdin. Change-Id: I2a8b08a4d90ca7a89705923d5b68ba6ac13f29b3 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-on: http://review.coreboot.org/9605 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
7f845b3ebe
commit
d268ab32e3
|
@ -108,7 +108,7 @@ searchtool()
|
||||||
fi
|
fi
|
||||||
for i in "$1" "g$1" "gnu$1"; do
|
for i in "$1" "g$1" "gnu$1"; do
|
||||||
if test -x "`which $i 2>/dev/null`"; then
|
if test -x "`which $i 2>/dev/null`"; then
|
||||||
if test `$i --version 2>&1 |grep -c "$search"` \
|
if test `cat /dev/null | $i --version 2>&1 |grep -c "$search"` \
|
||||||
-gt 0; then
|
-gt 0; then
|
||||||
echo $i
|
echo $i
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue