# DP: For biarch builds, disable the testsuite for the non-default architecture
# DP: for runtime libraries, which are not built by default (libjava).

---
 libjava/testsuite/Makefile.in |    4 +++-
 2 files changed, 25 insertions(+), 1 deletions(-)

--- a/src/libjava/testsuite/Makefile.in
+++ b/src/libjava/testsuite/Makefile.in
@@ -380,12 +380,14 @@
 
 
 check-DEJAGNU: site.exp
+	runtestflags="`echo '$(RUNTESTFLAGS)' | sed 's/,-m[36][24]//;s/,-mabi=n32//;s/,-mabi=64//'`"; \
+	case "$$runtestflags" in *\\{\\}) runtestflags=; esac; \
 	srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
 	EXPECT=$(EXPECT); export EXPECT; \
 	runtest=$(RUNTEST); \
 	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
 	  exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
-	    if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+	    if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $$runtestflags; \
 	    then :; else exit_status=1; fi; \
 	  done; \
 	else echo "WARNING: could not find \`runtest'" 1>&2; :;\
