diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-02 09:25:18 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-02 09:25:18 +0000 |
commit | d94b1a6363b3699bb8f001b7447a162423743b8d (patch) | |
tree | 03a63fff1d28e0be853104923b0c74b9e9d253e1 | |
parent | 849f127a29dd219756612d3fd807328c633be2e7 (diff) | |
download | gcc-d94b1a6363b3699bb8f001b7447a162423743b8d.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186072 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 27 | ||||
-rw-r--r-- | gcc/ada/opt.ads | 5 | ||||
-rw-r--r-- | gcc/ada/prj-attr.adb | 3 | ||||
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 6 | ||||
-rw-r--r-- | gcc/ada/snames.ads-tmpl | 1 | ||||
-rw-r--r-- | gcc/ada/switch-c.adb | 18 |
7 files changed, 72 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f42c041af5f..2e4f8e52721 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,18 @@ +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 diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 5c313ac76f0..9ea8f7c76a7 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -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 diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index a1dc37cf51c..e59e67eb8e8 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -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 diff --git a/gcc/ada/prj-attr.adb b/gcc/ada/prj-attr.adb index ba569e119e6..8d3d855e789 100644 --- a/gcc/ada/prj-attr.adb +++ b/gcc/ada/prj-attr.adb @@ -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 diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index 284f9f0b6e5..01b39c69d73 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -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 => diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl index ed30b9b5aac..c85fdd01d19 100644 --- a/gcc/ada/snames.ads-tmpl +++ b/gcc/ada/snames.ads-tmpl @@ -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 + $; diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index 789fb9b5b4d..7cb0ee06a65 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -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' => |