# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
$as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
acl_cv_prog_gnu_ld=yes
else
acl_cv_prog_gnu_ld=no
READELF="$prog"
# Sanity check the input file
- if ! ${READELF} -h ${INFILE} | grep 'Class:.*ELF32' >/dev/null 2>/dev/null \
- || ! ${READELF} -h ${INFILE} | grep 'Type:.*EXEC' >/dev/null 2>/dev/null \
- || ! ${READELF} -h ${INFILE} | egrep 'Machine:.*(SPU|17)' >/dev/null 2>/dev/null
+ match="Class:.*ELF32
+Type:.*EXEC
+Machine:.*SPU
+Machine:.*17"
+ if test `${READELF} -h ${INFILE} | grep "${match}" | wc -l` != 3
then
echo "${INFILE}: Does not appear to be an SPU executable"
exit 1
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
acl_cv_prog_gnu_ld=yes
else
acl_cv_prog_gnu_ld=no
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_EGREP])dnl
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
# Check there are compressed DWARF .debug_* sections.
flagstest_compress_debug_sections.check: flagstest_compress_debug_sections
- $(TEST_READELF) -SW $< | egrep ".debug_.* C *" > $@.tmp
+ $(TEST_READELF) -SW $< | grep "\.debug_.* C" > $@.tmp
mv -f $@.tmp $@
# Compare DWARF debug info.
# Check there are compressed DWARF .debug_* sections.
@GCC_TRUE@@NATIVE_LINKER_TRUE@flagstest_compress_debug_sections.check: flagstest_compress_debug_sections
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -SW $< | egrep ".debug_.* C *" > $@.tmp
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -SW $< | grep "\.debug_.* C" > $@.tmp
@GCC_TRUE@@NATIVE_LINKER_TRUE@ mv -f $@.tmp $@
# Compare DWARF debug info.
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
}
match '[0-9a-f]*:.*bnd jmp \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x18>' bnd_ifunc_1.stdout
-APLT_ADDR=$(egrep '[0-9a-f]*:.*bnd jmp \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x18>' bnd_ifunc_1.stdout |
+APLT_ADDR=$($EGREP '[0-9a-f]*:.*bnd jmp \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x18>' bnd_ifunc_1.stdout |
sed -e 's/ *\([0-9a-f]*\):.*/\1/')
match "bnd call $APLT_ADDR" bnd_ifunc_1.stdout
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
file=$1
sym=$2
- found=`egrep $sym $file`
+ found=`$EGREP $sym $file`
if test -n "$found"; then
echo "These local symbols are not discarded in $file:"
echo "$found"
file=$1
sym=$2
- found=`egrep $sym $file`
+ found=`$EGREP $sym $file`
if test -z "$found"; then
echo "This local symbol is discarded in $file:"
echo "$2"
check_alignment ()
{
- if egrep -q "Class:[ \t]+ELF64" "$1"
+ if $EGREP -q "Class:[ \t]+ELF64" "$1"
then
align=8
else
align=4
fi
- if ! egrep -q ".note.gnu.property[ \t]+NOTE.*$align$" "$1"
+ if ! $EGREP -q ".note.gnu.property[ \t]+NOTE.*$align$" "$1"
then
echo "Wrong .note.gnu.property alignment in $1:"
- egrep ".note.gnu.property[ \t]+NOTE.*$align" "$1"
+ $EGREP ".note.gnu.property[ \t]+NOTE.*$align" "$1"
exit 1
fi
}
{
file=$1
- found=`egrep "\.gnu\.version.*" $file`
+ found=`$EGREP "\.gnu\.version.*" $file`
if test -n "$found"; then
echo "These section should not be in $file:"
echo "$found"
set -e
-egrep -q "..debug_mac[ro|info][ ]+*" pr18689.stdout
+$EGREP -q "..debug_mac[ro|info][ ]+*" pr18689.stdout
exit 0
check()
{
- number_of_occurrence=`egrep "$2" ./$1 -o| wc -l`
+ number_of_occurrence=`$EGREP "$2" ./$1 -o| wc -l`
if [ $number_of_occurrence != $3 ]
then
echo "$1: \"$2\" $3: Failed"
check()
{
- number_of_occurrence=`egrep "$2" ./$1 -o | wc -l`
+ number_of_occurrence=`$EGREP "$2" ./$1 -o | wc -l`
if [ $number_of_occurrence != $3 ]
then
echo "$1: \"$2\" $3: Failed"
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
nomatch()
{
- if egrep "$1" "$2" >/dev/null 2>&1; then
+ if $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "found unexpected '$1' in $2"
exit 1
fi
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
nomatch()
{
- if egrep "$1" "$2" >/dev/null 2>&1; then
+ if $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "found unexpected '$1' in $2"
exit 1
fi
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
nomatch()
{
- if egrep "$1" "$2" >/dev/null 2>&1; then
+ if $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "found unexpected '$1' in $2"
exit 1
fi
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
nomatch()
{
- if egrep "$1" "$2" >/dev/null 2>&1; then
+ if $EGREP "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "found unexpected '$1' in $2"
exit 1
fi
check()
{
- if ! egrep -q "$2" "$1"
+ if ! $EGREP -q "$2" "$1"
then
echo "Did not find expected symbol in $1:"
echo " $2"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
$as_echo_n "(cached) " >&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
acl_cv_prog_gnu_ld=yes
else
acl_cv_prog_gnu_ld=no
return
}
- set cmd "$nm --print-armap $tmpdir/$lib | grep \\\ in\\\ | egrep VERS\\\|bar\\\|foo | grep -v ^\\\\. | sort > $tmpdir/nm.out"
+ set cmd "$nm --print-armap $tmpdir/$lib | grep \" in \" | grep \"VERS
+bar
+foo\" | grep -v ^\\\\. | sort > $tmpdir/nm.out"
verbose -log $cmd
catch "exec $cmd" exec_output
if [string match "" $exec_output] then {