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\@googlegroups.com"
<gofrontend-dev@googlegroups.com>
Subject: Re: libgo patch committed: Update to Go 1.5 release
Date: Sun, 08 Nov 2015 17:21:00 -0000 [thread overview]
Message-ID: <yddr3k02yr8.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <CAOyqgcVEMakAOCizWGnxx1A=7wGEB6JX9x2TGwoLDj35iurmzw@mail.gmail.com> (Ian Lance Taylor's message of "Fri, 6 Nov 2015 11:16:16 -0800")
[-- Attachment #1: Type: text/plain, Size: 3032 bytes --]
Ian Lance Taylor <iant@golang.org> writes:
> On Fri, Nov 6, 2015 at 5:01 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>> Ian Lance Taylor <iant@golang.org> writes:
>>
>>> I have committed a patch to libgo to update it to the Go 1.5 release.
>>>
>>> As usual for libgo updates, the actual patch is too large to attach to
>>> this e-mail message. I've attached the changes to the gccgo-specific
>>> files.
>>>
>>> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
>>> to mainline.
>>>
>>> This may cause trouble on non-GNU/Linux operating systems. Please let
>>> me know about any problems you encounter.
>>
>> It does indeed (first tried on i386-pc-solaris2.10):
>>
>> *
>>
>> /vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c: In function '__go_ioctl':
>> /vol/gcc/src/hg/trunk/local/libgo/runtime/go-varargs.c:63:10: error: implicit declaration of function 'ioctl' [-Werror=implicit-function-declaration]
>> return ioctl (d, request, arg);
>> ^
>>
>> Needs <unistd.h>, the following patch works:
>>
>>
>>
>> *
>>
>> /vol/gcc/src/hg/trunk/local/libgo/go/syscall/exec_bsd.go:107:7: error: incompatible types in assignment (cannot use type int as type Pid_t)
>> r1 = raw_getpid()
>> ^
>>
>> I can cast to Pid_t and this works. The underlying error to me seems
>> that raw_getpid the in the generated libcalls.go is wrong, casting
>> c_getpid return value to int while pid_t can be long.
>>
>> *
>>
>> /vol/gcc/src/hg/trunk/local/libgo/go/net/hook_cloexec.go:13:70: error: reference to undefined identifier 'syscall.Accept4'
>> accept4Func func(int, int) (int, syscall.Sockaddr, error) = syscall.Accept4
>> ^
>>
>> No accept4 on Solaris (and certainly other systems, thence configure
>> test), but used unconditionally.
>>
>> *
>>
>> /vol/gcc/src/hg/trunk/local/libgo/go/net/sendfile_solaris.go:78:22: error: reference to undefined identifier 'syscall.Sendfile'
>> n, err1 := syscall.Sendfile(dst, src, &pos1, n)
>> ^
>>
>> Only in go/syscall/libcall_linux.go!?
>>
>> *
>>
>> /vol/gcc/src/hg/trunk/local/libgo/go/net/tcpsockopt_solaris.go:34:103: error: reference to undefined identifier 'syscall.TCP_KEEPALIVE_THRESHOLD'
>> return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.TCP_KEEPALIVE_THRESHOLD, msecs))
>>
>> ^
>>
>> Not in Solaris 10, only Solaris 11 and 12 have it.
>
> Thanks for the notes. I committed this patch to address these problems.
Worked like a charm, thanks.
There were two remaining problems:
* Before Solaris 12, sendfile only lives in libsendfile. This lead to
link failures in gotools.
* Solaris 12 introduced a couple more types that use _in6_addr_t, which
are filtered out by mksysinfo.sh, leading to compilation failues.
The following patch addresses both issues. Solaris 10 and 11 bootstraps
have completed, a Solaris 12 bootstrap is still running make check.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libgo.patch --]
[-- Type: text/x-patch, Size: 1309 bytes --]
diff --git a/libgo/configure.ac b/libgo/configure.ac
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -482,6 +482,9 @@ AC_CACHE_CHECK([for socket libraries], l
[AC_CHECK_LIB(nsl, main,
[libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lnsl"])])
unset ac_cv_func_gethostbyname
+ AC_CHECK_FUNC(sendfile, ,
+ [AC_CHECK_LIB(sendfile, main,
+ [libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lsendfile"])])
LIBS=$libgo_old_libs
])
NET_LIBS="$libgo_cv_lib_sockets"
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -1488,4 +1488,24 @@ grep '^type _zone_net_addr_t ' gen-sysin
sed -e 's/_in6_addr/[16]byte/' \
>> ${OUT}
+# The Solaris 12 _flow_arp_desc_t struct.
+grep '^type _flow_arp_desc_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
+# The Solaris 12 _flow_l3_desc_t struct.
+grep '^type _flow_l3_desc_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
+# The Solaris 12 _mac_ipaddr_t struct.
+grep '^type _mac_ipaddr_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
+# The Solaris 12 _mactun_info_t struct.
+grep '^type _mactun_info_t ' gen-sysinfo.go | \
+ sed -e 's/_in6_addr_t/[16]byte/g' \
+ >> ${OUT}
+
exit $?
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
next prev parent reply other threads:[~2015-11-08 17:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-31 3:35 Ian Lance Taylor
2015-11-01 8:40 ` Andreas Schwab
2015-11-01 20:33 ` Ian Lance Taylor
2015-11-01 20:52 ` Ian Lance Taylor
2015-11-02 9:38 ` Andreas Schwab
2015-11-02 15:40 ` Lynn A. Boger
2015-11-02 20:23 ` Ian Lance Taylor
2015-11-02 20:59 ` Lynn A. Boger
2015-11-02 23:30 ` [gofrontend-dev] " Ian Lance Taylor
2015-11-02 19:58 ` Ian Lance Taylor
2015-11-06 13:01 ` Rainer Orth
2015-11-06 19:16 ` Ian Lance Taylor
2015-11-08 17:21 ` Rainer Orth [this message]
2015-11-10 21:39 ` Ian Lance Taylor
2015-11-11 11:48 ` Rainer Orth
2015-11-11 13:25 ` Ian Lance Taylor
2015-11-03 7:48 Uros Bizjak
2015-11-03 15:07 ` Ian Lance Taylor
2015-11-03 15:48 ` Lynn A. Boger
2015-11-03 17:34 ` Ian Lance Taylor
2015-11-03 20:17 ` Lynn A. Boger
2015-11-04 1:53 ` Ian Lance Taylor
2015-11-03 22:14 ` Andreas Schwab
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=yddr3k02yr8.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).