+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
@ifset unw
@set PLATFORM
+@set TITLESUFFIX
@end ifset
@ifset vms
@set PLATFORM OpenVMS
+@set TITLESUFFIX for @value{PLATFORM}
@end ifset
@c @ovar(ARG)
@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}
* Tagged Types Substitutability Testing::
* Testing with Contracts::
* Additional Tests::
+* Support for other platforms/run-times::
* Current Limitations::
Other Utility Programs
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
* Tagged Types Substitutability Testing::
* Testing with Contracts::
* Additional Tests::
+* Support for other platforms/run-times::
* Current Limitations::
@end menu
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
-- 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
-- --
-- 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- --
"Lainclude_switches#" &
"Sainclude_path#" &
"Sainclude_path_file#" &
+ "Laobject_path_switches#" &
-- package Builder
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 =>
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 + $;
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' =>