On Thu, Jan 11, 2018 at 8:56 AM, Rainer Orth
<r...@cebitec.uni-bielefeld.de> wrote:
>
>>> This patch updates libgo to the Go1.10beta1 release.  The final Go
>>> 1.10 release is expected around February 1, so it's not clear how the
>>> release timing is going to work with GCC 8.  In any case this updates
>>> GCC to something pretty close to the final Go 1.10 release.
>>>
>>> A few changes to the frontend were required to match changes in the
>>> runtime map code, and to handle some no-writebarrier cases in the
>>> runtime package.
>>>
>>> As usual with these updates the complete patch is too large to include
>>> in this e-mail message.  I've just included the changes to
>>> gccgo-specific code.
>>>
>>> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
>>> to mainline.
>>
>> the patch broke Solaris bootstrap:
>>
>> mv: cannot stat 'os/signal/internal/pty.s-gox.tmp': No such file or directory
>> make[4]: *** [Makefile:3348: os/signal/internal/pty.s-gox] Error 1
>> make[4]: *** Waiting for unfinished jobs....
>>
>> Fixed trivially as follows, which allowed the build to complete.  make
>> check still running...
>
> there's another build failure, only affecting Solaris 10:
>
> /vol/gcc/src/hg/trunk/local/libgo/go/os/user/cgo_lookup_unix.go:274:20: 
> error: integer constant overflow
>   sp.Pw_uid = 1<<32 - 2
>                     ^
> /vol/gcc/src/hg/trunk/local/libgo/go/os/user/cgo_lookup_unix.go:275:20: 
> error: integer constant overflow
>   sp.Pw_gid = 1<<32 - 3
>                     ^
> make[8]: *** [Makefile:3313: os/user.lo] Error 1
>
> sysinfo.go has
>
> type Passwd struct { Pw_name *int8; Pw_passwd *int8; Pw_uid int32; Pw_gid 
> int32; Pw_age *int8; Pw_comment *int8; Pw_gecos *int8; Pw_dir *int8; Pw_shell 
> *int8; }
>
> while on S11 there is
>
> type Passwd struct { Pw_name *int8; Pw_passwd *int8; Pw_uid uint32; Pw_gid 
> uint32; Pw_age *int8; Pw_comment *int8; Pw_gecos *int8; Pw_dir *int8; 
> Pw_shell *int8; }

I fixed this by clobbering the types used in Go, as follows.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu, committed to
mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 256874)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-8195b62d353026256037fa44409c4ad95762e6b7
+bce8720d4eb662f31026e9c7be6ce4d0aeb4ae3b
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/mksysinfo.sh
===================================================================
--- libgo/mksysinfo.sh  (revision 256593)
+++ libgo/mksysinfo.sh  (working copy)
@@ -685,9 +685,13 @@ if ! grep "const EAI_OVERFLOW " ${OUT} >
 fi
 
 # The passwd struct.
+# Force uid and gid from int32 to uint32 for consistency; they are
+# int32 on Solaris 10 but uint32 everywhere else including Solaris 11.
 grep '^type _passwd ' gen-sysinfo.go | \
     sed -e 's/_passwd/Passwd/' \
       -e 's/ pw_/ Pw_/g' \
+      -e 's/ Pw_uid int32/ Pw_uid uint32/' \
+      -e 's/ Pw_gid int32/ Pw_gid uint32/' \
     >> ${OUT}
 
 # The group struct.

Reply via email to