On Thu, Dec 31, 2020 at 11:48 AM Rainer Orth
<r...@cebitec.uni-bielefeld.de> wrote:
>
> > I've committed a patch to update libgo to the Go 1.16beta1 release.
> >
> > This patch does not include support for the new //go:embed directive
> > that will be available in Go 1.16.1 (https://golang.org/issue/41191)
> > Support for that requires compiler changes, which will come later.
> >
> > As usual with these big updates, I have not included the complete
> > changes in this e-mail message, only changes that are gccgo-specific.
> >
> > Testing this requires some changes to gotools.
> >
> > Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
> > to mainline.
>
> this broke Solaris bootstrap:
>
> * On i386-pc-solaris2.11:
>
> /vol/gcc/src/hg/master/local/libgo/go/runtime/os_gccgo.go:43:12: error: 
> reference to undefined name 'startupRandomData'
>    43 |         if startupRandomData != nil {
>       |            ^
> /vol/gcc/src/hg/master/local/libgo/go/runtime/os_gccgo.go:44:30: error: 
> reference to undefined name 'startupRandomData'
>    44 |                 n := copy(r, startupRandomData)
>       |                              ^
>
>   startupRandomData is only defined in go/runtime/os_linux.go and relies
>   on AT_RANDOM in the aux vector which is Linux-only AFAICT.  For the
>   moment, I've just commented that part of the code since it tries
>   /dev/urandom next.

This problem should be fixed by this patch.  Bootstrapped and ran Go
testsuite on x86_64-pc-linux-gnu.  Committed to mainline.

Ian
0b9ef8be40b8ec530e46779a694e3b115b8e685d
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 6039cbc15f5..e51285c7214 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-6857530fb1662c05a3ce754df2bd9fa5acd3a35b
+fa161cb71880cf80ef53fb4bf35dba8ee01af648
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/libgo/go/runtime/os_linux.go b/libgo/go/runtime/os_linux.go
index 0eebdfa8004..627b6d6d43c 100644
--- a/libgo/go/runtime/os_linux.go
+++ b/libgo/go/runtime/os_linux.go
@@ -178,10 +178,6 @@ func sysargs(argc int32, argv **byte) {
        sysauxv(buf[:])
 }
 
-// startupRandomData holds random bytes initialized at startup. These come from
-// the ELF AT_RANDOM auxiliary vector.
-var startupRandomData []byte
-
 func sysauxv(auxv []uintptr) int {
        var i int
        for ; auxv[i] != _AT_NULL; i += 2 {
diff --git a/libgo/go/runtime/runtime2.go b/libgo/go/runtime/runtime2.go
index 2e550151245..023dac38ec2 100644
--- a/libgo/go/runtime/runtime2.go
+++ b/libgo/go/runtime/runtime2.go
@@ -885,6 +885,10 @@ type forcegcstate struct {
        idle uint32
 }
 
+// startupRandomData holds random bytes initialized at startup. These come from
+// the ELF AT_RANDOM auxiliary vector.
+var startupRandomData []byte
+
 // extendRandom extends the random numbers in r[:n] to the whole slice r.
 // Treats n<0 as n==0.
 func extendRandom(r []byte, n int) {

Reply via email to