From patchwork Mon Jan 16 01:21:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 715557 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3v1wSl5gB1z9t0m for ; Mon, 16 Jan 2017 12:22:07 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="mZhQVjeZ"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; q=dns; s=default; b=S/LX1mLWrD/ztF6 a0yOFVCSiOJ24pPp7nuC+6JRPf8zbRFRRS46LXYpwGufICbH04EHb+XqqXQDsSaO E9vFl0EHwe+H/+7DeYMiueCbUfgKnc8eDWKftP1USmdgD8siMSsTOuQlQBcWVKMH NaW+jsVmsxFMcZZfBtIPGoIUAoqA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; s=default; bh=F7uNPf6JtO08nU+ql3ct0 pTH5O4=; b=mZhQVjeZAE3EgtgBxcqIDR5BJvtB8CzmOgnRyK9zb+YRzWZWtU4CK uDoapTfEm4hbPFGh9axmU5UUCV+PFZh2xT3AKmFsfdEPG+zGiaxAJn35Q0Kf7jkv HU6gpWQKAuOd8d5Ye9RG8dabxKMA6hoI0/Rs7lMWXQMXEN3PlMslJ8= Received: (qmail 684 invoked by alias); 16 Jan 2017 01:21:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 668 invoked by uid 89); 16 Jan 2017 01:21:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=gofrontend, 244456, MERGE, 4467 X-HELO: mail-io0-f181.google.com Received: from mail-io0-f181.google.com (HELO mail-io0-f181.google.com) (209.85.223.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Jan 2017 01:21:47 +0000 Received: by mail-io0-f181.google.com with SMTP id l66so82035180ioi.1 for ; Sun, 15 Jan 2017 17:21:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XkhQtlYReXV3U6su+umZphdrQapqRX794NgPuYoHLJA=; b=aJ74D4eub4OuzLxOsAmRdebz9HldLX4OkhOaOadjYHpLmNXOO8kWXOoZlHisZkwQGK BGkDDMzyROtM1ioCcyu9owMfHiT3SrZPdEfdpxkIzDGrFJAIZnU6OTT1TSB3KK+y9YuS CyKJf1tb5RndTBRdyJYYF46YNoKJsGb9cemIAAoIqRAjypQyeA33tEbUiPuVH2KbeaG3 aCV2daJANMsr0biBvEKnNTm+vlvtM5PugdVuhVyEC4UuYUjoSbBdoYbzgnVcPdfkNrtc wTdYtlA5bwKHdymUewXVTm2vfEFZYp6jRkOMfEVISTD2Nl9kBATH4wj9KXkTF/3taqZW cVNw== X-Gm-Message-State: AIkVDXKcAWvpFxK4yEtsBNQ0GBB+4oqOaAsV8lV54/L8XlDNijKlwHR7CARlMU8RICsX1kbzNDHSUY9ZG8WVrQ== X-Received: by 10.107.130.35 with SMTP id e35mr30920330iod.7.1484529705992; Sun, 15 Jan 2017 17:21:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.19.241 with HTTP; Sun, 15 Jan 2017 17:21:45 -0800 (PST) In-Reply-To: <878tqco9uv.fsf@linux-m68k.org> References: <878tqco9uv.fsf@linux-m68k.org> From: Ian Lance Taylor Date: Sun, 15 Jan 2017 17:21:45 -0800 Message-ID: Subject: Re: libgo patch committed: Update to Go1.8rc1 To: Andreas Schwab Cc: gcc-patches , "gofrontend-dev@googlegroups.com" On Sun, Jan 15, 2017 at 3:12 AM, Andreas Schwab wrote: > In file included from ../../../libgo/runtime/runtime.h:113:0, > from ../../../libgo/runtime/go-libmain.c:15: > ./runtime.inc:650:8: error: redefinition of 'struct siginfo' > struct siginfo { > ^~~~~~~ > In file included from /usr/include/signal.h:79:0, > from ../../../libgo/runtime/runtime.h:9, > from ../../../libgo/runtime/go-libmain.c:15: > /usr/include/bits/siginfo.h:46:16: note: originally defined here > typedef struct siginfo > ^~~~~~~ > In file included from ../../../libgo/runtime/runtime.h:113:0, > from ../../../libgo/runtime/go-main.c:17: > ./runtime.inc:650:8: error: redefinition of 'struct siginfo' > struct siginfo { > ^~~~~~~ > In file included from /usr/include/signal.h:79:0, > from ../../../libgo/runtime/runtime.h:9, > from ../../../libgo/runtime/go-main.c:17: > /usr/include/bits/siginfo.h:46:16: note: originally defined here > typedef struct siginfo > ^~~~~~~ > In file included from ../../../libgo/runtime/runtime.h:113:0, > from ../../../libgo/runtime/aeshash.c:7: > ./runtime.inc:650:8: error: redefinition of 'struct siginfo' > struct siginfo { > ^~~~~~~ > In file included from /usr/include/signal.h:79:0, > from ../../../libgo/runtime/runtime.h:9, > from ../../../libgo/runtime/aeshash.c:7: > /usr/include/bits/siginfo.h:46:16: note: originally defined here > typedef struct siginfo > ^~~~~~~ > make[4]: *** [libgobegin_a-go-main.o] Error 1 Thanks. I committed this patch, which I think should fix the problem. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Ian Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 244483) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -a28b04adaeff8de61c336374db66b24ed96c30f0 +223cba75b947afc1ee5a13a60c15c66f6ff355c1 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/go/runtime/signal_gccgo.go =================================================================== --- libgo/go/runtime/signal_gccgo.go (revision 244456) +++ libgo/go/runtime/signal_gccgo.go (working copy) @@ -46,15 +46,13 @@ func kill(pid _pid_t, sig uint32) int32 //extern setitimer func setitimer(which int32, new *_itimerval, old *_itimerval) int32 -type siginfo _siginfo_t - type sigTabT struct { flags int32 name string } type sigctxt struct { - info *siginfo + info *_siginfo_t ctxt unsafe.Pointer } @@ -128,9 +126,9 @@ func raiseproc(sig uint32) { //go:nosplit //go:nowritebarrierrec -func sigfwd(fn uintptr, sig uint32, info *siginfo, ctx unsafe.Pointer) { +func sigfwd(fn uintptr, sig uint32, info *_siginfo_t, ctx unsafe.Pointer) { f1 := &[1]uintptr{fn} - f2 := *(*func(uint32, *siginfo, unsafe.Pointer))(unsafe.Pointer(&f1)) + f2 := *(*func(uint32, *_siginfo_t, unsafe.Pointer))(unsafe.Pointer(&f1)) f2(sig, info, ctx) } Index: libgo/go/runtime/signal_sighandler.go =================================================================== --- libgo/go/runtime/signal_sighandler.go (revision 244456) +++ libgo/go/runtime/signal_sighandler.go (working copy) @@ -25,7 +25,7 @@ var crashing int32 // are not allowed. // //go:nowritebarrierrec -func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) { +func sighandler(sig uint32, info *_siginfo_t, ctxt unsafe.Pointer, gp *g) { _g_ := getg() c := sigctxt{info, ctxt} Index: libgo/go/runtime/signal_unix.go =================================================================== --- libgo/go/runtime/signal_unix.go (revision 244456) +++ libgo/go/runtime/signal_unix.go (working copy) @@ -202,7 +202,7 @@ func sigpipe() { // This is called by the signal handler, and the world may be stopped. //go:nosplit //go:nowritebarrierrec -func sigtrampgo(sig uint32, info *siginfo, ctx unsafe.Pointer) { +func sigtrampgo(sig uint32, info *_siginfo_t, ctx unsafe.Pointer) { if sigfwdgo(sig, info, ctx) { return } @@ -446,7 +446,7 @@ func badsignal(sig uintptr, c *sigctxt) // This is called by the signal handler, and the world may be stopped. //go:nosplit //go:nowritebarrierrec -func sigfwdgo(sig uint32, info *siginfo, ctx unsafe.Pointer) bool { +func sigfwdgo(sig uint32, info *_siginfo_t, ctx unsafe.Pointer) bool { if sig >= uint32(len(sigtable)) { return false } Index: libgo/go/runtime/stubs.go =================================================================== --- libgo/go/runtime/stubs.go (revision 244456) +++ libgo/go/runtime/stubs.go (working copy) @@ -485,10 +485,10 @@ func setSigactionHandler(*_sigaction, ui // Retrieve fields from the siginfo_t and ucontext_t pointers passed // to a signal handler using C, as they are often hidden in a union. // Returns and, if available, PC where signal occurred. -func getSiginfo(*siginfo, unsafe.Pointer) (sigaddr uintptr, sigpc uintptr) +func getSiginfo(*_siginfo_t, unsafe.Pointer) (sigaddr uintptr, sigpc uintptr) // Implemented in C for gccgo. -func dumpregs(*siginfo, unsafe.Pointer) +func dumpregs(*_siginfo_t, unsafe.Pointer) // Temporary for gccgo until we port proc.go. //go:linkname getsched runtime.getsched