From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id C29D1383DB88; Thu, 9 Jun 2022 13:41:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C29D1383DB88 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: remove get_compiler_info calls from gdb.exp and dwarf.exp X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: 61ee7510b3fa24ca48b6c053c4fad5916a6b01ff X-Git-Newrev: 1562f64fec2ce6a31bc534be73e9e4180edbb600 Message-Id: <20220609134120.C29D1383DB88@sourceware.org> Date: Thu, 9 Jun 2022 13:41:20 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2022 13:41:20 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D1562f64fec2c= e6a31bc534be73e9e4180edbb600 commit 1562f64fec2ce6a31bc534be73e9e4180edbb600 Author: Andrew Burgess Date: Wed Jun 8 14:25:00 2022 +0100 gdb/testsuite: remove get_compiler_info calls from gdb.exp and dwarf.exp =20 We don't need to call get_compiler_info before calling test_compiler_info; test_compiler_info includes a call to get_compiler_info. =20 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. =20 There should be no change in the test results after this commit. Diff: --- gdb/testsuite/lib/dwarf.exp | 8 -------- gdb/testsuite/lib/gdb.exp | 23 +---------------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index b05fdd58f66..3d0ea83aee7 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -110,14 +110,6 @@ proc build_executable_and_dwo_files { testname executa= ble options args } { set binfile $executable } =20 - set info_options "" - if { [lsearch -exact $options "c++"] >=3D 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)$}] !=3D -1} { diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 7b11dab870e..c9a30d88b2f 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3238,10 +3238,6 @@ gdb_caching_proc skip_altivec_tests { } =20 # 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=3D-maltivec" } elseif [test_compiler_info xlc*] { @@ -3357,10 +3353,6 @@ gdb_caching_proc skip_vsx_tests { } =20 # 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=3D-mvsx" } elseif [test_compiler_info xlc*] { @@ -4781,11 +4773,8 @@ proc gdb_compile_shlib_1 {sources dest options} { } elseif { [lsearch -exact $options "f90"] >=3D 0 } { set info_options "f90" } - if [get_compiler_info ${info_options}] { - return -1 - } =20 - switch -glob [test_compiler_info] { + switch -glob [test_compiler_info "" ${info_options}] { "xlc-*" { lappend obj_options "additional_flags=3D-qpic" } @@ -6964,16 +6953,6 @@ proc build_executable_from_specs {testname executabl= e options args} { =20 set binfile [standard_output_file $executable] =20 - set info_options "" - if { [lsearch -exact $options "c++"] >=3D 0 } { - set info_options "c++" - } elseif { [lsearch -exact $options "f90"] >=3D 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_pthre= ads|openmp)$}] if {$func_index !=3D -1} {