summaryrefslogtreecommitdiff
path: root/gcc/ada/gnatcmd.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-10 10:28:45 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-10 10:28:45 +0000
commit1f6c655ed6b9d4fcb966f05d9a8af6569cdbde40 (patch)
treecc649ae7918e41381652fd2f8884f189f3be98bc /gcc/ada/gnatcmd.adb
parentcd5ad4f28cf354eed1b3fb8cba5edb4683f8a6c4 (diff)
downloadgcc-1f6c655ed6b9d4fcb966f05d9a8af6569cdbde40.tar.gz
2010-09-10 Ed Schonberg <schonberg@adacore.com>
* sprint.adb (Sprint_Node_Actual, case N_Derived_Type_Definition): Do not reset Sloc when printing keyword "new". 2010-09-10 Vincent Celier <celier@adacore.com> * gnatcmd.adb (GNATCmd): Put the command line in environment variable GNAT_DRIVER_COMMAND_LINE. 2010-09-10 Ed Schonberg <schonberg@adacore.com> * sem.adb (Do_Unit_And_Dependents): if Withed_Body is set on a context clause, process the body at once. 2010-09-10 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Type_Conversion): Do not warn on a redundant conversion is the expression is a qualified expression used to disambiguate a function call. 2010-09-10 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Add_Source): Allow an Ada source to have the same name as a source of another project and of another language. 2010-09-10 Robert Dewar <dewar@adacore.com> * prj-util.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164159 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatcmd.adb')
-rw-r--r--gcc/ada/gnatcmd.adb13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index eaac1db3c5d..9c038db96ed 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -1349,6 +1349,19 @@ begin
Targparm.Get_Target_Parameters;
+ -- Put the command line in environment variable GNAT_DRIVER_COMMAND_LINE,
+ -- so that the spawned tool may know the way the GNAT driver was invoked.
+
+ Name_Len := 0;
+ Add_Str_To_Name_Buffer (Command_Name);
+
+ for J in 1 .. Argument_Count loop
+ Add_Char_To_Name_Buffer (' ');
+ Add_Str_To_Name_Buffer (Argument (J));
+ end loop;
+
+ Setenv ("GNAT_DRIVER_COMMAND_LINE", Name_Buffer (1 .. Name_Len));
+
-- Add the directory where the GNAT driver is invoked in front of the path,
-- if the GNAT driver is invoked with directory information. Do not do this
-- for VMS, where the notion of path does not really exist.