[binutils-gdb] Assume an unrecognized gnatmake is very new
Tom Tromey via Gdb-cvs <[email protected]> Fri, 17 Jul 2026 16:40:33 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Df8ebb8db3bd5= bcfaeaa42f803fe15300e65196ee commit f8ebb8db3bd5bcfaeaa42f803fe15300e65196ee Author: Tom Tromey <[email protected]> Date: Wed Jul 1 10:05:24 2026 -0600 Assume an unrecognized gnatmake is very new =20 I don't know why -- though I suspect there may have been a change to the output of "gnatmake --version" -- but recently some gdb.ada tests have stopped running when llvm-gnatmake is used. =20 The llvm-gnatmake I am testing against prints a version string that isn't recognized by gnat_version_compare. However, it seems to me that AdaCore is probably the main place where this can even occur; and furthermore that without some extra work, it seems reasonable for gnat_version_compare to assume that an unrecognized gnatmake is "very new". Diff: --- gdb/testsuite/lib/ada.exp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp index e20b35c8ebe..086866aca99 100644 --- a/gdb/testsuite/lib/ada.exp +++ b/gdb/testsuite/lib/ada.exp @@ -180,7 +180,8 @@ proc find_ada_tool {tool} { } =20 # Compare the GNAT version against L2 using version_compare. If the -# compiler does not appear to be GCC, this will always return false. +# compiler does not appear to be GCC, this will assume that gnatmake +# is very new. =20 proc gnat_version_compare {op l2} { set gnatmake [find_gnatmake] @@ -189,7 +190,8 @@ proc gnat_version_compare {op l2} { return 0 } if {![regexp {GNATMAKE ([0-9]+(\.[0-9]+)*)} $output match version]} { - return 0 + # Assume a "very new" version. + set version 99 } =20 return [version_compare [split $version .] $op $l2]