diff mbox

[committed] MIPS/testsuite: mips16-thunks: Use `standard_output_file'

Message ID alpine.DEB.2.00.1609210050200.29007@tp.orcam.me.uk
State Committed
Headers show

Commit Message

Maciej W. Rozycki Sept. 21, 2016, 12:02 p.m. UTC
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-mips-test-mips16-thunks-objfile.diff
diff mbox

Patch

Index: binutils/gdb/testsuite/gdb.arch/mips16-thunks.exp
===================================================================
--- binutils.orig/gdb/testsuite/gdb.arch/mips16-thunks.exp	2016-06-29 12:28:22.000000000 +0100
+++ binutils/gdb/testsuite/gdb.arch/mips16-thunks.exp	2016-09-20 22:58:12.832115031 +0100
@@ -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 addit
 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}