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] gnatmake fixes


Tested on i686-linux, committed on trunk

This patch is mostly a cosmetic change to ensure that the filenames,
source directories, object directories, ali directories used/displayed
when using project files are not folded to lower case but using the
untouched casing on non case-sensitive OS. This, at the same time,
makes all the pathnames using a backslash as separator on Windows.
Note that this patch requires also the G404-008 fix to behave properly.
With this patch, GNAT respects the OS casing and pathname structure not
only on case-sensitive OS as it was already the case but also on non
case-sensitive OS like Windows.

This changes adds a new informational message when gnatmake is in debug
mode when changing the current working directory to a project's object
directory.

The output of the following test case must include the message:
  Changing to obj dir of project "toto": <current directory>/obj

$ gnatmake -v -Ptoto -c -u proc.adb
procedure Proc is begin null; end;
project Toto is
   for Object_Dir use "obj";
end Toto;

When sources in a project files that include a spec that needs a body
that does not exist are compiled using -gnatc, the file name of the spec
is recorded in ALI files. Adding the body and rebuilding without -gnatc
used to fail, because gnatmake attempted to recompile the spec. This patch
ensures that gnatmake will compile the body, even when the spec file name
is recorded in ALI files.

Clean up in front-end code to introduce support for a CIL/MSIL back-end.
Replace use of Java_VM by VM_Target.
Introduce hooks for the CIL back-end in handling of init_procs and value types.
Add initial support in gnat tools for CLI toolchain.

2007-06-06  Arnaud Charlet  <charlet@adacore.com>
	    Vincent Celier  <celier@adacore.com>

	* lib-writ.adb: Handle Convention_CIL in addition to Convention_Java,
	since both are separated.
	Add support for imported CIL packages.
	Add further special handling of "value_type" for CIL.
	Add special handling of pragma Import for CIL.

	* make.ads, make.adb: When switch -eS is used, direct all outputs to
	standard output instead of standard error, except errors.
	(Absolute_Path): Use untouched casing for the parent directory.
	(Add_Library_Search_Dir): Use the untouched directory name.
	(Add_Source_Search_Dir): Idem.
	(Change_To_Object_Directory): Update output to use proper casing.
	(Create_Binder_Mapping_File): Use the untouched filename to set
	ALI_Name.
	(Gnatmake): Use untouched library and executable directory names.
	(Insert_Project_Sources): Use untouched filename for spec and body.
	(Is_In_Object_Directory): Use untouched object directory.
	(Mark_Directory): Idem.
	(Collect_Arguments_And_Compile): Ensure that Full_Source_File always
	contains the non-canonical filename in all cases.
	(Change_To_Object_Directory): In verbose mode, display the name of the
	object directory we're changing to.
	(Compile_Sources): Make sure, when a project file is used, to compile
	the body of the unit, when there is one, even when only the spec is
	recorded in an ALI file.
	(Gcc_Switches, Binder_Switches, Linker_Switches): Tables moved from the
	spec to the body.
	(Report_Compilation_Failed): New procedure
	(Bind, Display_Commands, Compile_Sources, Initialize, Scan_Make_Arg):
	procedures moved from the spec to the body.
	(Extract_Failure): Removed, not used
	Replace explicit raises of exception Bind_Failed and Link_Failed with
	calls to Make_Failed with the proper message.
	Replace explicit raises of exception Compilation_Failed with calls to
	procedure Report_Compilation_Failed.
	(Initialize): Create mapping files unconditionally when using project
	files.

	* sem_mech.adb: (Name_CIL, Name_CIL_Constructor, Convention_CIL,
	Pragma_CIL_Constructor): New names.

	* targparm.ads, targparm.adb
	(Compiler_System_Version): Removed, no longer used.
	(Get_Target_Parameters): Relax checks on system.ads validity. Add
	handling of two new system flags: JVM and CLI.

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]