This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix other MIPS ld test-suite failures.


For several mips*-elf-like targets, for example mips-elf,
there's a lot of failures that seem related:

Running
/home/hp/binutils/src/ld/testsuite/ld-mips-elf/mips-elf.exp ...
...
FAIL: ld-mips-elf/attr-gnu-4-00
FAIL: ld-mips-elf/attr-gnu-4-01
FAIL: ld-mips-elf/attr-gnu-4-02
FAIL: ld-mips-elf/attr-gnu-4-03
FAIL: ld-mips-elf/attr-gnu-4-04
FAIL: ld-mips-elf/attr-gnu-4-05
FAIL: ld-mips-elf/attr-gnu-4-10
FAIL: ld-mips-elf/attr-gnu-4-11
FAIL: ld-mips-elf/attr-gnu-4-12
FAIL: ld-mips-elf/attr-gnu-4-13
FAIL: ld-mips-elf/attr-gnu-4-14
FAIL: ld-mips-elf/attr-gnu-4-15
FAIL: ld-mips-elf/attr-gnu-4-20
FAIL: ld-mips-elf/attr-gnu-4-21
FAIL: ld-mips-elf/attr-gnu-4-22
FAIL: ld-mips-elf/attr-gnu-4-23
FAIL: ld-mips-elf/attr-gnu-4-24
FAIL: ld-mips-elf/attr-gnu-4-25
FAIL: ld-mips-elf/attr-gnu-4-30
FAIL: ld-mips-elf/attr-gnu-4-31
FAIL: ld-mips-elf/attr-gnu-4-32
FAIL: ld-mips-elf/attr-gnu-4-33
FAIL: ld-mips-elf/attr-gnu-4-34
FAIL: ld-mips-elf/attr-gnu-4-35
FAIL: ld-mips-elf/attr-gnu-4-40
FAIL: ld-mips-elf/attr-gnu-4-41
FAIL: ld-mips-elf/attr-gnu-4-42
FAIL: ld-mips-elf/attr-gnu-4-43
FAIL: ld-mips-elf/attr-gnu-4-44
FAIL: ld-mips-elf/attr-gnu-4-45
FAIL: ld-mips-elf/attr-gnu-4-51

They all have the following clue in the ld.log (here, for mips-elf):
./ld-new: unrecognised emulation mode: elf32btsmip
Supported emulations: elf32elmip

Looking at the test-cases, they indeed specify the elf32btsmip
linker "emulation" (here, in attr-gnu-4-00.d):
#ld: -r -melf32btsmip

But not all MIPS targets have that emulation.

Tested with 'RUNTESTFLAGS=mips-elf.exp' cross to mipsel-linux,
mipsisa32r2el-linux, mipsisa32r2el-elf, mipsisa32r2-elf,
mipsel-elf, mips-elf, mips-sgi-irix6, mips-sgi-irix5,
mipsel-sde-elf, mips64-kfreebsd-gnu, mips-dde-sysv4.2MP (a
"mips-*-sysv*" yields ECOFF; a gas/ld inconsistency wart?),
mipsisa64-sde-elf, mipsisa64el-elf, mips-freebsd8.2,
mips64el-freebsd7.3, mips64-freebsd8.1, mipsel-freebsd7.2.
together with the other posted fixes: lots of failures for
mips-sgi-irix6 but none remaining for this test.  Results for
*-freebsd* are blank and uninteresting as they returned too
early due to mips-elf.exp gating on is_elf_target; see
<http://sourceware.org/ml/binutils/2012-03/msg00039.html>.

(No currently open PR for these failures.)

Ok?

ld/testsuite:

	* ld-mips-elf/mips-elf.exp: Run attr-gnu-* tests only on
	targets containing the elf32btsmip emulation.

diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index ce448cf..9df2672 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -57,6 +57,17 @@ set has_newabi [expr [istarget *-*-irix6*] || [istarget mips64*-*-linux*]]
 set linux_gnu [expr [istarget mips*-*-linux*]]
 set embedded_elf [expr [istarget mips*-*-elf]]
 
