aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/lib
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-20 01:47:22 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-27 01:27:17 -0500
commit2b9c7c262e5e86224634199459c0972280aa3c71 (patch)
tree7c1455afd6ec7982c3449054afe30482fbdec704 /sim/testsuite/lib
parent8613fa4c49b7df547fbb89cc26667cd99e7cb2f5 (diff)
downloadgdb-2b9c7c262e5e86224634199459c0972280aa3c71.zip
gdb-2b9c7c262e5e86224634199459c0972280aa3c71.tar.gz
gdb-2b9c7c262e5e86224634199459c0972280aa3c71.tar.bz2
sim: testsuite: clean up arch specific toolchain settings
In a multitarget build, we process all targets in order, so make sure the toolchain settings from one don't leak into the next.
Diffstat (limited to 'sim/testsuite/lib')
-rw-r--r--sim/testsuite/lib/sim-defs.exp14
1 files changed, 14 insertions, 0 deletions
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 535f76c..fca66af 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -46,10 +46,24 @@ proc sim_init { args } {
proc sim_init_toolchain {} {
global objdir
global srcdir
+ global cpu_option
+ global cpu_option_sep
+ global ASFLAGS_FOR_TARGET
+ global CFLAGS_FOR_TARGET
+ global LDFLAGS_FOR_TARGET
+ global SIMFLAGS_FOR_TARGET
global global_cpp_works
global global_cc_works
global global_cc_os
+ # Reset all the toolchain settings. This provides a clean slate when
+ # starting the next set of tests.
+ set ASFLAGS_FOR_TARGET ""
+ set CFLAGS_FOR_TARGET ""
+ set LDFLAGS_FOR_TARGET ""
+ set SIMFLAGS_FOR_TARGET ""
+ unset -nocomplain cpu_option cpu_option_sep
+
# See if we have a preprocessor available.
set result [target_compile $srcdir/lib/compilercheck.c \
$objdir/compilercheck.x "preprocess" ""]