-# Copyright 2008-2013 Free Software Foundation, Inc.
+# Copyright 2008-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
}
# Build the test executable using a relative path.
-if { [gdb_compile "${subdir}/tmp-${srcfile}" "${binfile}" executable {debug}] != "" } {
+if { [gdb_compile [relative_filename [pwd] [standard_output_file tmp-${srcfile}]] \
+ "${binfile}" executable {debug}] != "" } {
return -1
}
# we'll run GDB from.
set save_pwd [pwd]
-cd ${subdir}
+cd [standard_output_file {}]
if { [gdb_compile [standard_output_file tmp-${srcfile}] "${testfile}" \
executable {debug}] != "" } {
cd $save_pwd