* [PATCH] Assume an unrecognized gnatmake is very new
@ 2026-07-01 19:13 Tom Tromey
2026-07-17 16:37 ` Tom Tromey
0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2026-07-01 19:13 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
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.
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".
---
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} {
}
# 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.
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
}
return [version_compare [split $version .] $op $l2]
base-commit: c2d4b5e1135f75f7e4ef7ff68fa899bfe483671b
--
2.54.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Assume an unrecognized gnatmake is very new
2026-07-01 19:13 [PATCH] Assume an unrecognized gnatmake is very new Tom Tromey
@ 2026-07-17 16:37 ` Tom Tromey
0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2026-07-17 16:37 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:
Tom> I don't know why -- though I suspect there may have been a change to
Tom> the output of "gnatmake --version" -- but recently some gdb.ada tests
Tom> have stopped running when llvm-gnatmake is used.
Tom> The llvm-gnatmake I am testing against prints a version string that
Tom> isn't recognized by gnat_version_compare. However, it seems to me
Tom> that AdaCore is probably the main place where this can even occur; and
Tom> furthermore that without some extra work, it seems reasonable for
Tom> gnat_version_compare to assume that an unrecognized gnatmake is "very
Tom> new".
I'm checking this in.
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-17 16:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-01 19:13 [PATCH] Assume an unrecognized gnatmake is very new Tom Tromey
2026-07-17 16:37 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox