This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] update gnat driver


Tested on i686-linux, committed on trunk

The GNAT driver is modified to accept a new command STACK to drive the
gnatstack tool with a project file. The Stack section in a project file
contains the flags to be used. If no source is specified, gnatstack is
called with all the sources of the project, including binder generated files.

As some switches are common between gnatmake and the compiler
(for example -S), and as the compiler is called by the GNAT driver
using "gnatmake -f -u -c", it is necessary to specify the compiler
switches after -cargs, so that they are not taken as gnatmake switches.
The test for this is to call "gnat compile /asm <some-source>" on VMS:
the compiler should be invoked with the switch -S.

2007-04-06  Jose Ruiz  <ruiz@adacore.com>
	    Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb (B_Start): Add prefix of binder generated file.
	(Stack_String): Add this String that contains the name of the Stack
	package in the project file.
	(Packages_To_Check_By_Stack): Add this list that contains the packages
	to be checked by gnatstack, which are the naming and the stack packages.
	(Check_Files): If no .ci files were specified for gnatstack we add all
	the .ci files belonging to the projects, including binder generated
	files.
	(Non_VMS_Usage): Document that gnatstack accept project file switches.
	(GNATCmd): Update the B_Start variable if we are in a VMS environment.
	Add gnatstack to the list of commands that use project file related
	switches, and get the single attribute Switches from the stack package
	in a project file when calling gnatstack. Parse the -U flag for
	processing files belonging to all projects in the project tree.
	Remove all processing for command Setup

	* prj-attr.adb: Add new package Stack with single attribute Switches

	* vms_conv.ads (Command_Type): Add command Stack.
	Move to body declarations that are only used in the body: types Item_Id,
	Translation_Type, Item_Ptr, Item and its subtypes.

	* vms_conv.adb: (Initialize): Add data for new command Stack.
	Add declarations moved from the spec: types Item_Id, Translation_Type,
	Item_Ptr, Item and its subtypes.
	(Cargs_Buffer): New table
	(Cargs): New Boolean global variable
	(Process_Buffer): New procedure to create arguments
	(Place): Put character in table Buffer or Cargs_Buffer depending on the
	 value of Cargs.
	(Process_Argument): Set Cargs when processing qualifiers for GNAT
	COMPILE
	(VMS_Conversion): Call Process_Buffer for table Buffer and, if it is not
	empty, for table Cargs_Buffer.
	(Initialize): Remove component Setup in Command_List

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]