This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix remaining libgo testsuite failures on Solaris 2


I believe that all of these issues have now been fixed.  Thanks.

Ian

Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> The recent merge of libgo from upstream broke bootstrap with Go on
> Solaris: unless _XOPEN_SOURCE is defined as 400 or above, struct msghdr
> has no msg_control, msg_controllen, and msg_flags members, but uses
> msg_accrights and msg_accrightslen instead.
>
> I've fixed this (and the bootstrap) like this in mksysinfo.sh:
>
> diff -r 77ad95adb9e1 libgo/mksysinfo.sh
> --- a/libgo/mksysinfo.sh	Sun Jan 23 23:05:50 2011 +0100
> +++ b/libgo/mksysinfo.sh	Sun Jan 23 23:08:31 2011 +0100
> @@ -57,7 +57,8 @@
>  #include <unistd.h>
>  EOF
>  
> -${CC} -D_GNU_SOURCE -fdump-go-spec=gen-sysinfo.go -S -o sysinfo.s sysinfo.c
> +#${CC} -D_GNU_SOURCE -fdump-go-spec=gen-sysinfo.go -S -o sysinfo.s sysinfo.c
> +${CC} -std=gnu99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -fdump-go-spec=gen-sysinfo.go -S -o sysinfo.s sysinfo.c
>  
>  echo 'package syscall' > ${OUT}
>  
> I think we really need to introduce the target_triplet arg to
> mksysinfo.sh again which I already had in my original Solaris libgo
> patch.  I really doubt that we can find macros which make those
> parts/versions of libc visible that are needed in libgo, but have no ill
> effect on other platforms.
>
> While this restores libgo bootstrap, there are several other issues that
> need to be dealt with:
>
> * In go/time/zoneinfo_unix.go, zoneDir is /usr/share/lib/zoneinfo/ on
>   Solaris, not /usr/share/zoneinfo/.  Hardcoding this change fixes
>   time/check, but of course this isn't appropriate.
>
> * We need to avoid unconditionally using -Wl,--whole-archive, which is
>   only available with GNU ld (and, rarely, vendor linkers like the
>   Solaris 11 ld that also implement it).
>
> * Currently, go/os/sys_linux.go is used everywhere which doesn't work
>   since only Linux has /proc/sys/kernel/hostname.  I wonder what the
>   best solution is, though:
>
>   Solaris /bin/hostname uses sysinfo(SI_HOSTNAME), there's also
>   gethostname(3C) and of course uname(2).
>
> * There are several more functions that need largefile variants on
>   32-bit Solaris:
>
>   readdir_r needs to use readdir64_r and Dirent needs to correspond to
>   _dirent64
>
>   stat, fstat and lstat need to use *stat64, and Stat needs to become
>   _stat64.
>
>   There may be more instances, but those are the easy ones so far.  I'm
>   unsure where best to place those declarations:
>
>   *stat might go into syscalls/sysfile_stat{regfile, largefile}.go
>
>   readdir_r is currently in go/os/dir.go, but the variants obviously
>   should go somewhere into syscalls.
>
> There are also a couple of testsuite issues:
>
> * At least the 64-bit compress/gzip/check hangs on Solaris 11/x86, which
>   hangs the whole testsuite run.  This is already dealt with nicely by
>   DejaGnu.
>
> * The non-DejaGnu make check only prints it output to stdout, so no
>   record of the testsuite run is kept that would show up in
>   mail-report.log.
>
> * Even a sequential make check run with use_dejagnu=yes is pretty
>   useless: the individal tests are all run with they own runtest
>   invocation, but inside the same directory (testsuite).  This way,
>   libgo.{log,sum} from the next testcase overwrites the previous one.
>   Even so, every test is called go, so all you see is
>
>   FAIL: go
>
>   Not very useful ;-(
>
> Thanks.
> 	Rainer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]