Skip to content

Commit cba6620

Browse files
author
ian
committed
PR go/78172.
libgo: avoid confusion in upcase_fields in mksysinfo.sh The mksysinfo.sh script could get confused when there were multiple types starting with the same name. I believe this is the underlying cause of GCC PR 78172. Also redirect a grep to /dev/null to avoid extraneous messages during the build. Reviewed-on: https://go-review.googlesource.com/32821 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241868 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent 10a5e06 commit cba6620

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gcc/go/gofrontend/MERGE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
150bca67d8bb4b23009f53ba06e85e306e3960d8
1+
afe0456d25e3c6c0d91a8fd4c0fdfdbaa35cc251
22

33
The first line of this file holds the git revision number of the last
44
merge done from the gofrontend repository.

libgo/mksysinfo.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ grep '^const _EPOLL' gen-sysinfo.go |
188188
grep -v EPOLLET |
189189
sed -e 's/^\(const \)_\(EPOLL[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
190190
# Make sure EPOLLET is positive.
191-
if grep '^const _EPOLLET = [0-9]' gen-sysinfo.go; then
191+
if grep '^const _EPOLLET = [0-9]' gen-sysinfo.go >/dev/null 2>&1; then
192192
grep '^const _EPOLLET ' gen-sysinfo.go |
193193
sed -e 's/^\(const \)_\(EPOLL[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
194194
else
@@ -268,7 +268,7 @@ fi
268268
# is not empty, the structure or type is renamed to $2.
269269
upcase_fields () {
270270
name="$1"
271-
def=`grep "^type $name" gen-sysinfo.go`
271+
def=`grep "^type $name " gen-sysinfo.go`
272272
fields=`echo $def | sed -e 's/^[^{]*{\(.*\)}$/\1/'`
273273
prefix=`echo $def | sed -e 's/{.*//'`
274274
if test "$2" != ""; then

0 commit comments

Comments
 (0)