From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121243 invoked by alias); 15 Feb 2019 14:26:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 121226 invoked by uid 89); 15 Feb 2019 14:26:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-lj1-f182.google.com Received: from mail-lj1-f182.google.com (HELO mail-lj1-f182.google.com) (209.85.208.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Feb 2019 14:26:57 +0000 Received: by mail-lj1-f182.google.com with SMTP id j19so7741459ljg.5 for ; Fri, 15 Feb 2019 06:26:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golang-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qIrjd6CaYB3B6jhsZhHIi9nPqXwCAPbOXmxXCyuwEsU=; b=CxCbXME/DmxI4QCPiUr5PO1+jP1rG1QSsQ5uQuyLF1rjYPvDL9DQDXlUYqjeVuIA6E QuR/819CGyIV+i89nPrH5Vv59ud7L3tqhX3HH1CEdFmdl+WXELIsW37azsut6gaPcKOI QxhGZW2LoVkZi9J/boQruSRbeb5r0dsrQoXbOz5Vb/5V9KhSIZrT2zdMSDHAcoyQxPmQ Mz920ugBAhierKCWCfVjiQoLKb4euj6Hk1ApQVVhl6JDrjQ7dAIGjeIXRAFvjqT+DYqO zxWrUsnIZiz0WkI8M+AwWafvR870Uk5Z4flbNyRM27uaN+dk3QWb+9/ir+LH+tlEQfHF 7g9w== MIME-Version: 1.0 References: <87a7ixeac2.fsf@igel.home> In-Reply-To: From: Ian Lance Taylor Date: Fri, 15 Feb 2019 14:26:00 -0000 Message-ID: Subject: Re: Go patch committed: Harmonize types referenced by both C and Go To: Rainer Orth Cc: Andreas Schwab , gcc-patches , gofrontend-dev Content-Type: multipart/mixed; boundary="0000000000000fca280581ef911f" X-SW-Source: 2019-02/txt/msg01224.txt.bz2 --0000000000000fca280581ef911f Content-Type: text/plain; charset="UTF-8" Content-length: 1554 On Fri, Feb 15, 2019 at 4:03 AM Rainer Orth wrote: > > Andreas Schwab writes: > > > This breaks non-split-stack builds. > > > > ../../../libgo/runtime/stack.c: In function 'doscanstack1': > > ../../../libgo/runtime/stack.c:113:18: error: passing argument 1 of > > 'scanstackblock' makes integer from pointer without a cast > > [-Werror=int-conversion] > > 113 | scanstackblock(bottom, (uintptr)(top - bottom), gcw); > > | ^~~~~~ > > | | > > | byte * {aka unsigned char *} > > I see the same on Solaris. Even with that fixed by appropriate casts to > uintptr (plus a few more times), Solaris bootstrap is still broken by > that patch: > > /vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c: In function '__go_syscall6': > /vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c:101:10: error: implicit declaration of function 'syscall' [-Werror=implicit-function-declaration] > 101 | return syscall (flag, a1, a2, a3, a4, a5, a6); > | ^~~~~~~ > > This needs to include for the syscall declaration, apart > from the fundamental problem that syscall isn't a stable interface on > Solaris. I committed this patch which should fix the Solaris build. The code was already calling syscall, it was just doing it in a way that the types didn't necessarily match the C declaration. This is the implementation of Go's syscall.Syscall function, so there isn't really anything else we can do. Ian --0000000000000fca280581ef911f Content-Type: text/plain; charset="US-ASCII"; name="patch.txt" Content-Disposition: attachment; filename="patch.txt" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_js65bwxd0 Content-length: 1277 SW5kZXg6IGdjYy9nby9nb2Zyb250ZW5kL01FUkdFCj09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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