MIPS/testsuite: mips16-thunks: Use `standard_output_file'
authorMaciej W. Rozycki <macro@imgtec.com>
Wed, 21 Sep 2016 11:55:25 +0000 (12:55 +0100)
committerMaciej W. Rozycki <macro@imgtec.com>
Wed, 21 Sep 2016 11:59:33 +0000 (12:59 +0100)
Correct a commit 2151ccc56c74 ("Always organize test artifacts in a
directory hierarchy") regression causing:

Running .../gdb/testsuite/gdb.arch/mips16-thunks.exp ...
gdb compile failed, Assembler messages:
Fatal error: can't create .../gdb/testsuite/gdb.arch/mips16-thunks-inmain.o: No such file or directory
gdb compile failed, Assembler messages:
Fatal error: can't create .../gdb/testsuite/gdb.arch/mips16-thunks-main.o: No such file or directory
gdb compile failed, mips-mti-linux-gnu-gcc: error: .../gdb/testsuite/gdb.arch/mips16-thunks-inmain.o: No such file or directory
mips-mti-linux-gnu-gcc: error: .../gdb/testsuite/gdb.arch/mips16-thunks-main.o: No such file or directory
UNSUPPORTED: gdb.arch/mips16-thunks.exp: No MIPS16 support in the toolchain.

by using `standard_output_file' to construct output file names
throughout.

gdb/testsuite/
* gdb.arch/mips16-thunks.exp: Use `standard_output_file'
throughout.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/mips16-thunks.exp

index 730eeb7f1aa76538d3b0012326e4c987f144d37a..a41db8df3ade2fb66d154f49b7f72d62682cbaf9 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-21  Maciej W. Rozycki  <macro@imgtec.com>
+
+       * gdb.arch/mips16-thunks.exp: Use `standard_output_file'
+       throughout.
+
 2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
        * lib/gdb.exp: No longer skip hardware breakpoint tests on s390.
index d32f4cc3ba2cab8110023fecac9fdedb7342efa3..15ebad3c22fc875c1c6ab0a6d8ccd24a6491596c 100644 (file)
@@ -35,14 +35,13 @@ proc set_src_and_obj { filename { suffix "" } } {
     upvar srcfile srcfile
     upvar objfile objfile
     global srcdir
-    global objdir
     global subdir
 
     if ![string equal "$suffix" ""] then {
        set suffix "-$suffix"
     }
     set srcfile ${srcdir}/${subdir}/${filename}.c
-    set objfile ${objdir}/${subdir}/${filename}${suffix}.o
+    set objfile [standard_output_file ${filename}${suffix}.o]
 }
 
 # First check if a trivial MIPS16 program can be built and debugged.  This
@@ -60,7 +59,7 @@ set options [list debug nowarnings additional_flags=-mips16]
 lappend objfiles ${objfile}
 gdb_compile ${srcfile} ${objfile} object ${options}
 
-set binfile ${objdir}/${subdir}/${testname}
+set binfile [standard_output_file ${testname}]
 set options [list debug nowarnings]
 if { [gdb_compile ${objfiles} ${binfile} executable ${options}] != "" } then {
     unsupported "No MIPS16 support in the toolchain."
@@ -115,7 +114,7 @@ set options [list \
 lappend objfiles ${objfile}
 gdb_compile ${srcfile} ${objfile} object ${options}
 
-set binfile ${objdir}/${subdir}/${testname}
+set binfile [standard_output_file ${testname}]
 set options [list debug nowarnings additional_flags=-fPIC]
 if { [gdb_compile ${objfiles} ${binfile} executable ${options}] == "" } then {
     clean_restart ${testname}
@@ -186,7 +185,7 @@ set options [list \
 lappend objfiles ${objfile}
 gdb_compile ${srcfile} ${objfile} object ${options}
 
-set binfile ${objdir}/${subdir}/${testname}
+set binfile [standard_output_file ${testname}]
 set options [list debug nowarnings]
 gdb_compile ${objfiles} ${binfile} executable ${options}
 clean_restart ${testname}
This page took 0.051015 seconds and 4 git commands to generate.