From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32407 invoked by alias); 20 May 2011 16:37:38 -0000 Received: (qmail 32197 invoked by uid 22791); 20 May 2011 16:37:36 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_40,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 May 2011 16:37:22 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 11CFBFB5; Fri, 20 May 2011 18:37:21 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jH1ebjC0hfhk; Fri, 20 May 2011 18:37:18 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id B1B51FB4; Fri, 20 May 2011 18:37:18 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p4KGbIOQ014543; Fri, 20 May 2011 18:37:18 +0200 (MEST) From: Rainer Orth To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Re: Go patch committed: Update to current Go library References: Date: Fri, 20 May 2011 18:09:00 -0000 In-Reply-To: (Rainer Orth's message of "Fri, 20 May 2011 15:44:07 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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 X-SW-Source: 2011-05/txt/msg01491.txt.bz2 There are more issues on Solaris, though: /vol/gcc/src/hg/trunk/local/libgo/go/net/cgo_bsd.go:13:25: error: expected package /vol/gcc/src/hg/trunk/local/libgo/go/net/cgo_bsd.go:13:30: error: expected ';' or newline after top level declaration /vol/gcc/src/hg/trunk/local/libgo/go/net/cgo_bsd.go:15:1: error: expected declaration There's no C package in gcc libgo, so I'm removing that. But even with that fix, cgo_bsd.go doesn't compile on Solaris: /vol/gcc/src/hg/trunk/local/libgo/go/net/cgo_bsd.go:14:17: error: reference to undefined identifier 'syscall.AI_MASK' It seems that cgo_linux.go should be the default, which is what the patch below does. Btw., dealing with deeply nested automake conditionals is a total mess. What about a patch to move the logic to select the various variants to configure.ac and substitute the result into Makefile? /vol/gcc/src/hg/trunk/local/libgo/go/net/sock_bsd.go:21:55: error: reference to undefined identifier 'syscall.SO_REUSEPORT' SO_REUSEPORT doesn't exist on Solaris. Again, sock_linux.go seems to be generic and should become the default (losing the name, perhaps use cgo_posix instead?). IRIX has the same issue (and more, to be reported separately). This patch (and the mksysinfo.go hack for _FILE/___FILE) allowed me to build libgo.so on Solaris 10/x86. Rainer 2011-05-20 Rainer Orth libgo: * Makefile.am (go_net_sock_file): Use go/net/cgo_linux.go if LIBGO_IS_IRIX or LIBGO_IS_SOLARIS. (go_net_sock_file): Use go/net/sock_linux.go if LIBGO_IS_IRIX or LIBGO_IS_SOLARIS. * Makefile.in: Regenerate. * go/net/cgo_bsd.go: Don't refer to C.int. diff --git a/libgo/Makefile.am b/libgo/Makefile.am --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -669,9 +669,19 @@ if LIBGO_IS_LINUX go_net_cgo_file = go/net/cgo_linux.go go_net_sock_file = go/net/sock_linux.go else +if LIBGO_IS_IRIX +go_net_cgo_file = go/net/cgo_linux.go +go_net_sock_file = go/net/sock_linux.go +else +if LIBGO_IS_SOLARIS +go_net_cgo_file = go/net/cgo_linux.go +go_net_sock_file = go/net/sock_linux.go +else go_net_cgo_file = go/net/cgo_bsd.go go_net_sock_file = go/net/sock_bsd.go endif +endif +endif go_net_files = \ go/net/cgo_unix.go \ diff --git a/libgo/go/net/cgo_bsd.go b/libgo/go/net/cgo_bsd.go --- a/libgo/go/net/cgo_bsd.go +++ b/libgo/go/net/cgo_bsd.go @@ -10,6 +10,6 @@ package net import "syscall" -func cgoAddrInfoMask() C.int { +func cgoAddrInfoMask() int { return syscall.AI_MASK } -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University