From 0fcddd82b64ffe3938e9f750746388c949053e1c Mon Sep 17 00:00:00 2001
From: Elena Zannoni <ezannoni@kwikemart.cygnus.com>
Date: Mon, 8 Apr 2002 00:01:06 +0000
Subject: 2002-04-07  Elena Zannoni  <ezannoni@redhat.com>

        Work around for PR gdb/285:
	* gdb.asm/asm-source.exp: Bail out if multilibs are detected.
---
 gdb/testsuite/ChangeLog              |  5 +++++
 gdb/testsuite/gdb.asm/asm-source.exp | 15 +++++++++++++++
 2 files changed, 20 insertions(+)

(limited to 'gdb/testsuite')

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3fe54a0..4cca82d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
 2002-04-07  Elena Zannoni  <ezannoni@redhat.com>
 
+        Work around for PR gdb/285:
+	* gdb.asm/asm-source.exp: Bail out if multilibs are detected.
+
+2002-04-07  Elena Zannoni  <ezannoni@redhat.com>
+
 	* gdb.asm/asm-source.exp: Build symbolic link to arch specific
 	instructions file at run time instead of configure time.
 	Sometimes we run the test in a directory that is not the one we
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 04a1acd..11ced29 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -67,6 +67,21 @@ if { "${asm-arch}" == "" } {
     gdb_suppress_entire_file "Assembly source test -- not implemented for this target."
 }
 
+# Watch out, we are invoking the assembler, but the testsuite sets multilib
+# switches according to compiler syntax.  If we pass these options straight
+# to the assembler, they won't always make sense.  If we don't pass them to
+# the assembler, the final link will complain that the object files were
+# built with different defaults.  So no matter what we do, we lose.  We may as
+# well get out of this test sooner rather than later.
+set dest [target_info name]
+if [board_info $dest exists multilib_flags] {
+	set multilib_flags [board_info $dest multilib_flags]
+	if { "${multilib_flags}" != "" } {
+	   gdb_suppress_entire_file "Assembly source test -- multilibs not supported by this test."
+	   return;
+	 }
+}
+
 set testfile "asm-source"
 set binfile ${objdir}/${subdir}/${testfile}
 set src1 ${srcdir}/${subdir}/asmsrc1.s
-- 
cgit v1.1