From patchwork Thu Mar 15 14:32:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 147030 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]) by ozlabs.org (Postfix) with SMTP id 9EE8FB6EF4 for ; Fri, 16 Mar 2012 01:33:17 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1332426798; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Cc:Subject:References:Date:In-Reply-To: Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=IbCyL/OYXmd9tdjgnEI7IKkTqa8=; b=yICCxBJ0RfXyrYeQEp33FRICg3Ur7MNh95c2oYCOS5TovkkAs5o0caGONQ4ucr BPWaSHtoGH1BM9sjGOCntdiLmwS4ASff7d8TLjnovjQtM+ryKwPlsk5drRpANHNA JFXlZKOLiO+3yEhxRLV8w38A+lQzH6VrPi6NHwE/8BcQE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=xTg8jbnP1Io/ZN9wYCreeORvMjsuLH4b/tFD/ghu+6GBJ7ZBz0b5V9ckSkr5Aj 07FgK86VKd0EFCIXaNaiOFMPaNVWWTC5yyanzHEyDnEVaCgRHk72523/VdXyCWJu 6DOL0UaK4a0W3VeJmCs1Jb2NfzzXXCwAabC4Gmq9s44V8=; Received: (qmail 14226 invoked by alias); 15 Mar 2012 14:33:13 -0000 Received: (qmail 14199 invoked by uid 22791); 15 Mar 2012 14:33:10 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS 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; Thu, 15 Mar 2012 14:32:53 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 985E8695; Thu, 15 Mar 2012 15:32:50 +0100 (CET) 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 atYsBTGoqzh9; Thu, 15 Mar 2012 15:32:44 +0100 (CET) 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 651FB691; Thu, 15 Mar 2012 15:32:44 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id q2FEWirJ026746; Thu, 15 Mar 2012 15:32:44 +0100 (MET) From: Rainer Orth To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org Subject: Re: Remove obsolete IRIX 6.5 support References: Date: Thu, 15 Mar 2012 15:32:43 +0100 In-Reply-To: (Ian Lance Taylor's message of "Mon, 12 Mar 2012 11:22:03 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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 Ian Lance Taylor writes: > Rainer Orth writes: > >> * I'm removing IRIX-specific parts of libgo. Given that libgo is >> imported from upstream (and supposed to work or made work on the 4.7 >> branch), I don't know if this a good idea. > > Yeah, it's not. Just send me the mainline patches to libgo rather than > applying them yourself, I'll apply them to the upstream repository and > commit to mainline. Here's the libgo part of the patch. Given that IRIX 6.5 Go support remains on the 4.7 branch (and I hope to fix it up sufficiently to be useful after 4.7.0 is released), I wonder if it's a good idea to apply it upstream or better handle libgo like the other upstream libraries (boehm-gc, libffi) which I didn't touch for the removal. Thanks. Rainer 2012-03-10 Rainer Orth libgo: * configure.ac (is_irix): Remove. (mips-sgi-irix6.5*): Don't set OSCFLAGS. * configure: Regenerate. * Makefile.am [LIBGO_IS_IRIX]: Remove. * Makefile.in: Regenerate. * mksysinfo.sh [__sgi__]: Remove. (__timespec): Remove. * go/net/http/cgi/host.go (osDefaultInheritEnv): Remove irix handling. * go/syscall/socket_irix.go: Remove. * go/time/zoneinfo_unix.go (zoneDirs): Remove IRIX 6 support. diff --git a/libgo/Makefile.am b/libgo/Makefile.am --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -646,12 +646,6 @@ go_net_sock_file = go/net/sock_linux.go go_net_sockopt_file = go/net/sockopt_linux.go go_net_sockoptip_file = go/net/sockoptip_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 -go_net_sockopt_file = go/net/sockopt_linux.go -go_net_sockoptip_file = go/net/sockoptip_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 @@ -671,7 +665,6 @@ go_net_sockoptip_file = go/net/sockoptip endif endif endif -endif if LIBGO_IS_LINUX go_net_sendfile_file = go/net/sendfile_linux.go @@ -754,9 +747,6 @@ else if LIBGO_IS_SOLARIS go_os_sys_file = go/os/sys_uname.go else -if LIBGO_IS_IRIX -go_os_sys_file = go/os/sys_uname.go -else if LIBGO_IS_RTEMS go_os_sys_file = go/os/sys_uname.go else @@ -764,7 +754,6 @@ go_os_sys_file = go/os/sys_bsd.go endif endif endif -endif if LIBGO_IS_SOLARIS go_os_stat_file = go/os/stat_solaris.go @@ -862,12 +851,8 @@ go_sync_files = \ if LIBGO_IS_SOLARIS go_syslog_file = go/log/syslog/syslog_libc.go else -if LIBGO_IS_IRIX -go_syslog_file = go/log/syslog/syslog_libc.go -else go_syslog_file = go/log/syslog/syslog_unix.go endif -endif go_log_syslog_files = \ go/log/syslog/syslog.go \ @@ -1464,13 +1449,9 @@ else if LIBGO_IS_SOLARIS syscall_socket_file = go/syscall/socket_solaris.go else -if LIBGO_IS_IRIX -syscall_socket_file = go/syscall/socket_irix.go -else syscall_socket_file = go/syscall/socket_bsd.go endif endif -endif # Support for uname. if LIBGO_IS_SOLARIS diff --git a/libgo/configure.ac b/libgo/configure.ac --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -126,7 +126,6 @@ AC_SUBST(go_include) is_darwin=no is_freebsd=no -is_irix=no is_linux=no is_netbsd=no is_rtems=no @@ -135,7 +134,6 @@ GOOS=unknown case ${host} in *-*-darwin*) is_darwin=yes; GOOS=darwin ;; *-*-freebsd*) is_freebsd=yes; GOOS=freebsd ;; - *-*-irix6*) is_irix=yes; GOOS=irix ;; *-*-linux*) is_linux=yes; GOOS=linux ;; *-*-netbsd*) is_netbsd=yes; GOOS=netbsd ;; *-*-rtems*) is_rtems=yes; GOOS=rtems ;; @@ -143,7 +141,6 @@ case ${host} in esac AM_CONDITIONAL(LIBGO_IS_DARWIN, test $is_darwin = yes) AM_CONDITIONAL(LIBGO_IS_FREEBSD, test $is_freebsd = yes) -AM_CONDITIONAL(LIBGO_IS_IRIX, test $is_irix = yes) AM_CONDITIONAL(LIBGO_IS_LINUX, test $is_linux = yes) AM_CONDITIONAL(LIBGO_IS_NETBSD, test $is_netbsd = yes) AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes) @@ -285,11 +282,6 @@ AC_SUBST(GO_SYSCALL_OS_ARCH_FILE) dnl Special flags used to generate sysinfo.go. OSCFLAGS="-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" case "$target" in - mips-sgi-irix6.5*) - # IRIX 6 needs _XOPEN_SOURCE=500 for the XPG5 version of struct - # msghdr in . - OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=500" - ;; *-*-solaris2.[[89]]) # Solaris 8/9 need this so struct msghdr gets the msg_control # etc. fields in (_XPG4_2). diff --git a/libgo/go/net/http/cgi/host.go b/libgo/go/net/http/cgi/host.go --- a/libgo/go/net/http/cgi/host.go +++ b/libgo/go/net/http/cgi/host.go @@ -35,7 +35,6 @@ var osDefaultInheritEnv = map[string][]s "darwin": {"DYLD_LIBRARY_PATH"}, "freebsd": {"LD_LIBRARY_PATH"}, "hpux": {"LD_LIBRARY_PATH", "SHLIB_PATH"}, - "irix": {"LD_LIBRARY_PATH", "LD_LIBRARYN32_PATH", "LD_LIBRARY64_PATH"}, "linux": {"LD_LIBRARY_PATH"}, "openbsd": {"LD_LIBRARY_PATH"}, "solaris": {"LD_LIBRARY_PATH", "LD_LIBRARY_PATH_32", "LD_LIBRARY_PATH_64"}, diff --git a/libgo/go/syscall/socket_irix.go b/libgo/go/syscall/socket_irix.go deleted file mode 100644 --- a/libgo/go/syscall/socket_irix.go +++ /dev/null @@ -1,130 +0,0 @@ -// socket_irix.go -- Socket handling specific to IRIX 6. - -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package syscall - -const SizeofSockaddrInet4 = 16 -const SizeofSockaddrInet6 = 28 -const SizeofSockaddrUnix = 110 - -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -func (sa *RawSockaddrInet4) setLen() Socklen_t { - return SizeofSockaddrInet4 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -func (sa *RawSockaddrInet6) setLen() Socklen_t { - return SizeofSockaddrInet6 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -func (sa *RawSockaddrUnix) setLen(int) { -} - -func (sa *RawSockaddrUnix) getLen() (int, error) { - if sa.Path[0] == 0 { - // "Abstract" Unix domain socket. - // Rewrite leading NUL as @ for textual display. - // (This is the standard convention.) - // Not friendly to overwrite in place, - // but the callers below don't care. - sa.Path[0] = '@' - } - - // Assume path ends at NUL. - // This is not technically the GNU/Linux semantics for - // abstract Unix domain sockets--they are supposed - // to be uninterpreted fixed-size binary blobs--but - // everyone uses this convention. - n := 0 - for n < len(sa.Path)-3 && sa.Path[n] != 0 { - n++ - } - - return n, nil -} - -type RawSockaddr struct { - Family uint16 - Data [14]int8 -} - -// BindToDevice binds the socket associated with fd to device. -func BindToDevice(fd int, device string) (err error) { - return ENOSYS -} - -// only provides struct addrinfo, AI_* and EAI_* if _NO_XOPEN4 -// && _NO_XOPEN5, but -D_XOPEN_SOURCE=500 is required for msg_control etc. -// in struct msghgr, so simply provide them here. -type Addrinfo struct { - Ai_flags int32 - Ai_family int32 - Ai_socktype int32 - Ai_protocol int32 - Ai_addrlen int32 - Ai_canonname *uint8 - Ai_addr *_sockaddr - Ai_next *Addrinfo -} - -const ( - AI_PASSIVE = 0x00000001 - AI_CANONNAME = 0x00000002 - AI_NUMERICHOST = 0x00000004 - AI_NUMERICSERV = 0x00000008 - AI_ALL = 0x00000100 - AI_ADDRCONFIG = 0x00000400 - AI_V4MAPPED = 0x00000800 - AI_DEFAULT = (AI_V4MAPPED | AI_ADDRCONFIG) -) - -const ( - EAI_ADDRFAMILY = 1 - EAI_AGAIN = 2 - EAI_BADFLAGS = 3 - EAI_FAIL = 4 - EAI_FAMILY = 5 - EAI_MEMORY = 6 - EAI_NODATA = 7 - EAI_NONAME = 8 - EAI_SERVICE = 9 - EAI_SOCKTYPE = 10 - EAI_SYSTEM = 11 - EAI_BADHINTS = 12 - EAI_OVERFLOW = 13 - EAI_MAX = 14 -) - -func anyToSockaddrOS(rsa *RawSockaddrAny) (Sockaddr, error) { - return nil, EAFNOSUPPORT -} - -// only provides IPV6_* etc. if _NO_XOPEN4 && _NO_XOPEN5, -// so as above simply provide them here. -const ( - IPV6_UNICAST_HOPS = 48 - IPV6_MULTICAST_IF = IP_MULTICAST_IF - IPV6_MULTICAST_HOPS = IP_MULTICAST_TTL - IPV6_MULTICAST_LOOP = IP_MULTICAST_LOOP -) diff --git a/libgo/go/time/zoneinfo_unix.go b/libgo/go/time/zoneinfo_unix.go --- a/libgo/go/time/zoneinfo_unix.go +++ b/libgo/go/time/zoneinfo_unix.go @@ -23,11 +23,10 @@ func initTestingZone() { } // Many systems use /usr/share/zoneinfo, Solaris 2 has -// /usr/share/lib/zoneinfo, IRIX 6 has /usr/lib/locale/TZ. +// /usr/share/lib/zoneinfo. var zoneDirs = []string{ "/usr/share/zoneinfo/", "/usr/share/lib/zoneinfo/", - "/usr/lib/locale/TZ/", runtime.GOROOT() + "/lib/time/zoneinfo/", } diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -30,15 +30,6 @@ cat > sysinfo.c < #include #include -/* needs u_char/u_short, but is only - included by if _SGIAPI (i.e. _SGI_SOURCE - && !_XOPEN_SOURCE. - only defines TIOCNOTTY if !_XOPEN_SOURCE, while - does so unconditionally. */ -#ifdef __sgi__ -#include -#include -#endif #include #include #include @@ -375,17 +366,12 @@ echo $timeval | \ -e 's/tv_sec *[a-zA-Z0-9_]*/Sec Timeval_sec_t/' \ -e 's/tv_usec *[a-zA-Z0-9_]*/Usec Timeval_usec_t/' >> ${OUT} timespec=`grep '^type _timespec ' gen-sysinfo.go || true` -if test "$timespec" = ""; then - # IRIX 6.5 has __timespec instead. - timespec=`grep '^type ___timespec ' gen-sysinfo.go || true` -fi timespec_sec=`echo $timespec | sed -n -e 's/^.*tv_sec \([^ ]*\);.*$/\1/p'` timespec_nsec=`echo $timespec | sed -n -e 's/^.*tv_nsec \([^ ]*\);.*$/\1/p'` echo "type Timespec_sec_t $timespec_sec" >> ${OUT} echo "type Timespec_nsec_t $timespec_nsec" >> ${OUT} echo $timespec | \ - sed -e 's/^type ___timespec /type Timespec /' \ - -e 's/^type _timespec /type Timespec /' \ + sed -e 's/^type _timespec /type Timespec /' \ -e 's/tv_sec *[a-zA-Z0-9_]*/Sec Timespec_sec_t/' \ -e 's/tv_nsec *[a-zA-Z0-9_]*/Nsec Timespec_nsec_t/' >> ${OUT}