]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove gnatmake_version_at_least
authorTom Tromey <tromey@adacore.com>
Thu, 9 Jan 2025 20:08:49 +0000 (13:08 -0700)
committerTom Tromey <tromey@adacore.com>
Wed, 22 Jan 2025 19:55:49 +0000 (12:55 -0700)
This removes gnatmake_version_at_least in favor of using the more
flexible gnat_version_compare.  I think these two version numbers
should be the same, as gnatmake is shipped with the compiler.

gdb/testsuite/gdb.ada/mi_prot.exp
gdb/testsuite/gdb.ada/rename_subscript_param.exp
gdb/testsuite/gdb.ada/scalar_storage.exp
gdb/testsuite/gdb.ada/verylong.exp
gdb/testsuite/lib/ada.exp

index 5a3ab10b16c524f69b500c5211adbe1154625771..8525c1fcf32253df64b3aca1a25aa620dfc7b78e 100644 (file)
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 
 require allow_ada_tests
-require {gnatmake_version_at_least 8}
+require {gnat_version_compare >= 8}
 
 standard_ada_testfile prot
 
index bd49b5b02b6abad3c327811e9058ca6fb893fa20..efb29f40f62522a8264ad9e4a47ccbe16196e3b3 100644 (file)
@@ -17,7 +17,7 @@ load_lib "ada.exp"
 
 require allow_ada_tests
 
-require {gnatmake_version_at_least 8}
+require {gnat_version_compare >= 8}
 
 standard_ada_testfile pb30_012
 
index 5dccaef8f140ecac645511c77c587323e415544e..f8fc46974b1a2efca0a8c4d7e20f7f5938022603 100644 (file)
@@ -36,7 +36,7 @@ if {![runto "storage.adb:$bp_location"]} {
 gdb_test "print V_LE" "= \\(value => 126, another_value => 12, color => green\\)"
 
 # This requires a compiler fix that is in GCC 14.
-if { ![gnatmake_version_at_least 14] } {
+if { ![gnat_version_compare >= 14] }   {
     setup_kfail "DW_AT_endianity on enum types" *-*-*
 }
 gdb_test "print V_BE" "= \\(value => 126, another_value => 12, color => green\\)"
index 4a3e0b9eeb2fdaba0f25fad370b485791f3a04dd..c8574f34e9d73225e010fe1c6fd605e9639471c8 100644 (file)
@@ -16,7 +16,7 @@
 load_lib "ada.exp"
 
 require allow_ada_tests
-require {gnatmake_version_at_least 11}
+require {gnat_version_compare >= 11}
 
 standard_ada_testfile prog
 
index 05151d3d8f1bfb5db91c10434dfd4bff6f67a407..83b419ae210c2ff6d6364a5139d2172681434a11 100644 (file)
@@ -167,27 +167,6 @@ proc find_ada_tool {tool} {
     return $result
 }
 
-# Return 1 if gnatmake is at least version $MAJOR.x.x
-
-proc gnatmake_version_at_least { major } {
-    set gnatmake [find_gnatmake]
-    set gnatmake [lindex [split $gnatmake] 0]
-    if {[catch {exec $gnatmake --version} output]} {
-       return 0
-    }
-    if { [regexp {GNATMAKE ([^ .]+).([^ .]+).([^ .]+)} $output \
-             match gnatmake_major gnatmake_minor gnatmake_micro] } {
-       if { $gnatmake_major >= $major } {
-           return 1
-       } else {
-           return 0
-       }
-    }
-
-    # Unknown, return 1
-    return 1
-}
-
 # Compare the GNAT version against L2 using version_compare.  If the
 # compiler does not appear to be GCC, this will always return false.