From: Mike Frysinger Date: Mon, 22 Nov 2021 04:05:32 +0000 (-0500) Subject: sim: testsuite: replace global_as_options with ASFLAGS_FOR_TARGET X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e877834085658e5d9a7e29daf2216fdf17bfdd0;p=binutils-gdb.git sim: testsuite: replace global_as_options with ASFLAGS_FOR_TARGET Only a few tests actually use global_as_options, but we can replace the sim-specific settings with the dejagnu common ASFLAGS_FOR_TARGET and get the same result. --- diff --git a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp index 24371d96bc4..908d56ab92d 100644 --- a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp +++ b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp @@ -21,7 +21,6 @@ proc sim_has_rv_and_cris {} { global srcdir global subdir - global global_as_options global global_ld_options global global_sim_options @@ -32,9 +31,6 @@ proc sim_has_rv_and_cris {} { # what we want to do it to run the simulator without affecting the # PASS/FAIL counters, and we can use e.g. run_sim_test for that. - if ![info exists global_as_options] { - set global_as_options "" - } if ![info exists global_ld_options] { set global_ld_options "" } @@ -43,7 +39,7 @@ proc sim_has_rv_and_cris {} { } set comp_output [target_assemble $srcdir/$subdir/quit.s quit.o \ - "-I$srcdir/$subdir $global_as_options"] + "-I$srcdir/$subdir"] if ![string match "" $comp_output] { verbose -log "$comp_output" 3 @@ -119,7 +115,6 @@ proc slurp_rv { file } { if [istarget cris*-*-*] { global ASFLAGS_FOR_TARGET set has_rv_and_cris [sim_has_rv_and_cris] - global global_as_options global global_ld_options global global_sim_options diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp index 91b8b5a7b10..68fe2ef3324 100644 --- a/sim/testsuite/lib/sim-defs.exp +++ b/sim/testsuite/lib/sim-defs.exp @@ -185,7 +185,6 @@ proc run_sim_test { name requested_machs } { global opts global cpu_option global cpu_option_sep - global global_as_options global global_ld_options global global_sim_options @@ -221,9 +220,6 @@ proc run_sim_test { name requested_machs } { set opts(kfail) "" set seen_output 0 - if ![info exists global_as_options] { - set global_as_options "" - } if ![info exists global_ld_options] { set global_ld_options "" } @@ -324,7 +320,7 @@ proc run_sim_test { name requested_machs } { } set as_options "$as_options $cpu_option$sep$mach" } - regsub {(^ *| +)([^ ]+)} "$as_options $global_as_options" { -Wa,\2} c_as_options + regsub {(^ *| +)([^ ]+)} "$as_options" { -Wa,\2} c_as_options if ![info exists opts(ld,$mach)] { set opts(ld,$mach) $opts(ld) @@ -345,7 +341,7 @@ proc run_sim_test { name requested_machs } { [list "incdir=$srcdir/$subdir" "additional_flags=$c_as_options"]] set method "compiling" } else { - set comp_output [target_assemble $sourcefile ${name}.o "$as_options $global_as_options"] + set comp_output [target_assemble $sourcefile ${name}.o "$as_options"] set method "assembling" } diff --git a/sim/testsuite/mips/basic.exp b/sim/testsuite/mips/basic.exp index 352b3b4e719..ff96a683589 100644 --- a/sim/testsuite/mips/basic.exp +++ b/sim/testsuite/mips/basic.exp @@ -27,11 +27,10 @@ proc run_hilo_test {testfile models nops} { # Runs micromips tests by adding -mmicromips to as options proc run_micromips_test { name requested_machs } { - global global_as_options; - set gas_old $global_as_options; - append global_as_options " -mmicromips " + global ASFLAGS_FOR_TARGET + set ASFLAGS_FOR_TARGET "-mmicromips" run_sim_test $name $requested_machs - set global_as_options $gas_old + unset ASFLAGS_FOR_TARGET } # Runs all specified tests diff --git a/sim/testsuite/sh/allinsn.exp b/sim/testsuite/sh/allinsn.exp index ef2c59f2301..233cd9a6ff9 100644 --- a/sim/testsuite/sh/allinsn.exp +++ b/sim/testsuite/sh/allinsn.exp @@ -2,12 +2,12 @@ set all_machs "sh shdsp" -set global_as_options "" +global ASFLAGS_FOR_TARGET set global_ld_options "" foreach opt $board_variant_list { switch "x$opt" { - x-ml { set global_as_options "-little --defsym LITTLE=1" + x-ml { set ASFLAGS_FOR_TARGET "-little --defsym LITTLE=1" set global_ld_options "-EL" } } }