+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.
@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.
@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)
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
@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
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
-- 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";
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);
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;