Commit 497b37ad by Arnaud Charlet

[multiple changes]

2010-10-22  Jerome Lambourg  <lambourg@adacore.com>

	* gnatlink.adb (Process_Binder_File): Remove CLI-specific code, now
	moved to dotnet-ld.
	(Gnatlink): Remove CLI-specific code, moved to dotnet-ld
	* bindgen.adb (Gen_Object_Files_Options): Do not issue -L switches with
	the .NET compiler, useless and unsupported.

2010-10-22  Robert Dewar  <dewar@adacore.com>

	* sem_util.ads (Get_Num_Lit_From_Pos): Fix errors in documentation,
	this returns a Node_Id for a reference to the entity, not the entity
	itself!

2010-10-22  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch5.adb (Analyze_Iteration_Scheme): use Insert_Actions when
	bounds require a temporary.

From-SVN: r165827
parent 45010db9
2010-10-22 Jerome Lambourg <lambourg@adacore.com>
* gnatlink.adb (Process_Binder_File): Remove CLI-specific code, now
moved to dotnet-ld.
(Gnatlink): Remove CLI-specific code, moved to dotnet-ld
* bindgen.adb (Gen_Object_Files_Options): Do not issue -L switches with
the .NET compiler, useless and unsupported.
2010-10-22 Robert Dewar <dewar@adacore.com>
* sem_util.ads (Get_Num_Lit_From_Pos): Fix errors in documentation,
this returns a Node_Id for a reference to the entity, not the entity
itself!
2010-10-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iteration_Scheme): use Insert_Actions when
bounds require a temporary.
2010-10-22 Robert Dewar <dewar@adacore.com> 2010-10-22 Robert Dewar <dewar@adacore.com>
* sem_ch4.adb: Minor reformatting. * sem_ch4.adb: Minor reformatting.
......
...@@ -2074,17 +2074,18 @@ package body Bindgen is ...@@ -2074,17 +2074,18 @@ package body Bindgen is
end if; end if;
-- Add a "-Ldir" for each directory in the object path -- Add a "-Ldir" for each directory in the object path
if VM_Target /= CLI_Target then
for J in 1 .. Nb_Dir_In_Obj_Search_Path loop for J in 1 .. Nb_Dir_In_Obj_Search_Path loop
declare declare
Dir : constant String_Ptr := Dir_In_Obj_Search_Path (J); Dir : constant String_Ptr := Dir_In_Obj_Search_Path (J);
begin begin
Name_Len := 0; Name_Len := 0;
Add_Str_To_Name_Buffer ("-L"); Add_Str_To_Name_Buffer ("-L");
Add_Str_To_Name_Buffer (Dir.all); Add_Str_To_Name_Buffer (Dir.all);
Write_Linker_Option; Write_Linker_Option;
end; end;
end loop; end loop;
end if;
-- Sort linker options -- Sort linker options
......
...@@ -159,10 +159,6 @@ procedure Gnatlink is ...@@ -159,10 +159,6 @@ procedure Gnatlink is
-- Temporary file used by linker to pass list of object files on -- Temporary file used by linker to pass list of object files on
-- certain systems with limitations on size of arguments. -- certain systems with limitations on size of arguments.
Lname : String_Access := null;
-- File used by linker for CLI target, used to concatenate all .il files
-- when the command line passed to ilasm is too long
Debug_Flag_Present : Boolean := False; Debug_Flag_Present : Boolean := False;
Verbose_Mode : Boolean := False; Verbose_Mode : Boolean := False;
Very_Verbose_Mode : Boolean := False; Very_Verbose_Mode : Boolean := False;
...@@ -990,42 +986,7 @@ procedure Gnatlink is ...@@ -990,42 +986,7 @@ procedure Gnatlink is
-- to read from a file instead of the command line is only triggered if -- to read from a file instead of the command line is only triggered if
-- a conservative threshold is passed. -- a conservative threshold is passed.
if VM_Target = CLI_Target if Object_List_File_Required
and then Link_Bytes > Link_Max
then
Lname := new String'("l~" & Base_Name (Ali_File_Name.all) & ".il");
for J in Objs_Begin .. Objs_End loop
Copy_File (Linker_Objects.Table (J).all, Lname.all,
Success => Closing_Status,
Mode => Append);
end loop;
-- Add the special objects list file option together with the name
-- of the temporary file to the objects file table.
Linker_Objects.Table (Objs_Begin) :=
new String'(Value (Object_File_Option_Ptr) & Lname.all);
-- The slots containing these object file names are then removed
-- from the objects table so they do not appear in the link. They
-- are removed by moving up the linker options and non-Ada object
-- files appearing after the Ada object list in the table.
declare
N : Integer;
begin
N := Objs_End - Objs_Begin + 1;
for J in Objs_End + 1 .. Linker_Objects.Last loop
Linker_Objects.Table (J - N + 1) := Linker_Objects.Table (J);
end loop;
Linker_Objects.Set_Last (Linker_Objects.Last - N + 1);
end;
elsif Object_List_File_Required
or else (Object_List_File_Supported or else (Object_List_File_Supported
and then Link_Bytes > Link_Max) and then Link_Bytes > Link_Max)
then then
...@@ -1736,7 +1697,7 @@ begin ...@@ -1736,7 +1697,7 @@ begin
if Linker_Path = null then if Linker_Path = null then
if VM_Target = CLI_Target then if VM_Target = CLI_Target then
Linker_Path := System.OS_Lib.Locate_Exec_On_Path ("ilasm"); Linker_Path := System.OS_Lib.Locate_Exec_On_Path ("dotnet-ld");
if Linker_Path = null then if Linker_Path = null then
Exit_With_Error ("Couldn't locate ilasm"); Exit_With_Error ("Couldn't locate ilasm");
...@@ -1767,18 +1728,7 @@ begin ...@@ -1767,18 +1728,7 @@ begin
& Get_Target_Debuggable_Suffix.all); & Get_Target_Debuggable_Suffix.all);
end if; end if;
if VM_Target = CLI_Target then if RTX_RTSS_Kernel_Module_On_Target then
Linker_Options.Increment_Last;
Linker_Options.Table (Linker_Options.Last) := new String'("/QUIET");
Linker_Options.Increment_Last;
Linker_Options.Table (Linker_Options.Last) := new String'("/DEBUG");
Linker_Options.Increment_Last;
Linker_Options.Table (Linker_Options.Last) :=
new String'("/OUTPUT=" & Output_File_Name.all);
elsif RTX_RTSS_Kernel_Module_On_Target then
Linker_Options.Increment_Last; Linker_Options.Increment_Last;
Linker_Options.Table (Linker_Options.Last) := Linker_Options.Table (Linker_Options.Last) :=
new String'("/OUT:" & Output_File_Name.all); new String'("/OUT:" & Output_File_Name.all);
...@@ -1954,28 +1904,7 @@ begin ...@@ -1954,28 +1904,7 @@ begin
IDENT_Op : Boolean := False; IDENT_Op : Boolean := False;
begin begin
if VM_Target = CLI_Target then if AAMP_On_Target then
-- Remove extraneous flags not relevant for CIL. Also remove empty
-- arguments, since ilasm chokes on them.
for J in reverse Linker_Options.First .. Linker_Options.Last loop
if Linker_Options.Table (J)'Length = 0
or else Linker_Options.Table (J) (1 .. 2) = "-L"
or else Linker_Options.Table (J) (1 .. 2) = "-l"
or else Linker_Options.Table (J) (1 .. 3) = "-Wl"
or else Linker_Options.Table (J) (1 .. 3) = "-sh"
or else Linker_Options.Table (J) (1 .. 2) = "-O"
or else Linker_Options.Table (J) (1 .. 2) = "-g"
then
Linker_Options.Table (J .. Linker_Options.Last - 1) :=
Linker_Options.Table (J + 1 .. Linker_Options.Last);
Linker_Options.Decrement_Last;
Num_Args := Num_Args - 1;
end if;
end loop;
elsif AAMP_On_Target then
-- Remove extraneous flags not relevant for AAMP -- Remove extraneous flags not relevant for AAMP
...@@ -2306,10 +2235,6 @@ begin ...@@ -2306,10 +2235,6 @@ begin
Delete (Tname); Delete (Tname);
end if; end if;
if Lname /= null then
Delete (Lname.all & ASCII.NUL);
end if;
if not Success then if not Success then
Error_Msg ("error when calling " & Linker_Path.all); Error_Msg ("error when calling " & Linker_Path.all);
Exit_Program (E_Fatal); Exit_Program (E_Fatal);
......
...@@ -1550,23 +1550,20 @@ package body Sem_Ch5 is ...@@ -1550,23 +1550,20 @@ package body Sem_Ch5 is
return Expression (Decl); return Expression (Decl);
end if; end if;
-- Here we make a declaration with a separate assignment statement -- Here we make a declaration with a separate assignment
-- statement, and insert before loop header.
Decl := Decl :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Id, Defining_Identifier => Id,
Object_Definition => New_Occurrence_Of (Typ, Loc)); Object_Definition => New_Occurrence_Of (Typ, Loc));
Insert_Before (Parent (N), Decl);
Analyze (Decl);
Assign := Assign :=
Make_Assignment_Statement (Loc, Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Id, Loc), Name => New_Occurrence_Of (Id, Loc),
Expression => Relocate_Node (Original_Bound)); Expression => Relocate_Node (Original_Bound));
Insert_Before (Parent (N), Assign); Insert_Actions (Parent (N), New_List (Decl, Assign));
Analyze (Assign);
Rewrite (Original_Bound, New_Occurrence_Of (Id, Loc)); Rewrite (Original_Bound, New_Occurrence_Of (Id, Loc));
......
...@@ -465,11 +465,12 @@ package Sem_Util is ...@@ -465,11 +465,12 @@ package Sem_Util is
function Get_Enum_Lit_From_Pos function Get_Enum_Lit_From_Pos
(T : Entity_Id; (T : Entity_Id;
Pos : Uint; Pos : Uint;
Loc : Source_Ptr) return Entity_Id; Loc : Source_Ptr) return Node_Id;
-- This function obtains the E_Enumeration_Literal entity for the specified -- This function obtains the E_Enumeration_Literal entity for the specified
-- value from the enumeration type or subtype T. The second argument is the -- value from the enumeration type or subtype T and returns an identifier
-- Pos value, which is assumed to be in range. The third argument supplies -- node referencing this value. The second argument is the Pos value, which
-- a source location for constructed nodes returned by this function. -- is assumed to be in range. The third argument supplies a source location
-- for constructed nodes returned by this function.
procedure Get_Library_Unit_Name_String (Decl_Node : Node_Id); procedure Get_Library_Unit_Name_String (Decl_Node : Node_Id);
-- Retrieve the fully expanded name of the library unit declared by -- Retrieve the fully expanded name of the library unit declared by
......
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