diff mbox series

libgo patch committed: netinet/icmp6.h require netinet/in.h on AIX

Message ID CAOyqgcUg+tjBsfY4qWx=+AQS-EswShQU0tdXD+d=wa=885HTRQ@mail.gmail.com
State New
Headers show
Series libgo patch committed: netinet/icmp6.h require netinet/in.h on AIX | expand

Commit Message

Ian Lance Taylor Aug. 29, 2017, 9:51 p.m. UTC
This patch from Tony Reix fixes the libgo configure script to
correctly decide whether netinet/icmp6.h exists on AIX.  Bootstrapped
and ran Go testsuite on x86_64-pc-linux-gnu.  Committed to mainline.

Ian

Comments

Rainer Orth Aug. 31, 2017, 8:09 a.m. UTC | #1
Hi Ian,

> This patch from Tony Reix fixes the libgo configure script to
> correctly decide whether netinet/icmp6.h exists on AIX.  Bootstrapped
> and ran Go testsuite on x86_64-pc-linux-gnu.  Committed to mainline.

unfortunately, this patch broke Solaris bootstrap (seen on Solaris 11.4,
but the headers are the same all the way back to Solaris 10):

runtime_sysinfo.go:1504:32: error: use of undefined type '_mld_hdr_t'
 type _mld2q struct { mld2q_hdr _mld_hdr_t; mld2q_sqrv uint8; mld2q_qqic uint8; mld2q_numsrc uint16; }
                                ^
runtime_sysinfo.go:1504:32: error: use of undefined type '_mld_hdr_t'

gen-sysinfo.go has

gen-sysinfo.go:type _mld_hdr_t struct { mld_icmp6_hdr _icmp6_hdr; mld_addr _in6_addr; }

which is lost in sysinfo.go due to the use of _in6_addr.  The solution
is the same as for AIX _arpcom, and the following patch allowed an
i386-pc-solaris2.11 bootstrap to finish.

	Rainer
Ian Lance Taylor Aug. 31, 2017, 8:07 p.m. UTC | #2
On Thu, Aug 31, 2017 at 1:09 AM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
>
>> This patch from Tony Reix fixes the libgo configure script to
>> correctly decide whether netinet/icmp6.h exists on AIX.  Bootstrapped
>> and ran Go testsuite on x86_64-pc-linux-gnu.  Committed to mainline.
>
> unfortunately, this patch broke Solaris bootstrap (seen on Solaris 11.4,
> but the headers are the same all the way back to Solaris 10):
>
> runtime_sysinfo.go:1504:32: error: use of undefined type '_mld_hdr_t'
>  type _mld2q struct { mld2q_hdr _mld_hdr_t; mld2q_sqrv uint8; mld2q_qqic uint8; mld2q_numsrc uint16; }
>                                 ^
> runtime_sysinfo.go:1504:32: error: use of undefined type '_mld_hdr_t'
>
> gen-sysinfo.go has
>
> gen-sysinfo.go:type _mld_hdr_t struct { mld_icmp6_hdr _icmp6_hdr; mld_addr _in6_addr; }
>
> which is lost in sysinfo.go due to the use of _in6_addr.  The solution
> is the same as for AIX _arpcom, and the following patch allowed an
> i386-pc-solaris2.11 bootstrap to finish.

Thanks.  Committed.

Ian
diff mbox series

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 251436)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-03a2c6be0c6e2b8ef62a5a424c5518bfb7cce0b9
+930304ec98bfe8e9cccb34d340873958e14255df
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/configure.ac
===================================================================
--- libgo/configure.ac	(revision 250873)
+++ libgo/configure.ac	(working copy)
@@ -575,7 +575,11 @@  AC_C_BIGENDIAN
 
 GCC_CHECK_UNWIND_GETIPINFO
 
-AC_CHECK_HEADERS(port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/icmp6.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h)
+AC_CHECK_HEADERS(port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h)
+
+AC_CHECK_HEADERS([netinet/icmp6.h], [], [],
+[#include <netinet/in.h>
+])
 
 AC_CHECK_HEADERS([linux/filter.h linux/if_addr.h linux/if_ether.h linux/if_tun.h linux/netlink.h linux/rtnetlink.h], [], [],
 [#ifdef HAVE_SYS_SOCKET_H