Commit a1e16658 by Arnaud Charlet

[multiple changes]

2012-04-02  Jose Ruiz  <ruiz@adacore.com>

	* gnat_ugn.texi: Add some minimal documentation about how to
	use GNATtest for cross platforms.

2012-04-02  Vincent Celier  <celier@adacore.com>

	* opt.ads (Object_Path_File_Name): New variable.
	* prj-attr.adb: New Compiler attribute Object_Path_Switches.
	* prj-nmsc.adb (Process_Compiler): Recognize new attribute
	Object_Path_Switches.
	* snames.ads-tmpl: New standard name Object_Path_Switches.
	* switch-c.adb (Scan_Front_End_Switches): Recognize new switch
	-gnateO= and put its value in Opt.Object_Path_File_Name.

From-SVN: r186072
parent a429e6b3
2012-04-02 Jose Ruiz <ruiz@adacore.com>
* gnat_ugn.texi: Add some minimal documentation about how to
use GNATtest for cross platforms.
2012-04-02 Vincent Celier <celier@adacore.com>
* opt.ads (Object_Path_File_Name): New variable.
* prj-attr.adb: New Compiler attribute Object_Path_Switches.
* prj-nmsc.adb (Process_Compiler): Recognize new attribute
Object_Path_Switches.
* snames.ads-tmpl: New standard name Object_Path_Switches.
* switch-c.adb (Scan_Front_End_Switches): Recognize new switch
-gnateO= and put its value in Opt.Object_Path_File_Name.
2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Process_Declarations): Detect a case where
......
......@@ -94,10 +94,12 @@ Texts. A copy of the license is included in the section entitled
@ifset unw
@set PLATFORM
@set TITLESUFFIX
@end ifset
@ifset vms
@set PLATFORM OpenVMS
@set TITLESUFFIX for @value{PLATFORM}
@end ifset
@c @ovar(ARG)
......@@ -115,7 +117,7 @@ Texts. A copy of the license is included in the section entitled
@c of the @ovar macro have been expanded inline.
@settitle @value{EDITION} User's Guide @value{PLATFORM}
@settitle @value{EDITION} User's Guide @value{TITLESUFFIX}
@dircategory GNU Ada tools
@direntry
* @value{EDITION} User's Guide: (gnat_ugn). @value{PLATFORM}
......@@ -484,6 +486,7 @@ Creating Unit Tests Using gnattest
* Tagged Types Substitutability Testing::
* Testing with Contracts::
* Additional Tests::
* Support for other platforms/run-times::
* Current Limitations::
Other Utility Programs
......@@ -3077,7 +3080,7 @@ $ gnatlink ada_unit file1.o file2.o --LINK=./my_script
Where CC is the name of the non-GNU C++ compiler.
If the @code{zero cost} exception mechanism is used, and the platform
supports automatic registration of exception tables (e.g.@: Solaris or IRIX),
supports automatic registration of exception tables (e.g.@: Solaris),
paths to more objects are required:
@smallexample
......@@ -17988,6 +17991,7 @@ default location.
* Tagged Types Substitutability Testing::
* Testing with Contracts::
* Additional Tests::
* Support for other platforms/run-times::
* Current Limitations::
@end menu
......@@ -18474,6 +18478,25 @@ gnatmake -Pmixing/test_driver.gpr
mixing/test_runner
@end smallexample
@node Support for other platforms/run-times
@section Support for other platforms/run-times
@noindent
@command{gnattest} can be used to generate the test harness for platforms
and run-time libraries others than the default native target with the
default full run-time. For example, when using a limited run-time library
such as Zero FootPrint (ZFP), a simplified harness is generated.
Two variables are used to tell the underlying AUnit framework how to generate
the test harness: @code{PLATFORM}, which identifies the target, and
@code{RUNTIME}, used to determine the run-time library for which the harness
is generated. For example, the following options are used to generate the
AUnit test harness for a PowerPC ELF target using the ZFP run-time library:
@smallexample
gnattest -Psimple.gpr -XPLATFORM=powerpc-elf -XRUNTIME=zfp
@end smallexample
@node Current Limitations
@section Current Limitations
......
......@@ -987,6 +987,11 @@ package Opt is
-- GNATMAKE
-- Set to True when an object directory is specified with option -D
Object_Path_File_Name : String_Ptr := null;
-- GNAT2WHY
-- Path of the temporary file that contains a list of object directories
-- passed by -gnateO=<obj_pat_file>.
One_Compilation_Per_Obj_Dir : Boolean := False;
-- GNATMAKE, GPRBUILD
-- Set to True with switch --single-compile-per-obj-dir. When True, there
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2011, Free Software Foundation, Inc. --
-- Copyright (C) 2001-2012, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -226,6 +226,7 @@ package body Prj.Attr is
"Lainclude_switches#" &
"Sainclude_path#" &
"Sainclude_path_file#" &
"Laobject_path_switches#" &
-- package Builder
......
......@@ -1440,6 +1440,12 @@ package body Prj.Nmsc is
From_List => Element.Value.Values,
In_Tree => Data.Tree);
when Name_Object_Path_Switches =>
Put (Into_List =>
Lang_Index.Config.Object_Path_Switches,
From_List => Element.Value.Values,
In_Tree => Data.Tree);
-- Attribute Compiler_Pic_Option (<language>)
when Name_Pic_Option =>
......
......@@ -1199,6 +1199,7 @@ package Snames is
Name_Object_File_Switches : constant Name_Id := N + $;
Name_Object_Generated : constant Name_Id := N + $;
Name_Object_List : constant Name_Id := N + $;
Name_Object_Path_Switches : constant Name_Id := N + $;
Name_Objects_Linked : constant Name_Id := N + $;
Name_Objects_Path : constant Name_Id := N + $;
Name_Objects_Path_File : constant Name_Id := N + $;
......
......@@ -516,6 +516,24 @@ package body Switch.C is
new String'(Switch_Chars (Ptr .. Max));
return;
-- -gnateO= (object path file)
when 'O' =>
Store_Switch := False;
Ptr := Ptr + 1;
-- Check for '='
if Ptr >= Max or else Switch_Chars (Ptr) /= '=' then
Bad_Switch ("-gnateO");
else
Object_Path_File_Name :=
new String'(Switch_Chars (Ptr + 1 .. Max));
end if;
return;
-- -gnatep (preprocessing data file)
when 'p' =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment