aboutsummaryrefslogtreecommitdiff
path: root/lib/target.exp
diff options
context:
space:
mode:
authorRob Savoye <rob@welcomehome.org>2004-04-21 16:50:23 +0000
committerRob Savoye <rob@welcomehome.org>2004-04-21 16:50:23 +0000
commit81264c6f851528ea441ca75985114e9980a4ffc8 (patch)
treead56a255e1c1f801417a3d21e2f10d03795dfbd4 /lib/target.exp
parent1ff80f6db281d77d8ceb59477142d6294e013ff9 (diff)
downloaddejagnu-81264c6f851528ea441ca75985114e9980a4ffc8.zip
dejagnu-81264c6f851528ea441ca75985114e9980a4ffc8.tar.gz
dejagnu-81264c6f851528ea441ca75985114e9980a4ffc8.tar.bz2
2004-03-29 Joel Brobecker <brobecker@gnat.com>
* lib/libgloss.exp (find_gnatmake): New procedure. * lib/target.exp (default_target_compile): Add support for Ada.
Diffstat (limited to 'lib/target.exp')
-rw-r--r--lib/target.exp21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/target.exp b/lib/target.exp
index 80edcd0..fe4b714 100644
--- a/lib/target.exp
+++ b/lib/target.exp
@@ -333,6 +333,20 @@ proc default_target_compile {source destfile type options} {
}
foreach i $options {
+
+ if { $i == "ada" } {
+ set compiler_type "ada"
+ if [board_info $dest exists adaflags] {
+ append add_flags " [target_info adaflags]"
+ }
+ # append add_flags " [gnatmake_include_flags]";
+ if [board_info $dest exists gnatmake] {
+ set compiler [target_info gnatmake];
+ } else {
+ set compiler [find_gnatmake];
+ }
+ }
+
if { $i == "c++" } {
set compiler_type "c++"
if [board_info $dest exists cxxflags] {
@@ -412,6 +426,13 @@ proc default_target_compile {source destfile type options} {
global CC_FOR_TARGET
global CXX_FOR_TARGET
global F77_FOR_TARGET
+ global GNATMAKE_FOR_TARGET
+
+ if [info exists GNATMAKE_FOR_TARGET] {
+ if { $compiler_type == "ada" } {
+ set compiler $GNATMAKE_FOR_TARGET
+ }
+ }
if [info exists CC_FOR_TARGET] {
if { $compiler == "" } {