diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-09 13:55:34 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-09 13:55:34 +0000 |
commit | 4c944adacd9c0dc5872b3f59ae2d80b82443204c (patch) | |
tree | 3fd50b8f723e15ae546cc88b013d87e9b0c04719 /gcc | |
parent | 238b18db17e1512a970596392c8eba0a3ed0aec5 (diff) | |
download | gcc-4c944adacd9c0dc5872b3f59ae2d80b82443204c.tar.gz |
2010-09-09 Vincent Celier <celier@adacore.com>
* gnat_ugn.texi: Add documentation for new gnatmake switch
--create-map-file.
* make.adb (Map_File): New global variable to store the value of switch
--create-map-file.
(Gnatmake): Add switch -M to gnatlink if buider switch --create-map-file
has been specified.
(Scan_Make_Arg): Recognize switch --create-map-file
* makeutl.ads (Create_Map_File_Switch): New constant string for new
gnatmake and gprbuild switch --create-map-file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164104 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 28 | ||||
-rw-r--r-- | gcc/ada/make.adb | 25 | ||||
-rw-r--r-- | gcc/ada/makeutl.ads | 3 |
4 files changed, 60 insertions, 8 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 59562e60574..6822a1756c9 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,15 @@ +2010-09-09 Vincent Celier <celier@adacore.com> + + * gnat_ugn.texi: Add documentation for new gnatmake switch + --create-map-file. + * make.adb (Map_File): New global variable to store the value of switch + --create-map-file. + (Gnatmake): Add switch -M to gnatlink if buider switch --create-map-file + has been specified. + (Scan_Make_Arg): Recognize switch --create-map-file + * makeutl.ads (Create_Map_File_Switch): New constant string for new + gnatmake and gprbuild switch --create-map-file. + 2010-09-09 Robert Dewar <dewar@adacore.com> * sinput-p.ads: Minor comment update. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 6a49f046f5f..180169ef101 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -1778,8 +1778,8 @@ of the compiler (@pxref{Character Set Control}). @noindent The basic character set is Latin-1. This character set is defined by ISO standard 8859, part 1. The lower half (character codes @code{16#00#} -@dots{} @code{16#7F#)} is identical to standard ASCII coding, but the upper half -is used to represent additional characters. These include extended letters +@dots{} @code{16#7F#)} is identical to standard ASCII coding, but the upper +half is used to represent additional characters. These include extended letters used by European languages, such as French accents, the vowels with umlauts used in German, and the extra letter A-ring used in Swedish. @@ -3823,7 +3823,8 @@ compiled. @cindex cannot generate code If you attempt to compile any of these files, you will get one of the -following error messages (where @var{fff} is the name of the file you compiled): +following error messages (where @var{fff} is the name of the file you +compiled): @smallexample cannot generate code for file @var{fff} (package spec) @@ -9253,6 +9254,17 @@ By default, shared library projects are not allowed to import static library projects. When this switch is used on the command line, this restriction is relaxed. +@ifclear vms +@item --create-map-file +When linking an executable, create a map file. The name of the map file +has the same name as the executable with extension ".map". + +@item --create-map-file=mapfile +When linking an executable, create a map file. The name of the map file is +"mapfile". + +@end ifclear + @item ^-a^/ALL_FILES^ @cindex @option{^-a^/ALL_FILES^} (@command{gnatmake}) Consider all files in the make process, even the GNAT internal system @@ -18647,9 +18659,9 @@ gnatmake -f -pg -P my_project @end smallexample @noindent -Note that only the objects that were compiled with the @samp{-pg} switch will be -profiled; if you need to profile your whole project, use the -@samp{-f} gnatmake switch to force full recompilation. +Note that only the objects that were compiled with the @samp{-pg} switch will +be profiled; if you need to profile your whole project, use the @samp{-f} +gnatmake switch to force full recompilation. @node Program execution @subsection Program execution @@ -24879,8 +24891,8 @@ Note that in this approach, both declarations are analyzed by the compiler so this can only be used where both declarations are legal, even though one of them will not be used. -Another approach is to define integer constants, e.g.@: @code{Bits_Per_Word}, or -Boolean constants, e.g.@: @code{Little_Endian}, and then write declarations +Another approach is to define integer constants, e.g.@: @code{Bits_Per_Word}, +or Boolean constants, e.g.@: @code{Little_Endian}, and then write declarations that are parameterized by these constants. For example @smallexample @c ada diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index 5f08a865268..16f1d40a34a 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -353,6 +353,9 @@ package body Make is -- calling Change_Dir if the current working directory is already this -- directory. + Map_File : String_Access := null; + -- Value of switch --create-map-file + -- Packages of project files where unknown attributes are errors Naming_String : aliased String := "naming"; @@ -6254,6 +6257,15 @@ package body Make is end; end if; + -- Add switch -M to gnatlink if buider switch --create-map-file + -- has been specified. + + if Map_File /= null then + Linker_Switches.Increment_Last; + Linker_Switches.Table (Linker_Switches.Last) := + new String'("-M" & Map_File.all); + end if; + declare Args : Argument_List (Linker_Switches.First .. Linker_Switches.Last + 2); @@ -8121,6 +8133,19 @@ package body Make is Add_Switch (Argv, Compiler, And_Save => And_Save); Add_Switch (Argv, Linker, And_Save => And_Save); + elsif Argv = Create_Map_File_Switch then + Map_File := new String'(""); + + elsif Argv'Length > Create_Map_File_Switch'Length + 1 + and then + Argv (1 .. Create_Map_File_Switch'Length) = Create_Map_File_Switch + and then + Argv (Create_Map_File_Switch'Length + 1) = '=' + then + Map_File := + new String' + (Argv (Create_Map_File_Switch'Length + 2 .. Argv'Last)); + else Scan_Make_Switches (Project_Node_Tree, Argv, Success); end if; diff --git a/gcc/ada/makeutl.ads b/gcc/ada/makeutl.ads index 13d53b0229c..f1557a5a334 100644 --- a/gcc/ada/makeutl.ads +++ b/gcc/ada/makeutl.ads @@ -57,6 +57,9 @@ package Makeutl is -- Switch to forbid simultaneous compilations for the same object directory -- when project files are used. + Create_Map_File_Switch : constant String := "--create-map-file"; + -- Switch to create a map file when an executable is linked + procedure Add (Option : String_Access; To : in out String_List_Access; |