summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-05 22:22:17 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-05 22:22:17 +0000
commit6222f4a828548c0188ede626ded81d1f307803cc (patch)
tree41af694846a1bfc8719f9e3c0aeb2200cceb969f
parent4f364235dcb67b1953b21be78391110b4c633e1b (diff)
downloadgcc-6222f4a828548c0188ede626ded81d1f307803cc.tar.gz
PR go/56017
libgo: Use DejaGNU when testing a cross-compiler. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195766 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libgo/Makefile.am8
-rw-r--r--libgo/Makefile.in5
-rwxr-xr-xlibgo/configure13
-rw-r--r--libgo/configure.ac11
-rw-r--r--libgo/testsuite/Makefile.in1
5 files changed, 26 insertions, 12 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index f68443cb5a2..4ba3145daab 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -1991,12 +1991,6 @@ BUILDPACKAGE = \
files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
$(LTGOCOMPILE) -I . -c -fgo-pkgpath=`echo $@ | sed -e 's/.lo$$//' -e 's/-go$$//'` -o $@ $$files
-if LIBGO_IS_RTEMS
-use_dejagnu = yes
-else
-use_dejagnu = no
-endif
-
GOTESTFLAGS =
# Check a package.
@@ -2015,7 +2009,7 @@ CHECK = \
export LD_LIBRARY_PATH; \
$(MKDIR_P) $(@D); \
rm -f $@-testsum $@-testlog; \
- if test "$(use_dejagnu)" = "yes"; then \
+ if test "$(USE_DEJAGNU)" = "yes"; then \
$(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
else \
if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files) >>$@-testlog 2>&1; then \
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 0f92aca7309..1376d566d6d 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -359,6 +359,7 @@ SPLIT_STACK = @SPLIT_STACK@
STRINGOPS_FLAG = @STRINGOPS_FLAG@
STRIP = @STRIP@
STRUCT_EPOLL_EVENT_FD_OFFSET = @STRUCT_EPOLL_EVENT_FD_OFFSET@
+USE_DEJAGNU = @USE_DEJAGNU@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
@@ -2107,8 +2108,6 @@ BUILDPACKAGE = \
files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
$(LTGOCOMPILE) -I . -c -fgo-pkgpath=`echo $@ | sed -e 's/.lo$$//' -e 's/-go$$//'` -o $@ $$files
-@LIBGO_IS_RTEMS_FALSE@use_dejagnu = no
-@LIBGO_IS_RTEMS_TRUE@use_dejagnu = yes
GOTESTFLAGS =
# Check a package.
@@ -2127,7 +2126,7 @@ CHECK = \
export LD_LIBRARY_PATH; \
$(MKDIR_P) $(@D); \
rm -f $@-testsum $@-testlog; \
- if test "$(use_dejagnu)" = "yes"; then \
+ if test "$(USE_DEJAGNU)" = "yes"; then \
$(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
else \
if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files) >>$@-testlog 2>&1; then \
diff --git a/libgo/configure b/libgo/configure
index 79c3a425f10..c3b41cf61af 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -653,6 +653,7 @@ LIBGO_IS_ALPHA_FALSE
LIBGO_IS_ALPHA_TRUE
LIBGO_IS_386_FALSE
LIBGO_IS_386_TRUE
+USE_DEJAGNU
GOOS
LIBGO_IS_SOLARIS_FALSE
LIBGO_IS_SOLARIS_TRUE
@@ -11104,7 +11105,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11107 "configure"
+#line 11108 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11210,7 +11211,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11213 "configure"
+#line 11214 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13562,6 +13563,14 @@ fi
+USE_DEJAGNU=no
+case ${host} in
+ *-*-rtems*) USE_DEJAGNU=yes ;;
+ ${target}) ;;
+ *) USE_DEJAGNU=yes ;;
+esac
+
+
is_386=no
is_alpha=no
is_arm=no
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 6cc2307bc52..761fb82c5db 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -156,6 +156,17 @@ AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
AC_SUBST(GOOS)
+dnl Test whether we need to use DejaGNU or whether we can use the
+dnl simpler gotest approach. We can only use gotest for a native
+dnl build.
+USE_DEJAGNU=no
+case ${host} in
+ *-*-rtems*) USE_DEJAGNU=yes ;;
+ ${target}) ;;
+ *) USE_DEJAGNU=yes ;;
+esac
+AC_SUBST(USE_DEJAGNU)
+
dnl N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch).
is_386=no
is_alpha=no
diff --git a/libgo/testsuite/Makefile.in b/libgo/testsuite/Makefile.in
index 572d7363234..8f0e2ad9337 100644
--- a/libgo/testsuite/Makefile.in
+++ b/libgo/testsuite/Makefile.in
@@ -137,6 +137,7 @@ SPLIT_STACK = @SPLIT_STACK@
STRINGOPS_FLAG = @STRINGOPS_FLAG@
STRIP = @STRIP@
STRUCT_EPOLL_EVENT_FD_OFFSET = @STRUCT_EPOLL_EVENT_FD_OFFSET@
+USE_DEJAGNU = @USE_DEJAGNU@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@