From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7876) id EE3F7395A426; Tue, 31 May 2022 14:45:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EE3F7395A426 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Nils-Christian Kempke To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: remove F77_FOR_TARGET support X-Act-Checkin: binutils-gdb X-Git-Author: Nils-Christian Kempke X-Git-Refname: refs/heads/master X-Git-Oldrev: 622c4842bb451efd519c32312c2372f472cd99c8 X-Git-Newrev: cffe02acaa8396d46aa90831dede24cdd6095ba0 Message-Id: <20220531144512.EE3F7395A426@sourceware.org> Date: Tue, 31 May 2022 14:45:12 +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: Tue, 31 May 2022 14:45:13 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dcffe02acaa83= 96d46aa90831dede24cdd6095ba0 commit cffe02acaa8396d46aa90831dede24cdd6095ba0 Author: Nils-Christian Kempke Date: Tue May 31 16:43:43 2022 +0200 gdb/testsuite: remove F77_FOR_TARGET support =20 The last uses of the F77_FOR_TARGET via passing f77 to GDB's compile procedure were removed in this commit =20 commit 0ecee54cfd04a60e7ca61ae07c72b20e21390257 Author: Tom Tromey Date: Wed Jun 29 17:50:47 2011 +0000 =20 over 10 years ago. The last .f files in the testsuite by now are all being compiled by passing 'f90' to the GDB compile, thus only actually using F90_FOR_TARGET (array-element.f, block-data.f, subarray.f). Gfortran in this case is backwards compatible with most f77 code as claimed on gcc.gnu.org/fortran. =20 The reason we'd like to get rid of this now is, that we'll be implementing a Fortran compiler identification mechanism, similar to the C/Cpp existing ones. It would be using the Fortran preprocessor macro defines to identify the Fortran compiler version at hand. We found it inconsequent to only implement this for f90 but, on the other hand, f77 seems deprecated. So, with this commit we remove the remaining lines f= or its support. Diff: --- gdb/testsuite/boards/cc-with-tweaks.exp | 5 ----- gdb/testsuite/boards/debug-types.exp | 1 - gdb/testsuite/boards/gold-gdb-index.exp | 1 - gdb/testsuite/lib/future.exp | 21 +-------------------- gdb/testsuite/lib/gdb.exp | 14 ++++---------- 5 files changed, 5 insertions(+), 37 deletions(-) diff --git a/gdb/testsuite/boards/cc-with-tweaks.exp b/gdb/testsuite/boards= /cc-with-tweaks.exp index b7ff98fba9e..fe5b9eee274 100644 --- a/gdb/testsuite/boards/cc-with-tweaks.exp +++ b/gdb/testsuite/boards/cc-with-tweaks.exp @@ -44,7 +44,6 @@ set found_gcc [find_gcc] set found_gxx [find_g++] set found_gnatmake [find_gnatmake] set found_f90 [find_gfortran] -set found_f77 [find_g77] set_board_info compiler "$found_gcc" =20 set contrib_dir [file normalize $srcdir/../contrib] @@ -64,10 +63,6 @@ if ![info exists F90_FOR_TARGET] { set F90_FOR_TARGET "$found_f90" } set F90_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $= F90_FOR_TARGET" -if ![info exists F77_FOR_TARGET] { - set F77_FOR_TARGET "$found_f77" -} -set F77_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $= F77_FOR_TARGET" =20 set env(GDB) \ [cached_file gdb.sh "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS \"\$@\"" 1] diff --git a/gdb/testsuite/boards/debug-types.exp b/gdb/testsuite/boards/de= bug-types.exp index f04a733ac2b..1c4982225de 100644 --- a/gdb/testsuite/boards/debug-types.exp +++ b/gdb/testsuite/boards/debug-types.exp @@ -29,7 +29,6 @@ set found_gcc [find_gcc] set found_gxx [find_g++] set found_gnatmake [find_gnatmake] set found_f90 [find_gfortran] -set found_f77 [find_g77] set_board_info compiler "$found_gcc" =20 # The -fdebug-types-section switch only has an effect with DWARF version 4. diff --git a/gdb/testsuite/boards/gold-gdb-index.exp b/gdb/testsuite/boards= /gold-gdb-index.exp index 30d2d8b3298..f62f4892661 100644 --- a/gdb/testsuite/boards/gold-gdb-index.exp +++ b/gdb/testsuite/boards/gold-gdb-index.exp @@ -29,7 +29,6 @@ set found_gcc [find_gcc] set found_gxx [find_g++] set found_gnatmake [find_gnatmake] set found_f90 [find_gfortran] -set found_f77 [find_g77] set_board_info compiler "$found_gcc" =20 set opts [list] diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp index 2d68498623b..36dd611d61c 100644 --- a/gdb/testsuite/lib/future.exp +++ b/gdb/testsuite/lib/future.exp @@ -246,18 +246,6 @@ proc gdb_default_target_compile_1 {source destfile typ= e options} { } } =20 - if { $i =3D=3D "f77" } { - set compiler_type "f77" - if {[board_info $dest exists f77flags]} { - append add_flags " [target_info f77flags]" - } - if {[board_info $dest exists f77compiler]} { - set compiler [target_info f77compiler] - } else { - set compiler [find_g77] - } - } - if { $i =3D=3D "f90" } { set compiler_type "f90" if {[board_info $dest exists f90flags]} { @@ -359,7 +347,6 @@ proc gdb_default_target_compile_1 {source destfile type= options} { global CC_FOR_TARGET global CXX_FOR_TARGET global D_FOR_TARGET - global F77_FOR_TARGET global F90_FOR_TARGET global GNATMAKE_FOR_TARGET global GO_FOR_TARGET @@ -390,12 +377,6 @@ proc gdb_default_target_compile_1 {source destfile typ= e options} { } } =20 - if {[info exists F77_FOR_TARGET]} { - if { $compiler_type =3D=3D "f77" } { - set compiler $F77_FOR_TARGET - } - } - if {[info exists F90_FOR_TARGET]} { if { $compiler_type =3D=3D "f90" } { set compiler $F90_FOR_TARGET @@ -646,7 +627,7 @@ proc gdb_default_target_compile {source destfile type o= ptions} { set need_local_lang 0 } =20 - if { $i =3D=3D "f77" || $i =3D=3D "f90" } { + if { $i =3D=3D "f90" } { set need_local_lang [info exists use_gdb_compile(fortran)] } =20 diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index b04fbb89e4e..746f0cf779c 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4397,8 +4397,8 @@ set gdb_saved_set_unbuffered_mode_obj "" # - ldflags=3Dflag: Add FLAG to the linker flags. # - incdir=3Dpath: Add PATH to the searched include directories. # - libdir=3Dpath: Add PATH to the linker searched directories. -# - ada, c++, f77, f90, go, rust: Compile the file as Ada, C++, -# Fortran 77, Fortran 90, Go or Rust. +# - ada, c++, f90, go, rust: Compile the file as Ada, C++, +# Fortran 90, Go or Rust. # - debug: Build with debug information. # - optimize: Build with optimization. =20 @@ -4431,7 +4431,6 @@ proc gdb_compile {source dest type options} { if {[lsearch -exact $options getting_compiler_info] =3D=3D -1 && [lsearch -exact $options rust] =3D=3D -1 && [lsearch -exact $options ada] =3D=3D -1 - && [lsearch -exact $options f77] =3D=3D -1 && [lsearch -exact $options f90] =3D=3D -1 && [lsearch -exact $options go] =3D=3D -1 && [test_compiler_info "clang-*"]} { @@ -4460,8 +4459,7 @@ proc gdb_compile {source dest type options} { =20 # Place (and look for) Fortran `.mod` files in the output # directory for this specific test. - if {[lsearch -exact $options f77] !=3D -1 \ - || [lsearch -exact $options f90] !=3D -1 } { + if { [lsearch -exact $options f90] !=3D -1 } { # Fortran compile. set mod_path [standard_output_file ""] if [test_compiler_info "gcc-*"] { @@ -4702,11 +4700,7 @@ proc gdb_compile {source dest type options} { } =20 if {[lsearch $options quiet] < 0} { - # We shall update this on a per language basis, to avoid - # changing the entire testsuite in one go. - if {[lsearch $options f77] >=3D 0} { - gdb_compile_test $source $result - } elseif { $result !=3D "" } { + if { $result !=3D "" } { clone_output "gdb compile failed, $result" } }