summaryrefslogtreecommitdiff
path: root/gcc/ada/gnatcmd.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-25 15:09:38 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-25 15:09:38 +0000
commitdecb95fccf1417e1dfc71bd515b5be472b1b4145 (patch)
tree7fe5d12eb1558a1934d3e8456a183450acbc1e7a /gcc/ada/gnatcmd.adb
parentef60aeabcdf04e69b277c9f2bbffc26130db6206 (diff)
downloadgcc-decb95fccf1417e1dfc71bd515b5be472b1b4145.tar.gz
2015-11-25 Jerome Lambourg <lambourg@adacore.com>
* init.c: Enable the signal trampoline on x86_64-vx7 * sigtramp-vxworks-target.inc: Implement the signal trampoline for x86_64 * tracebak.c: Remove the hook to use the generic unwinder on x86_64-vx7. 2015-11-25 Vincent Celier <celier@adacore.com> * gnatcmd.adb: When "gnat name -P" is called, invoke gprname directly if available. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230875 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatcmd.adb')
-rw-r--r--gcc/ada/gnatcmd.adb14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index dcc3a85f539..df648319c5f 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -63,6 +63,9 @@ procedure GNATCmd is
Gprclean : constant String := "gprclean";
Gnatclean : constant String := "gnatclean";
+ Gprname : constant String := "gprname";
+ Gnatname : constant String := "gnatname";
+
Normal_Exit : exception;
-- Raise this exception for normal program termination
@@ -1183,8 +1186,12 @@ begin
-- If we want to invoke gnatmake/gnatclean with -P, then check if
-- gprbuild/gprclean is available; if it is, use gprbuild/gprclean
-- instead of gnatmake/gnatclean.
+ -- Ditto for gnatname -> gprname.
- if Program.all = Gnatmake or else Program.all = Gnatclean then
+ if Program.all = Gnatmake
+ or else Program.all = Gnatclean
+ or else Program.all = Gnatname
+ then
declare
Project_File_Used : Boolean := False;
Switch : String_Access;
@@ -1209,6 +1216,11 @@ begin
and then Locate_Exec_On_Path (Gprclean) /= null
then
Program := new String'(Gprclean);
+
+ elsif Program.all = Gnatname
+ and then Locate_Exec_On_Path (Gprname) /= null
+ then
+ Program := new String'(Gprname);
end if;
end if;
end;