+2015-11-14 Mike Frysinger <vapier@gentoo.org>
+
+ * lib/sim-defs.exp (slurp_options): Pull in global subdir/srcdir.
+ Replace $srcdir and $subdir in the read option.
+
2015-04-13 Hans-Peter Nilsson <hp@axis.com>
- * sim-defs.exp (sim_init): Unset target ldscript here.
+ * lib/sim-defs.exp (sim_init): Unset target ldscript here.
2015-03-30 Mike Frysinger <vapier@gentoo.org>
# Simulator dejagnu utilities.
+# TODO: Switch to using dg-xxx helpers rather than parsing the files directly.
# Communicate simulator path from sim_init to sim_version.
# For some reason [board_info target sim] doesn't work in sim_version.
# Subroutine of run_sim_test to process options in FILE.
proc slurp_options { file } {
+ global subdir srcdir
if [catch { set f [open $file r] } x] {
#perror "couldn't open `$file': $x"
perror "$x"
# Whitespace here is space-tab.
if [regexp $pat $line xxx opt_name opt_machs opt_val] {
# match!
+ set opt_val [string map [list \
+ {$srcdir} "$srcdir" \
+ {$subdir} "$subdir" \
+ ] "$opt_val"]
lappend opt_array [list $opt_name $opt_machs $opt_val]
set seen_opt 1
} else {