[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch: fix s/case/switch/ oops in cris-sim.exp and h8300.exp
From: |
Hans-Peter Nilsson |
Subject: |
patch: fix s/case/switch/ oops in cris-sim.exp and h8300.exp |
Date: |
Mon, 11 Feb 2008 11:37:38 +0100 |
There seems to have been a wholesale s/case/switch/ change some
time ago, which missed at least in some parts that the switch
argument must be guarded from arguments starting with a hyphen,
or you'd get e.g. for cris-elf "make check-binutils
'RUNTESTFLAGS=--target_board=cris-sim\{,-march=v10,-march=v32\}'":
...
Using /home/hp/dgp/share/dejagnu/baseboards/basic-sim.exp as board description
file for target.
ERROR: tcl error sourcing board description file for target
/home/hp/dgp/share/dejagnu/baseboards/cris-sim.exp.
bad option "-march=v10": must be -exact, -glob, -regexp, or --
bad option "-march=v10": must be -exact, -glob, -regexp, or --
while executing
"switch $x {
# We force the arch to either pre-v32 (i.e. v10) or v32 for the
...
This patch fixes e.g. check-binutils as per above (no changes in
results compared to my original cris-sim.exp). GCC tests are
still in progress.
I didn't scrutinize any of the other s/case/switch/ changes.
2008-02-11 Hans-Peter Nilsson <address@hidden>
* baseboards/h8300.exp: Use -- before switch argument that may
begin with "-".
baseboards/cris-sim.exp: Ditto.
diff --git a/baseboards/cris-sim.exp b/baseboards/cris-sim.exp
index 3c4768a..a25feec 100644
--- a/baseboards/cris-sim.exp
+++ b/baseboards/cris-sim.exp
@@ -29,7 +29,7 @@ foreach x $board_variant_list {
regsub -all "^\[ \t\]*" "$x" "" x;
regsub -all "\[ \t\]*$" "$x" "" x;
- switch $x {
+ switch -- $x {
# We force the arch to either pre-v32 (i.e. v10) or v32 for the
# "common" compatible subset, by letting the otherwise
# functionally equivalent gcc options "-march=..." and
diff --git a/baseboards/h8300.exp b/baseboards/h8300.exp
index 41260d2..fb9d858 100644
--- a/baseboards/h8300.exp
+++ b/baseboards/h8300.exp
@@ -67,7 +67,7 @@ foreach x $board_variant_list {
regsub -all "^\[ \t\]*" "$x" "" x
regsub -all "\[ \t\]*$" "$x" "" x
- switch $x {
+ switch -- $x {
"h" -
"-mh" { set linker_script "h8300h.ld" }
brgds, H-P
- patch: fix s/case/switch/ oops in cris-sim.exp and h8300.exp,
Hans-Peter Nilsson <=