1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
diff -ur a/binutils/embedspu.sh b/binutils/embedspu.sh
--- a/binutils/embedspu.sh 2023-04-06 08:16:35.123366257 -0500
+++ b/binutils/embedspu.sh 2023-04-06 08:17:09.700066333 -0500
@@ -110,7 +110,7 @@
# 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
+ || ! ${READELF} -h ${INFILE} | grep -E 'Machine:.*(SPU|17)' >/dev/null 2>/dev/null
then
echo "${INFILE}: Does not appear to be an SPU executable"
exit 1
diff -ur a/config/lib-ld.m4 b/config/lib-ld.m4
--- a/config/lib-ld.m4 2023-04-06 08:16:35.091365610 -0500
+++ b/config/lib-ld.m4 2023-04-06 08:17:09.704066414 -0500
@@ -14,7 +14,7 @@
AC_DEFUN([AC_LIB_PROG_LD_GNU],
[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 | grep -E '(GNU|with BFD)' 1>&5; then
acl_cv_prog_gnu_ld=yes
else
acl_cv_prog_gnu_ld=no
@@ -88,7 +88,7 @@
# 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 | grep -E '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
diff -ur a/config.rpath b/config.rpath
--- a/config.rpath 2023-04-06 08:16:36.067385369 -0500
+++ b/config.rpath 2023-04-06 08:17:09.704066414 -0500
@@ -143,7 +143,7 @@
ld_shlibs=no
;;
beos*)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ if $LD --help 2>&1 | grep -E ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
@@ -162,9 +162,9 @@
netbsd*)
;;
solaris* | sysv5*)
- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+ if $LD -v 2>&1 | grep -E 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
- elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ elif $LD --help 2>&1 | grep -E ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
@@ -174,7 +174,7 @@
hardcode_direct=yes
;;
*)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ if $LD --help 2>&1 | grep -E ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
diff -ur a/gold/testsuite/bnd_ifunc_1.sh b/gold/testsuite/bnd_ifunc_1.sh
--- a/gold/testsuite/bnd_ifunc_1.sh 2023-04-06 08:16:36.123386503 -0500
+++ b/gold/testsuite/bnd_ifunc_1.sh 2023-04-06 08:17:09.704066414 -0500
@@ -24,13 +24,13 @@
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
}
match '[0-9a-f]*:.*bnd jmpq \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x18>' bnd_ifunc_1.stdout
-APLT_ADDR=$(egrep '[0-9a-f]*:.*bnd jmpq \*0x[0-9a-f]*\(%rip\) *# [0-9a-f]* <_GLOBAL_OFFSET_TABLE_\+0x18>' bnd_ifunc_1.stdout |
+APLT_ADDR=$(grep -E '[0-9a-f]*:.*bnd jmpq \*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 callq $APLT_ADDR" bnd_ifunc_1.stdout
diff -ur a/gold/testsuite/bnd_ifunc_2.sh b/gold/testsuite/bnd_ifunc_2.sh
--- a/gold/testsuite/bnd_ifunc_2.sh 2023-04-06 08:16:36.139386827 -0500
+++ b/gold/testsuite/bnd_ifunc_2.sh 2023-04-06 08:17:09.708066495 -0500
@@ -24,7 +24,7 @@
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
diff -ur a/gold/testsuite/bnd_plt_1.sh b/gold/testsuite/bnd_plt_1.sh
--- a/gold/testsuite/bnd_plt_1.sh 2023-04-06 08:16:36.131386665 -0500
+++ b/gold/testsuite/bnd_plt_1.sh 2023-04-06 08:17:09.708066495 -0500
@@ -24,7 +24,7 @@
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
diff -ur a/gold/testsuite/discard_locals_test.sh b/gold/testsuite/discard_locals_test.sh
--- a/gold/testsuite/discard_locals_test.sh 2023-04-06 08:16:36.119386422 -0500
+++ b/gold/testsuite/discard_locals_test.sh 2023-04-06 08:17:09.708066495 -0500
@@ -32,7 +32,7 @@
file=$1
sym=$2
- found=`egrep $sym $file`
+ found=`grep -E $sym $file`
if test -n "$found"; then
echo "These local symbols are not discarded in $file:"
echo "$found"
@@ -45,7 +45,7 @@
file=$1
sym=$2
- found=`egrep $sym $file`
+ found=`grep -E $sym $file`
if test -z "$found"; then
echo "This local symbol is discarded in $file:"
echo "$2"
diff -ur a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
--- a/gold/testsuite/Makefile.am 2023-04-06 08:16:36.131386665 -0500
+++ b/gold/testsuite/Makefile.am 2023-04-06 08:17:09.712066576 -0500
@@ -1650,7 +1650,7 @@
# 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 -E ".debug_.* C *" > $@.tmp
mv -f $@.tmp $@
# Compare DWARF debug info.
diff -ur a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
--- a/gold/testsuite/Makefile.in 2023-04-06 08:16:36.123386503 -0500
+++ b/gold/testsuite/Makefile.in 2023-04-06 08:17:09.720066738 -0500
@@ -8577,7 +8577,7 @@
# 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 -E ".debug_.* C *" > $@.tmp
@GCC_TRUE@@NATIVE_LINKER_TRUE@ mv -f $@.tmp $@
# Compare DWARF debug info.
diff -ur a/gold/testsuite/no_version_test.sh b/gold/testsuite/no_version_test.sh
--- a/gold/testsuite/no_version_test.sh 2023-04-06 08:16:36.119386422 -0500
+++ b/gold/testsuite/no_version_test.sh 2023-04-06 08:17:09.720066738 -0500
@@ -32,7 +32,7 @@
{
file=$1
- found=`egrep "\.gnu\.version.*" $file`
+ found=`grep -E "\.gnu\.version.*" $file`
if test -n "$found"; then
echo "These section should not be in $file:"
echo "$found"
diff -ur a/gold/testsuite/pr18689.sh b/gold/testsuite/pr18689.sh
--- a/gold/testsuite/pr18689.sh 2023-04-06 08:16:36.131386665 -0500
+++ b/gold/testsuite/pr18689.sh 2023-04-06 08:17:09.720066738 -0500
@@ -23,6 +23,6 @@
set -e
-egrep -q "..debug_mac[ro|info][ ]+*" pr18689.stdout
+grep -E -q "..debug_mac[ro|info][ ]+*" pr18689.stdout
exit 0
diff -ur a/gold/testsuite/split_i386.sh b/gold/testsuite/split_i386.sh
--- a/gold/testsuite/split_i386.sh 2023-04-06 08:16:36.115386341 -0500
+++ b/gold/testsuite/split_i386.sh 2023-04-06 08:17:09.724066819 -0500
@@ -24,7 +24,7 @@
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
@@ -32,7 +32,7 @@
nomatch()
{
- if egrep "$1" "$2" >/dev/null 2>&1; then
+ if grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "found unexpected '$1' in $2"
exit 1
fi
diff -ur a/gold/testsuite/split_s390.sh b/gold/testsuite/split_s390.sh
--- a/gold/testsuite/split_s390.sh 2023-04-06 08:16:36.115386341 -0500
+++ b/gold/testsuite/split_s390.sh 2023-04-06 08:17:09.724066819 -0500
@@ -24,7 +24,7 @@
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
@@ -32,7 +32,7 @@
nomatch()
{
- if egrep "$1" "$2" >/dev/null 2>&1; then
+ if grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "found unexpected '$1' in $2"
exit 1
fi
diff -ur a/gold/testsuite/split_x32.sh b/gold/testsuite/split_x32.sh
--- a/gold/testsuite/split_x32.sh 2023-04-06 08:16:36.119386422 -0500
+++ b/gold/testsuite/split_x32.sh 2023-04-06 08:17:09.724066819 -0500
@@ -25,7 +25,7 @@
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
@@ -33,7 +33,7 @@
nomatch()
{
- if egrep "$1" "$2" >/dev/null 2>&1; then
+ if grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "found unexpected '$1' in $2"
exit 1
fi
diff -ur a/gold/testsuite/split_x86_64.sh b/gold/testsuite/split_x86_64.sh
--- a/gold/testsuite/split_x86_64.sh 2023-04-06 08:16:36.115386341 -0500
+++ b/gold/testsuite/split_x86_64.sh 2023-04-06 08:17:09.728066900 -0500
@@ -24,7 +24,7 @@
match()
{
- if ! egrep "$1" "$2" >/dev/null 2>&1; then
+ if ! grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "could not find '$1' in $2"
exit 1
fi
@@ -32,7 +32,7 @@
nomatch()
{
- if egrep "$1" "$2" >/dev/null 2>&1; then
+ if grep -E "$1" "$2" >/dev/null 2>&1; then
echo 1>&2 "found unexpected '$1' in $2"
exit 1
fi
diff -ur a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp
--- a/ld/testsuite/ld-elfvers/vers.exp 2023-04-06 08:16:35.139366581 -0500
+++ b/ld/testsuite/ld-elfvers/vers.exp 2023-04-06 08:17:09.728066900 -0500
@@ -115,7 +115,7 @@
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 -E VERS\\\|bar\\\|foo | grep -v ^\\\\. | sort > $tmpdir/nm.out"
verbose -log $cmd
catch "exec $cmd" exec_output
if [string match "" $exec_output] then {
|