Add Ada support to cc-with-tweaks.exp
authorTom Tromey <tromey@adacore.com>
Tue, 9 Jul 2019 19:51:26 +0000 (13:51 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 10 Sep 2019 14:30:45 +0000 (08:30 -0600)
This adds Ada support to the cc-with-tweaks.exp board file, so that we
can test Ada this way.  The cc-with-tweaks.sh script already works
reasonably well as a wrapper for gnatmake.

gdb/testsuite/ChangeLog
2019-09-10  Tom Tromey  <tromey@adacore.com>

* boards/cc-with-tweaks.exp: Set GNATMAKE_FOR_TARGET.

gdb/testsuite/ChangeLog
gdb/testsuite/boards/cc-with-tweaks.exp

index 9df3563c47fb04300c9894840e8361a925e7f5ef..a51d22ce22faa8ffd715b03df42a4134c7a16cf8 100644 (file)
@@ -1,3 +1,7 @@
+2019-09-10  Tom Tromey  <tromey@adacore.com>
+
+       * boards/cc-with-tweaks.exp: Set GNATMAKE_FOR_TARGET.
+
 2019-09-10  Tom Tromey  <tromey@adacore.com>
 
        * gdb.ada/dgopt.exp: New file.
index c50a0065c28df5ed90f09752250638b56fcc70da..371481477aea6ced6ab301e9083d9eeb559dd901 100644 (file)
@@ -42,6 +42,7 @@ load_generic_config "unix"
 process_multilib_options ""
 set found_gcc [find_gcc]
 set found_gxx [find_g++]
+set found_gnatmake [find_gnatmake]
 set_board_info compiler "$found_gcc"
 
 set contrib_dir [file normalize $srcdir/../contrib]
@@ -53,6 +54,10 @@ if ![info exists CXX_FOR_TARGET] {
     set CXX_FOR_TARGET "$found_gxx"
 }
 set CXX_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CXX_FOR_TARGET"
+if ![info exists GNATMAKE_FOR_TARGET] {
+    set GNATMAKE_FOR_TARGET "$found_gnatmake"
+}
+set GNATMAKE_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $GNATMAKE_FOR_TARGET"
 
 set pwd [exec pwd -P]
 exec echo $GDB $INTERNAL_GDBFLAGS $GDBFLAGS \"\$@\" > $pwd/gdb.sh