summaryrefslogtreecommitdiff
path: root/gcc/ada/bindgen.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-14 13:19:14 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-14 13:19:14 +0000
commita05205b05ada40f5a584d9c24b523f29eb1a40d4 (patch)
tree266a6f41571fc8312848e6fb01e822f77dd66135 /gcc/ada/bindgen.adb
parent72259eb27f07f191d1e8222f5c9671ff4f10588f (diff)
downloadgcc-a05205b05ada40f5a584d9c24b523f29eb1a40d4.tar.gz
2004-06-14 Pascal Obry <obry@gnat.com>
* gnat_ugn.texi: Document relocatable vs. dynamic Library_Kind on Windows. Fix minor typo. * mlib-tgt-mingw.adb: New implementation using the GCC -shared option which is now supported on Windows. With this implementation using the Library Project feature is no different on Windows than on UNIX. 2004-06-14 Vincent Celier <celier@gnat.com> * makegpr.adb (Compile_Sources): Nothing to do when there are no non-Ada sources. * mlib-tgt-vxworks.adb (Library_Exists_For): Remove incorrect comment * prj-part.adb (Parse_Single_Project): When a duplicate project name is found, show the project name and the path of the previously parsed project file. 2004-06-14 Ed Schonberg <schonberg@gnat.com> * exp_ch6.adb (Add_Call_By_Copy_Code): For an out-parameter that is an array, avoid copying the actual before the call. 2004-06-14 Thomas Quinot <quinot@act-europe.fr> * g-debpoo.adb: Remove alignment assumptions from GNAT.Debug_Pools. Instead, allocate memory on worst-case alignment assumptions, and then return an aligned address within the allocated zone. 2004-06-14 Robert Dewar <dewar@gnat.com> * bindgen.adb (Gen_Adainit_Ada): Do not generate external references to elab entities in predefined units in No_Run_Time_Mode. (Gen_Adainit_C): Same fix (Gen_Elab_Calls_Ada): Do not generate calls to elaborate predefined units in No_Run_Time_Mode (Gen_Elab_Calls_C): Same fix * symbols-vms-alpha.adb: Minor reformatting * g-debpoo.ads: Minor reformatting * lib.adb (In_Same_Extended_Unit): Version working on node id's * lib.ads (In_Same_Extended_Unit): Version working on node id's * lib-xref.adb: Minor cleanup, use new version of In_Same_Extended_Unit working on nodes. * make.adb: Minor reformatting * par-ch12.adb: Minor reformatting * par-prag.adb: Add dummy entry for pragma Profile_Warnings * prj-strt.adb: Minor reformatting * restrict.ads, restrict.adb: Redo handling of profile restrictions to be more general. * sem_attr.adb: Minor reformatting * sem_ch7.adb: Minor reformatting * sem_elab.adb (Check_A_Call): Deal with problem of calling init proc for type in the same unit as the object declaration. * sem_prag.adb (Check_Arg_Is_External_Name): New procedure, allows static string expressions and not just string literals. Minor reformatting (Set_Warning): Reset restriction warning flag for restriction pragma Implement pragma Profile_Warnings Implement pragma Profile (Restricted) Give obolescent messages for old restrictions and pragmas * snames.h, snames.ads, snames.adb: Add new entry for pragma Profile_Warnings. * s-rident.ads: Add declarations for restrictions required by profile Restricted and profile Ravenscar. * targparm.ads, targparm.adb: Allow pragma Profile in system.ads * gnat_ugn.texi: Correct some missing entries in the list of GNAT configuration pragmas. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83099 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r--gcc/ada/bindgen.adb49
1 files changed, 44 insertions, 5 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
index ec1670fc4da..76626a8fc5d 100644
--- a/gcc/ada/bindgen.adb
+++ b/gcc/ada/bindgen.adb
@@ -371,7 +371,21 @@ package body Bindgen is
U : Unit_Record renames Units.Table (Unum);
begin
- if U.Set_Elab_Entity and then not U.Interface then
+ -- Check for Elab_Entity to be set for this unit
+
+ if U.Set_Elab_Entity
+
+ -- Don't generate reference for stand alone library
+
+ and then not U.Interface
+
+ -- Don't generate reference for predefined file in No_Run_Time
+ -- mode, since we don't include the object files in this case
+
+ and then not
+ (No_Run_Time_Mode
+ and then Is_Predefined_File_Name (U.Sfile))
+ then
Set_String (" ");
Set_String ("E");
Set_Unit_Number (Unum);
@@ -667,8 +681,23 @@ package body Bindgen is
declare
Unum : constant Unit_Id := Elab_Order.Table (E);
U : Unit_Record renames Units.Table (Unum);
+
begin
- if U.Set_Elab_Entity and then not U.Interface then
+ -- Check for Elab entity to be set for this unit
+
+ if U.Set_Elab_Entity
+
+ -- Don't generate reference for stand alone library
+
+ and then not U.Interface
+
+ -- Don't generate reference for predefined file in No_Run_Time
+ -- mode, since we don't include the object files in this case
+
+ and then not
+ (No_Run_Time_Mode
+ and then Is_Predefined_File_Name (U.Sfile))
+ then
Set_String (" extern char ");
Get_Name_String (U.Uname);
Set_Unit_Name;
@@ -894,9 +923,14 @@ package body Bindgen is
Unum_Spec := Unum;
end if;
+ -- Nothing to do if predefined unit in no run time mode
+
+ if No_Run_Time_Mode and then Is_Predefined_File_Name (U.Sfile) then
+ null;
+
-- Case of no elaboration code
- if U.No_Elab then
+ elsif U.No_Elab then
-- The only case in which we have to do something is if
-- this is a body, with a separate spec, where the separate
@@ -989,7 +1023,6 @@ package body Bindgen is
procedure Gen_Elab_Calls_C is
begin
-
for E in Elab_Order.First .. Elab_Order.Last loop
declare
Unum : constant Unit_Id := Elab_Order.Table (E);
@@ -1008,9 +1041,14 @@ package body Bindgen is
Unum_Spec := Unum;
end if;
+ -- Nothing to do if predefined unit in no run time mode
+
+ if No_Run_Time_Mode and then Is_Predefined_File_Name (U.Sfile) then
+ null;
+
-- Case of no elaboration code
- if U.No_Elab then
+ elsif U.No_Elab then
-- The only case in which we have to do something is if
-- this is a body, with a separate spec, where the separate
@@ -1867,6 +1905,7 @@ package body Bindgen is
or else GNAT.OS_Lib.Is_Regular_File (Name_Buffer (1 .. Name_Len))
then
Write_Info_Ada_C (" -- ", "", Name_Buffer (1 .. Name_Len));
+
if Output_Object_List then
Write_Str (Name_Buffer (1 .. Name_Len));
Write_Eol;