diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-06-08 14:25:00 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-06-09 14:40:48 +0100 |
commit | 1562f64fec2ce6a31bc534be73e9e4180edbb600 (patch) | |
tree | fddd5c74d183d2d322d177f2a39b74e9ba00db59 /gdb | |
parent | 61ee7510b3fa24ca48b6c053c4fad5916a6b01ff (diff) | |
download | gdb-1562f64fec2ce6a31bc534be73e9e4180edbb600.zip gdb-1562f64fec2ce6a31bc534be73e9e4180edbb600.tar.gz gdb-1562f64fec2ce6a31bc534be73e9e4180edbb600.tar.bz2 |
gdb/testsuite: remove get_compiler_info calls from gdb.exp and dwarf.exp
We don't need to call get_compiler_info before calling
test_compiler_info; test_compiler_info includes a call to
get_compiler_info.
This commit cleans up lib/gdb.exp and lib/dwarf.exp a little by
removing some unneeded calls to get_compiler_info. We could do the
same cleanup throughout the testsuite, but I'm leaving that for
another day.
There should be no change in the test results after this commit.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/lib/dwarf.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 23 |
2 files changed, 1 insertions, 30 deletions
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index b05fdd5..3d0ea83 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -110,14 +110,6 @@ proc build_executable_and_dwo_files { testname executable options args } { set binfile $executable } - set info_options "" - if { [lsearch -exact $options "c++"] >= 0 } { - set info_options "c++" - } - if [get_compiler_info ${info_options}] { - return -1 - } - set func gdb_compile if {[lsearch -regexp $options \ {^(pthreads|shlib|shlib_pthreads|openmp)$}] != -1} { diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 7b11dab..c9a30d8 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3238,10 +3238,6 @@ gdb_caching_proc skip_altivec_tests { } # Make sure we have a compiler that understands altivec. - if [get_compiler_info] { - warning "Could not get compiler info" - return 1 - } if [test_compiler_info gcc*] { set compile_flags "additional_flags=-maltivec" } elseif [test_compiler_info xlc*] { @@ -3357,10 +3353,6 @@ gdb_caching_proc skip_vsx_tests { } # Make sure we have a compiler that understands altivec. - if [get_compiler_info] { - warning "Could not get compiler info" - return 1 - } if [test_compiler_info gcc*] { set compile_flags "additional_flags=-mvsx" } elseif [test_compiler_info xlc*] { @@ -4781,11 +4773,8 @@ proc gdb_compile_shlib_1 {sources dest options} { } elseif { [lsearch -exact $options "f90"] >= 0 } { set info_options "f90" } - if [get_compiler_info ${info_options}] { - return -1 - } - switch -glob [test_compiler_info] { + switch -glob [test_compiler_info "" ${info_options}] { "xlc-*" { lappend obj_options "additional_flags=-qpic" } @@ -6964,16 +6953,6 @@ proc build_executable_from_specs {testname executable options args} { set binfile [standard_output_file $executable] - set info_options "" - if { [lsearch -exact $options "c++"] >= 0 } { - set info_options "c++" - } elseif { [lsearch -exact $options "f90"] >= 0 } { - set info_options "f90" - } - if [get_compiler_info ${info_options}] { - return -1 - } - set func gdb_compile set func_index [lsearch -regexp $options {^(pthreads|shlib|shlib_pthreads|openmp)$}] if {$func_index != -1} { |