]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: remove F77_FOR_TARGET support
authorNils-Christian Kempke <nils-christian.kempke@intel.com>
Tue, 31 May 2022 14:43:43 +0000 (16:43 +0200)
committerNils-Christian Kempke <nils-christian.kempke@intel.com>
Tue, 31 May 2022 14:44:53 +0000 (16:44 +0200)
The last uses of the F77_FOR_TARGET via passing f77 to GDB's compile
procedure were removed in this commit

   commit 0ecee54cfd04a60e7ca61ae07c72b20e21390257
   Author: Tom Tromey <tromey@redhat.com>
   Date:   Wed Jun 29 17:50:47 2011 +0000

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.

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 for
its support.

gdb/testsuite/boards/cc-with-tweaks.exp
gdb/testsuite/boards/debug-types.exp
gdb/testsuite/boards/gold-gdb-index.exp
gdb/testsuite/lib/future.exp
gdb/testsuite/lib/gdb.exp

index b7ff98fba9ee5b37d20e835a86e5bff0d365dbc9..fe5b9eee2740715bea6f71bb718af37f3722b940 100644 (file)
@@ -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"
 
 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"
 
 set env(GDB) \
     [cached_file gdb.sh "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS \"\$@\"" 1]
index f04a733ac2b020759e4607674f27a207d977ae99..1c4982225deb4636925718e38fcba2057ddb54d4 100644 (file)
@@ -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"
 
 # The -fdebug-types-section switch only has an effect with DWARF version 4.
index 30d2d8b329840eea089b4c71090eea466221c98b..f62f48926611529f4ab127dd9c2e785538ea392f 100644 (file)
@@ -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"
 
 set opts [list]
index 2d68498623b787b6da5e25ce4aec166d72c071fe..36dd611d61c4e23e2610308f8f4406a5f00cc108 100644 (file)
@@ -246,18 +246,6 @@ proc gdb_default_target_compile_1 {source destfile type options} {
            }
        }
 
-       if { $i == "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 == "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 type options} {
        }
     }
 
-    if {[info exists F77_FOR_TARGET]} {
-       if { $compiler_type == "f77" } {
-           set compiler $F77_FOR_TARGET
-       }
-    }
-
     if {[info exists F90_FOR_TARGET]} {
        if { $compiler_type == "f90" } {
            set compiler $F90_FOR_TARGET
@@ -646,7 +627,7 @@ proc gdb_default_target_compile {source destfile type options} {
            set need_local_lang 0
        }
 
-       if { $i == "f77" || $i == "f90" } {
+       if { $i == "f90" } {
            set need_local_lang [info exists use_gdb_compile(fortran)]
        }
 
index b04fbb89e4e4b886168e23484abe0372b20e2b1d..746f0cf779ce62c0548d7b65496537c02cd0752e 100644 (file)
@@ -4397,8 +4397,8 @@ set gdb_saved_set_unbuffered_mode_obj ""
 #   - ldflags=flag: Add FLAG to the linker flags.
 #   - incdir=path: Add PATH to the searched include directories.
 #   - libdir=path: 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.
 
@@ -4431,7 +4431,6 @@ proc gdb_compile {source dest type options} {
     if {[lsearch -exact $options getting_compiler_info] == -1
        && [lsearch -exact $options rust] == -1
        && [lsearch -exact $options ada] == -1
-       && [lsearch -exact $options f77] == -1
        && [lsearch -exact $options f90] == -1
        && [lsearch -exact $options go] == -1
        && [test_compiler_info "clang-*"]} {
@@ -4460,8 +4459,7 @@ proc gdb_compile {source dest type options} {
 
     # Place (and look for) Fortran `.mod` files in the output
     # directory for this specific test.
-    if {[lsearch -exact $options f77] != -1 \
-           || [lsearch -exact $options f90] != -1 } {
+    if { [lsearch -exact $options f90] != -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} {
     }
 
     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] >= 0} {
-           gdb_compile_test $source $result
-       } elseif { $result != "" } {
+       if { $result != "" } {
            clone_output "gdb compile failed, $result"
        }
     }