aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2013-02-05 22:22:17 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2013-02-05 22:22:17 +0000
commit7134cf2833082c1a4ba3606a76778ce79bfa58c0 (patch)
tree41af694846a1bfc8719f9e3c0aeb2200cceb969f /libgo
parent31502f9f1f9095aaa60094385a2e116b03b23804 (diff)
downloadgcc-7134cf2833082c1a4ba3606a76778ce79bfa58c0.zip
gcc-7134cf2833082c1a4ba3606a76778ce79bfa58c0.tar.gz
gcc-7134cf2833082c1a4ba3606a76778ce79bfa58c0.tar.bz2
re PR go/56017 (libgo testsuite does not support cross testing)
PR go/56017 libgo: Use DejaGNU when testing a cross-compiler. From-SVN: r195766
Diffstat (limited to 'libgo')
-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 f68443c..4ba3145 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 0f92aca..1376d56 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 79c3a42..c3b41cf 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 6cc2307..761fb82 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 572d736..8f0e2ad 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@