+# The list of targets containing the "elf32btsmip" emulation is derived
+# from ld/configure.tgt.
+if { [istarget mips*-*-netbsd*] || [istarget mips*-*-freebsd*]
+     || [istarget mips*-*-kfreebsd*] || [istarget mips*-sde-elf*]
+     || [istarget mips*-*-linux*] || [istarget mips*-*-sysv4*] } {
+    set has_elf32btsmip 1
+} else {
+    set has_elf32btsmip 0
+}
+	
+
 if { $linux_gnu } {
     run_ld_link_tests [list \
 	[list "Dummy shared library for MIPS16 PIC test 1" \
@@ -523,37 +539,39 @@ run_ld_link_tests $mips16_intermix_test
 
 run_dump_test "mips16-local-stubs-1"
 
-run_dump_test "attr-gnu-4-00"
-run_dump_test "attr-gnu-4-01"
-run_dump_test "attr-gnu-4-02"
-run_dump_test "attr-gnu-4-03"
-run_dump_test "attr-gnu-4-04"
-run_dump_test "attr-gnu-4-05"
-run_dump_test "attr-gnu-4-10"
-run_dump_test "attr-gnu-4-11"
-run_dump_test "attr-gnu-4-12"
-run_dump_test "attr-gnu-4-13"
-run_dump_test "attr-gnu-4-14"
-run_dump_test "attr-gnu-4-15"
-run_dump_test "attr-gnu-4-20"
-run_dump_test "attr-gnu-4-21"
-run_dump_test "attr-gnu-4-22"
-run_dump_test "attr-gnu-4-23"
-run_dump_test "attr-gnu-4-24"
-run_dump_test "attr-gnu-4-25"
-run_dump_test "attr-gnu-4-30"
-run_dump_test "attr-gnu-4-31"
-run_dump_test "attr-gnu-4-32"
-run_dump_test "attr-gnu-4-33"
-run_dump_test "attr-gnu-4-34"
-run_dump_test "attr-gnu-4-35"
-run_dump_test "attr-gnu-4-40"
-run_dump_test "attr-gnu-4-41"
-run_dump_test "attr-gnu-4-42"
-run_dump_test "attr-gnu-4-43"
-run_dump_test "attr-gnu-4-44"
-run_dump_test "attr-gnu-4-45"
-run_dump_test "attr-gnu-4-51"
+if $has_elf32btsmip {
+    run_dump_test "attr-gnu-4-00"
+    run_dump_test "attr-gnu-4-01"
+    run_dump_test "attr-gnu-4-02"
+    run_dump_test "attr-gnu-4-03"
+    run_dump_test "attr-gnu-4-04"
+    run_dump_test "attr-gnu-4-05"
+    run_dump_test "attr-gnu-4-10"
+    run_dump_test "attr-gnu-4-11"
+    run_dump_test "attr-gnu-4-12"
+    run_dump_test "attr-gnu-4-13"
+    run_dump_test "attr-gnu-4-14"
+    run_dump_test "attr-gnu-4-15"
+    run_dump_test "attr-gnu-4-20"
+    run_dump_test "attr-gnu-4-21"
+    run_dump_test "attr-gnu-4-22"
+    run_dump_test "attr-gnu-4-23"
+    run_dump_test "attr-gnu-4-24"
+    run_dump_test "attr-gnu-4-25"
+    run_dump_test "attr-gnu-4-30"
+    run_dump_test "attr-gnu-4-31"
+    run_dump_test "attr-gnu-4-32"
+    run_dump_test "attr-gnu-4-33"
+    run_dump_test "attr-gnu-4-34"
+    run_dump_test "attr-gnu-4-35"
+    run_dump_test "attr-gnu-4-40"
+    run_dump_test "attr-gnu-4-41"
+    run_dump_test "attr-gnu-4-42"
+    run_dump_test "attr-gnu-4-43"
+    run_dump_test "attr-gnu-4-44"
+    run_dump_test "attr-gnu-4-45"
+    run_dump_test "attr-gnu-4-51"
+}
 
 if { $linux_gnu } {
     run_ld_link_tests {

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]