Message ID | CAFULd4YC5669G1FDYOFY_HySV=a7-S8=E20bsFbDHKBiSwhNYw@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Jul 5, 2011, at 9:51 AM, Uros Bizjak <ubizjak@gmail.com> wrote: > Attached patch also does the trick for me. > Please note that we set > -mieee flag to compile .go files from library and also we add this > flag to default testsuite compile flags. > Ick, I think this patch might be expedient, but, wrong. Ian will have to think about it and decide.
On Tue, Jul 5, 2011 at 7:17 PM, Mike Stump <mikestump@comcast.net> wrote: > On Jul 5, 2011, at 9:51 AM, Uros Bizjak <ubizjak@gmail.com> wrote: >> Attached patch also does the trick for me. > >> Please note that we set >> -mieee flag to compile .go files from library and also we add this >> flag to default testsuite compile flags. > >> > Ick, I think this patch might be expedient, but, wrong. Ian will have to think about it and decide. Well, this is how libgfortran handles -mieee in SH case. Uros.
Uros Bizjak <ubizjak@gmail.com> writes: > What remains is a couple of unrelated failures in the testsuite: > > Epoll unexpected fd=0 > pollServer: unexpected wakeup for fd=0 mode=w > panic: test timed out > ../../../gcc-svn/trunk/libgo/testsuite/gotest: line 388: 7123 Aborted > ./a.out -test.short -test.timeout=$timeout "$@" > FAIL: http > gmake[2]: *** [http/check] Error 1 > > 2011/07/05 18:43:28 Test RPC server listening on 127.0.0.1:50334 > 2011/07/05 18:43:28 Test HTTP RPC server listening on 127.0.0.1:49010 > 2011/07/05 18:43:28 rpc.Serve: accept:accept tcp 127.0.0.1:50334: > Resource temporarily unavailable > FAIL: rpc > gmake[2]: *** [rpc/check] Error 1 > > 2011/07/05 18:44:22 Test WebSocket server listening on 127.0.0.1:40893 > Epoll unexpected fd=0 > pollServer: unexpected wakeup for fd=0 mode=w > panic: test timed out > ../../../gcc-svn/trunk/libgo/testsuite/gotest: line 388: 12993 Aborted > ./a.out -test.short -test.timeout=$timeout "$@" > FAIL: websocket > gmake[2]: *** [websocket/check] Error 1 > > ../../../gcc-svn/trunk/libgo/testsuite/gotest: line 388: 13945 > Segmentation fault ./a.out -test.short -test.timeout=$timeout > "$@" > FAIL: compress/flate > gmake[2]: *** [compress/flate/check] Error 1 > > Any ideas how to attack these? None of these look familiar to me. An "Epoll unexpected fd" error means that epoll returned information about a file descriptor which the program didn't ask about. Not sure why that would happen. Particularly for fd 0, since epoll is only used for network connections, which fd 0 presumably is not. The way to look into these is to cd to TARGET/libgo and run "make GOTESTFLAGS=--keep http/check" (or whatever/check). That will leave a directory gotestNNNN in your libgo directory. The executable a.out in that directory is the test case. You can debug the test case using gdb in more or less the usual way. It's a bit painful to set breakpoints by function name, but setting breakpoints by file:line works fine. Printing variables works as well as it ever does, but the variables are printed in C form rather than Go form. Ian
Index: configure =================================================================== --- configure (revision 175840) +++ configure (working copy) @@ -616,6 +616,7 @@ USING_SPLIT_STACK_FALSE USING_SPLIT_STACK_TRUE SPLIT_STACK +IEEE_FLAGS OSCFLAGS GO_DEBUG_PROC_REGS_OS_ARCH_FILE GO_SYSCALLS_SYSCALL_OS_ARCH_FILE @@ -10913,7 +10914,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10916 "configure" +#line 10917 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11019,7 +11020,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11022 "configure" +#line 11023 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13580,6 +13581,13 @@ esac +case "${host_cpu}" in + alpha*) + IEEE_FLAGS="-mieee" + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsplit-stack is supported" >&5 $as_echo_n "checking whether -fsplit-stack is supported... " >&6; } if test "${libgo_cv_c_split_stack_supported+set}" = set; then : Index: Makefile.in =================================================================== --- Makefile.in (revision 175840) +++ Makefile.in (working copy) @@ -365,6 +365,7 @@ GO_DEBUG_PROC_REGS_OS_ARCH_FILE = @GO_DEBUG_PROC_REGS_OS_ARCH_FILE@ GO_SYSCALLS_SYSCALL_OS_ARCH_FILE = @GO_SYSCALLS_SYSCALL_OS_ARCH_FILE@ GREP = @GREP@ +IEEE_FLAGS = @IEEE_FLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -1916,7 +1917,9 @@ runtime/go-main.c LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) -AM_GOCFLAGS = $(STRINGOPS_FLAG) + +# Some targets require additional compiler options for IEEE compatibility. +AM_GOCFLAGS = $(STRINGOPS_FLAG) $(IEEE_FLAGS) GOCOMPILE = $(GOC) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_GOCFLAGS) $(GOCFLAGS) LTGOCOMPILE = $(LIBTOOL) --tag GO --mode=compile $(GOC) $(INCLUDES) \ $(AM_GOCFLAGS) $(GOCFLAGS) @@ -1937,7 +1940,7 @@ # Check a package. CHECK = \ - GC="$(GOC) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ + GC="$(GOC) $(IEEE_FLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ export GC; \ RUNTESTFLAGS="$(RUNTESTFLAGS)"; \ export RUNTESTFLAGS; \ Index: testsuite/Makefile.in =================================================================== --- testsuite/Makefile.in (revision 175840) +++ testsuite/Makefile.in (working copy) @@ -88,6 +88,7 @@ GO_DEBUG_PROC_REGS_OS_ARCH_FILE = @GO_DEBUG_PROC_REGS_OS_ARCH_FILE@ GO_SYSCALLS_SYSCALL_OS_ARCH_FILE = @GO_SYSCALLS_SYSCALL_OS_ARCH_FILE@ GREP = @GREP@ +IEEE_FLAGS = @IEEE_FLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ Index: configure.ac =================================================================== --- configure.ac (revision 175840) +++ configure.ac (working copy) @@ -279,6 +279,14 @@ esac AC_SUBST(OSCFLAGS) +dnl Some targets require additional compiler options for NaN/Inf. +case "${host_cpu}" in + alpha*) + IEEE_FLAGS="-mieee" + ;; +esac +AC_SUBST(IEEE_FLAGS) + dnl Use -fsplit-stack when compiling C code if available. AC_CACHE_CHECK([whether -fsplit-stack is supported], [libgo_cv_c_split_stack_supported], Index: Makefile.am =================================================================== --- Makefile.am (revision 175840) +++ Makefile.am (working copy) @@ -1595,6 +1595,10 @@ GOCFLAGS = $(CFLAGS) AM_GOCFLAGS = $(STRINGOPS_FLAG) + +# Some targets require additional compiler options for IEEE compatibility. +AM_GOCFLAGS += $(IEEE_FLAGS) + GOCOMPILE = $(GOC) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_GOCFLAGS) $(GOCFLAGS) LTGOCOMPILE = $(LIBTOOL) --tag GO --mode=compile $(GOC) $(INCLUDES) \ @@ -1619,7 +1623,7 @@ # Check a package. CHECK = \ - GC="$(GOC) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ + GC="$(GOC) $(IEEE_FLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ export GC; \ RUNTESTFLAGS="$(RUNTESTFLAGS)"; \ export RUNTESTFLAGS; \