Patchwork libgo patch committed: Add Solaris support to mksysinfo.sh

login
register
mail settings
Submitter Ian Taylor
Date Jan. 13, 2011, 8:24 p.m.
Message ID <mcrmxn4o8lm.fsf@google.com>
Download mbox | patch
Permalink /patch/78809/
State New
Headers show

Comments

Ian Taylor - Jan. 13, 2011, 8:24 p.m.
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> Ian Lance Taylor <iant@google.com> writes:
>
>> This patch, based on one from Rainer Orth, adds some Solaris support to
>> mksysinfo.sh, the shell script which reads target header files to
>> construct Go system struct and type definitions.  Bootstrapped and ran
>> Go testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.
>
> This is not sufficient: with set -e, the script still aborts at the
>
> regs=`grep '^type _user_regs_struct struct' gen-sysinfo.go`

Oh yeah, fixed with this patch.  Bootstrapped on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

Patch

diff -r daa5d01ee942 libgo/mksysinfo.sh
--- a/libgo/mksysinfo.sh	Wed Jan 12 22:14:51 2011 -0800
+++ b/libgo/mksysinfo.sh	Thu Jan 13 12:16:56 2011 -0800
@@ -207,7 +207,7 @@ 
 # The registers returned by PTRACE_GETREGS.  This is probably
 # GNU/Linux specific; it should do no harm if there is no
 # _user_regs_struct.
-regs=`grep '^type _user_regs_struct struct' gen-sysinfo.go`
+regs=`grep '^type _user_regs_struct struct' gen-sysinfo.go || true`
 if test "$regs" != ""; then
   regs=`echo $regs | sed -e 's/type _user_regs_struct struct //' -e 's/[{}]//g'`
   regs=`echo $regs | sed -e s'/^ *//'`