From patchwork Mon Oct 31 21:47:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Go patch committed: Implement new syscall package Date: Mon, 31 Oct 2011 11:47:32 -0000 From: Ian Taylor X-Patchwork-Id: 122967 Message-Id: To: Rainer Orth Cc: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Rainer Orth writes: > Ian, > >> I committed this patch which should fix this problem. Bootstrapped and >> ran Go testsuite on x86_64-unknown-linux-gnu. > > thanks, but this is not enough: > > nawk: syntax error at source line 173 > context is > ([^ >>> ]*)$", <<< cparam) == 0) { > nawk: illegal statement at source line 173 > nawk: syntax error at source line 179 > > and there is another instance on l.210. I haven't tried fixing this > myself since I'm fighting with other issues. Whoops, my patch was incomplete. Sorry about that. Fixed by this patch. Bootstrapped on x86_64-unknown-linux-gnu and saw that it did not change the code generated by the script. Committed to mainline. Ian diff -r a880b911554e libgo/go/syscall/mksyscall.awk --- a/libgo/go/syscall/mksyscall.awk Fri Oct 28 15:05:12 2011 -0700 +++ b/libgo/go/syscall/mksyscall.awk Mon Oct 31 14:41:12 2011 -0700 @@ -170,7 +170,7 @@ printf("\t}\n") ++carg - if (match(cargs[carg], "^([^ ]*) ([^ ]*)$", cparam) == 0) { + if (split(cargs[carg], cparam) != 2) { print loc, "bad C parameter:", cargs[carg] | "cat 1>&2" status = 1 next @@ -207,7 +207,7 @@ } usedr = 0 for (goresult = 1; goresults[goresult] != ""; goresult++) { - if (match(goresults[goresult], "^([^ ]*) ([^ ]*)$", goparam) == 0) { + if (split(goresults[goresult], goparam) != 2) { print loc, "bad result:", goresults[goresult] | "cat 1>&2" status = 1 next