public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Ian Lance Taylor <iant@golang.org>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	 gofrontend-dev <gofrontend-dev@googlegroups.com>
Subject: Re: libgo patch committed: Update to Go1.14beta1
Date: Wed, 22 Jan 2020 20:35:00 -0000	[thread overview]
Message-ID: <yddzhef5jq6.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <CAOyqgcVuWBiyja1pSjq=9pDbdxQi77Zm395_wuzT4kWAgD-Ewg@mail.gmail.com>	(Ian Lance Taylor's message of "Tue, 21 Jan 2020 23:53:53 -0800")

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

Hi Ian,

> I've committed a patch to update libgo to Go 1.14beta1.  As usual with
> these updates the patch is far too large to include in this e-mail
> message.  I've included the diffs for gccgo-specific files.
> Bootstrapped and ran Go tests on x86_64-pc-linux-gnu.  Committed to
> mainline.

the patch broke Solaris bootstrap:

/vol/gcc/src/hg/master/local/libgo/go/runtime/os_only_solaris.go:11:1: error: redefinition of 'getncpu'
   11 | func getncpu() int32 {
      | ^
/vol/gcc/src/hg/master/local/libgo/go/runtime/os3_solaris.go:20:1: note: previous definition of 'getncpu' was here
   20 | func getncpu() int32 {
      | ^

There are 3 definitions in the Solaris/Illumos space:

* os_only_solaris.go is guarded by !illumos

* os3_solaris.go has no explicit guard

* illumos hat its own one in os_illumos.go

so the os3_solaris.go one can go.

/vol/gcc/src/hg/master/local/libgo/go/runtime/stubs2.go:40:3: error: osinit is not defined
   40 | //go:linkname osinit runtime.osinit
      |   ^

Upstream has a definition in os3_solaris.go.

The following patch allows compilation to succeed.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libgo.patch --]
[-- Type: text/x-patch, Size: 506 bytes --]

diff --git a/libgo/go/runtime/os3_solaris.go b/libgo/go/runtime/os3_solaris.go
--- a/libgo/go/runtime/os3_solaris.go
+++ b/libgo/go/runtime/os3_solaris.go
@@ -17,12 +17,11 @@ func getPageSize() int32
 //extern sysconf
 func sysconf(int32) _C_long
 
-func getncpu() int32 {
-	n := int32(sysconf(__SC_NPROCESSORS_ONLN))
-	if n < 1 {
-		return 1
+func osinit() {
+	ncpu = getncpu()
+	if physPageSize == 0 {
+		physPageSize = uintptr(getPageSize())
 	}
-	return n
 }
 
 func sysargs(argc int32, argv **byte) {

  reply	other threads:[~2020-01-22 20:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22  8:13 Ian Lance Taylor
2020-01-22 20:35 ` Rainer Orth [this message]
2020-01-23  0:07   ` Ian Lance Taylor
2020-01-23 20:14     ` Rainer Orth
2020-01-23 19:40 ` Maciej W. Rozycki
2020-01-24  5:59   ` Ian Lance Taylor
2020-02-01 13:38 ` Andreas Schwab
2020-02-03  8:32   ` David Abdurachmanov
2020-02-04  2:15   ` Ian Lance Taylor
2020-02-02 10:27 ` Andreas Schwab
2020-02-04  2:17   ` Ian Lance Taylor
2020-02-05  4:40     ` Andrew Pinski

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=yddzhef5jq6.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gofrontend-dev@googlegroups.com \
    --cc=iant@golang.org \
    /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).