diff options
author | Tom Tromey <tromey@adacore.com> | 2025-02-12 10:59:22 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2025-03-04 07:42:53 -0700 |
commit | e933812402b2e3869d41d50b3518fb80cb57350f (patch) | |
tree | bf0e551b33892215f4624beaff7a62287928f2b7 /gdb/testsuite | |
parent | 95a95ec4d401390421e2f2a7839583940445acd7 (diff) | |
download | binutils-e933812402b2e3869d41d50b3518fb80cb57350f.zip binutils-e933812402b2e3869d41d50b3518fb80cb57350f.tar.gz binutils-e933812402b2e3869d41d50b3518fb80cb57350f.tar.bz2 |
Check whether gnatmake supports -Og
gnat-llvm does not support the -Og flag. This arranges to check for
this flag before using it.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.ada/variant_record_field.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/lib/ada.exp | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.ada/variant_record_field.exp b/gdb/testsuite/gdb.ada/variant_record_field.exp index f3baa25..ee7a1f3 100644 --- a/gdb/testsuite/gdb.ada/variant_record_field.exp +++ b/gdb/testsuite/gdb.ada/variant_record_field.exp @@ -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 diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp index 0e856f7..00ea570 100644 --- a/gdb/testsuite/lib/ada.exp +++ b/gdb/testsuite/lib/ada.exp @@ -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] +} |