Skip to content

Commit

Permalink
PR go/78172.
Browse files Browse the repository at this point in the history
    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
  • Loading branch information
ian committed Nov 5, 2016
1 parent 10a5e06 commit cba6620
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gcc/go/gofrontend/MERGE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
150bca67d8bb4b23009f53ba06e85e306e3960d8
afe0456d25e3c6c0d91a8fd4c0fdfdbaa35cc251

The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
4 changes: 2 additions & 2 deletions libgo/mksysinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ grep '^const _EPOLL' gen-sysinfo.go |
grep -v EPOLLET |
sed -e 's/^\(const \)_\(EPOLL[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
# Make sure EPOLLET is positive.
if grep '^const _EPOLLET = [0-9]' gen-sysinfo.go; then
if grep '^const _EPOLLET = [0-9]' gen-sysinfo.go >/dev/null 2>&1; then
grep '^const _EPOLLET ' gen-sysinfo.go |
sed -e 's/^\(const \)_\(EPOLL[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
else
Expand Down Expand Up @@ -268,7 +268,7 @@ fi
# is not empty, the structure or type is renamed to $2.
upcase_fields () {
name="$1"
def=`grep "^type $name" gen-sysinfo.go`
def=`grep "^type $name " gen-sysinfo.go`
fields=`echo $def | sed -e 's/^[^{]*{\(.*\)}$/\1/'`
prefix=`echo $def | sed -e 's/{.*//'`
if test "$2" != ""; then
Expand Down

0 comments on commit cba6620

Please sign in to comment.