public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@golang.org>
To: Eric Botcazou <botcazou@adacore.com>,
	Rainer Orth <ro@cebitec.uni-bielefeld.de>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	 gofrontend-dev <gofrontend-dev@googlegroups.com>
Subject: Re: libgo patch committed: Update to Go1.18beta2 release
Date: Wed, 16 Feb 2022 12:20:36 -0800	[thread overview]
Message-ID: <CAOyqgcXtetfqJ5wgLAzQ1d9F_MP3_TV4AG9kbroF6ceO9cs4dg@mail.gmail.com> (raw)
In-Reply-To: <2618374.mvXUDI8C0e@fomalhaut>

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

On Tue, Feb 15, 2022 at 1:19 AM Eric Botcazou <botcazou@adacore.com> wrote:
>
> > I've committed a change to update libgo to the Go1.18beta2 release.
>
> This apparently broke the build on SPARC/Solaris 11.3:

I've committed this patch to fix these problems.  Bootstrapped and ran
Go testsuite on x86_64-pc-linux-gnu and x86_64-solaris.

Ian

p

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 4026 bytes --]

24ca97325cab7bc454c785d55f37120fe7ea6f74
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 745132a3d9d..3742414c828 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-0af68c0552341a44f1fb12301f9eff954b9dde88
+3742e8a154bfec805054b4ebf0809f12dc7694da
 
 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/net/fcntl_libc_test.go b/libgo/go/net/fcntl_libc_test.go
index f59a1aa33ba..c935c4540cf 100644
--- a/libgo/go/net/fcntl_libc_test.go
+++ b/libgo/go/net/fcntl_libc_test.go
@@ -6,7 +6,10 @@
 
 package net
 
-import "syscall"
+import (
+	"syscall"
+	_ "unsafe"
+)
 
 // Use a helper function to call fcntl.  This is defined in C in
 // libgo/runtime.
diff --git a/libgo/go/os/signal/internal/pty/pty.go b/libgo/go/os/signal/internal/pty/pty.go
index e5ee3f6dc01..01c3908becf 100644
--- a/libgo/go/os/signal/internal/pty/pty.go
+++ b/libgo/go/os/signal/internal/pty/pty.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build (aix || darwin || dragonfly || freebsd || hurd || (linux && !android) || netbsd || openbsd) && cgo
+//go:build (aix || darwin || dragonfly || freebsd || hurd || (linux && !android) || netbsd || openbsd || solaris) && cgo
 
 // Package pty is a simple pseudo-terminal package for Unix systems,
 // implemented by calling C functions via cgo.
diff --git a/libgo/go/runtime/os3_solaris.go b/libgo/go/runtime/os3_solaris.go
index ec23ce2cc0c..6c825746fbc 100644
--- a/libgo/go/runtime/os3_solaris.go
+++ b/libgo/go/runtime/os3_solaris.go
@@ -36,6 +36,14 @@ func solarisExecutablePath() string {
 	return executablePath
 }
 
+func setProcessCPUProfiler(hz int32) {
+	setProcessCPUProfilerTimer(hz)
+}
+
+func setThreadCPUProfiler(hz int32) {
+	setThreadCPUProfilerHz(hz)
+}
+
 //go:nosplit
 func validSIGPROF(mp *m, c *sigctxt) bool {
 	return true
diff --git a/libgo/go/runtime/stubs2.go b/libgo/go/runtime/stubs2.go
index 0b9e60587e1..587109209d1 100644
--- a/libgo/go/runtime/stubs2.go
+++ b/libgo/go/runtime/stubs2.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build !aix && !darwin && !js && !openbsd && !plan9 && !solaris && !windows
+//go:build !js && !plan9 && !windows
 
 package runtime
 
diff --git a/libgo/go/syscall/exec_bsd.go b/libgo/go/syscall/exec_bsd.go
index c05ae138811..ff88bc45366 100644
--- a/libgo/go/syscall/exec_bsd.go
+++ b/libgo/go/syscall/exec_bsd.go
@@ -143,13 +143,13 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr
 	// User and groups
 	if cred := sys.Credential; cred != nil {
 		ngroups := len(cred.Groups)
-		var groups *Gid_t
+		var groups unsafe.Pointer
 		if ngroups > 0 {
 			gids := make([]Gid_t, ngroups)
 			for i, v := range cred.Groups {
 				gids[i] = Gid_t(v)
 			}
-			groups = &gids[0]
+			groups = unsafe.Pointer(&gids[0])
 		}
 		if !cred.NoSetGroups {
 			err1 = raw_setgroups(ngroups, groups)
diff --git a/libgo/go/syscall/export_unix_test.go b/libgo/go/syscall/export_unix_test.go
index 184eb84c0b1..bd904c70f36 100644
--- a/libgo/go/syscall/export_unix_test.go
+++ b/libgo/go/syscall/export_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build dragonfly || freebsd || hurd || linux || netbsd || openbsd
+//go:build dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris
 
 package syscall
 
diff --git a/libgo/go/syscall/syscall_solaris.go b/libgo/go/syscall/syscall_solaris.go
index 13c60a493d9..673ba8223fc 100644
--- a/libgo/go/syscall/syscall_solaris.go
+++ b/libgo/go/syscall/syscall_solaris.go
@@ -6,8 +6,6 @@ package syscall
 
 import "unsafe"
 
-const _F_DUP2FD_CLOEXEC = F_DUP2FD_CLOEXEC
-
 func (ts *Timestruc) Unix() (sec int64, nsec int64) {
 	return int64(ts.Sec), int64(ts.Nsec)
 }

  parent reply	other threads:[~2022-02-16 20:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-11 23:01 Ian Lance Taylor
2022-02-15  9:19 ` Eric Botcazou
2022-02-15 15:39   ` Ian Lance Taylor
2022-02-16 20:20   ` Ian Lance Taylor [this message]
2022-02-17 11:41     ` Eric Botcazou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOyqgcXtetfqJ5wgLAzQ1d9F_MP3_TV4AG9kbroF6ceO9cs4dg@mail.gmail.com \
    --to=iant@golang.org \
    --cc=botcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gofrontend-dev@googlegroups.com \
    --cc=ro@cebitec.uni-bielefeld.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).