public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: remove F77_FOR_TARGET support
@ 2022-05-31 14:45 Nils-Christian Kempke
  0 siblings, 0 replies; only message in thread
From: Nils-Christian Kempke @ 2022-05-31 14:45 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cffe02acaa8396d46aa90831dede24cdd6095ba0

commit cffe02acaa8396d46aa90831dede24cdd6095ba0
Author: Nils-Christian Kempke <nils-christian.kempke@intel.com>
Date:   Tue May 31 16:43:43 2022 +0200

    gdb/testsuite: remove F77_FOR_TARGET support
    
    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.

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"
 
 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]
diff --git a/gdb/testsuite/boards/debug-types.exp b/gdb/testsuite/boards/debug-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"
 
 # 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"
 
 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 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)]
 	}
 
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=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"
 	}
     }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-31 14:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31 14:45 [binutils-gdb] gdb/testsuite: remove F77_FOR_TARGET support Nils-Christian Kempke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).