]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Check whether gnatmake supports -Og
authorTom Tromey <tromey@adacore.com>
Wed, 12 Feb 2025 17:59:22 +0000 (10:59 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 4 Mar 2025 14:42:53 +0000 (07:42 -0700)
gnat-llvm does not support the -Og flag.  This arranges to check for
this flag before using it.

gdb/testsuite/gdb.ada/variant_record_field.exp
gdb/testsuite/lib/ada.exp

index f3baa25f020ac4123a90704ab0b7f64931bc3481..ee7a1f3dbdf1626a470d1fba3e5ee59d50644c0f 100644 (file)
@@ -17,6 +17,10 @@ load_lib "ada.exp"
 
 require allow_ada_tests
 
+# LLVM does not have -Og, and anyway this is a regression test for a
+# GCC bug.
+require ada_og
+
 standard_ada_testfile foo
 
 # The compiler used to emit an invalid DWARF expression for the record
index 0e856f7424d18e1fb4e835f9f45fd7f6dcc8c674..00ea570fdd78c05fa072621ff90ea3d79f22b601 100644 (file)
@@ -284,3 +284,8 @@ gdb_caching_proc ada_minimal_encodings {} {
     return [ada_simple_compile minimal_encodings \
                additional_flags=-fgnat-encodings=minimal]
 }
+
+# Return 1 if GNAT supports -Og.
+gdb_caching_proc ada_og {} {
+    return [ada_simple_compile gnat_og additional_flags=-Og]
+}