summaryrefslogtreecommitdiff
path: root/gcc/ada/mlib-tgt.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-14 08:43:34 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-14 08:43:34 +0000
commit81a1245619aa40d3dc8fd8d7efd65b39a8019179 (patch)
tree5875d0102588a0bdaf32f61cb26f856f87ff7ec6 /gcc/ada/mlib-tgt.ads
parent1605e5e5944a4e44f03a1927e2e49e8087e3600d (diff)
downloadgcc-81a1245619aa40d3dc8fd8d7efd65b39a8019179.tar.gz
2007-08-14 Vincent Celier <celier@adacore.com>
* clean.adb, fmap.adb, sinput-p.adb, sinput-p.ads, gnatcmd.adb, gnatname.adb, makeutl.ads, makeutl.adb, makegpr.adb, mlib-tgt-vms.adb mlib-tgt-darwin.adb, mlib-tgt-lynxos.adb, mlib-prj.adb, mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-irix.adb mlib-tgt-hpux.adb, mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb, mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, mlib-tgt-aix.adb, mlib-tgt-tru64.adb, mlib.ads, mlib.adb (Create_Sym_Links): New procedure. (Major_Id_Name): New function. mlib-tgt.ads/mlib.tgt.adb: (Library_Major_Minor_Id_Supported): New function, default returns True Most mlib-tgt-*.adb that support shared libraries and symbolic links: (Build_Dynamic_Library): Add support for major/minor ids for shared libs Other mlib-tgt-*.adb (aix, mingw, vms, vxworks, xi): Implementation of Library_Major_Minor_Id_Supported returns False clean.adb: (Clean_Library_Directory): If major/minor ids are supported, clean all library files. Major update of the Project Manager and of the project aware tools, including gprmake, so that the same sources in the GNAT repository can be used by gprbuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127432 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/mlib-tgt.ads')
-rw-r--r--gcc/ada/mlib-tgt.ads59
1 files changed, 23 insertions, 36 deletions
diff --git a/gcc/ada/mlib-tgt.ads b/gcc/ada/mlib-tgt.ads
index 670db4548b9..24198e1fc11 100644
--- a/gcc/ada/mlib-tgt.ads
+++ b/gcc/ada/mlib-tgt.ads
@@ -36,14 +36,6 @@ with Prj; use Prj;
package MLib.Tgt is
- type Library_Support is (None, Static_Only, Full);
- -- Support for Library Project File.
- -- - None: Library Project Files are not supported at all
- -- - Static_Only: Library Project Files are only supported for static
- -- libraries.
- -- - Full: Library Project Files are supported for static and dynamic
- -- (shared) libraries.
-
function Support_For_Libraries return Library_Support;
-- Indicates how building libraries by gnatmake is supported by the GNAT
-- implementation for the platform.
@@ -113,29 +105,20 @@ package MLib.Tgt is
procedure Build_Dynamic_Library
(Ofiles : Argument_List;
- Foreign : Argument_List;
- Afiles : Argument_List;
Options : Argument_List;
- Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
Symbol_Data : Symbol_Record;
- Driver_Name : Name_Id := No_Name;
- Lib_Version : String := "";
- Auto_Init : Boolean := False);
+ Driver_Name : Name_Id := No_Name;
+ Lib_Version : String := "";
+ Auto_Init : Boolean := False);
-- Build a dynamic/relocatable library
--
-- Ofiles is the list of all object files in the library
--
- -- Foreign is the list of non Ada object files (also included in Ofiles)
- --
- -- Afiles is the list of ALI files for the Ada object files
- --
- -- Options and Options_2 are lists of options to be passed to the tool
- -- (gcc or other) that effectively builds the dynamic library. Options
- -- are passed before the object files, Options_2 are passed after the
- -- object files.
+ -- Options is a list of options to be passed to the tool
+ -- (gcc or other) that effectively builds the dynamic library.
--
-- Interfaces is the list of ALI files for the interfaces of a SAL.
-- It is empty if the library is not a SAL.
@@ -155,9 +138,9 @@ package MLib.Tgt is
-- Symbol_Data is used for some patforms, including VMS, to generate
-- the symbols to be exported by the library.
--
- -- Note: Depending on the OS, some of the parameters may not be taken
- -- into account. For example, on Linux, Foreign, Afiles Lib_Address and
- -- Relocatable are ignored.
+ -- Note: Depending on the OS, some of the parameters may not be taken into
+ -- account. For example, on Linux, Interfaces, Symbol_Data and Auto_Init
+ -- are ignored.
function Library_Exists_For
(Project : Project_Id; In_Tree : Project_Tree_Ref) return Boolean;
@@ -170,7 +153,16 @@ package MLib.Tgt is
-- Returns the file name of the library file of a library project.
-- This function can only be called for library projects.
+ function Library_Major_Minor_Id_Supported return Boolean;
+ -- Indicates if major and minor ids are supported for libraries.
+ -- If they are supported, then a Library_Version such as libtoto.so.1.2
+ -- will have a major id of 1 and a minor id of 2. Then litoto.so,
+ -- libtoto.so.1 and libtoto.so.1.2 will be created, all three designating
+ -- the same file.
+
private
+ No_Argument_List : constant Argument_List := (1 .. 0 => null);
+
-- Access to subprogram types for indirection
type String_Function is access function return String;
@@ -179,10 +171,7 @@ private
return String_List_Access;
type Build_Dynamic_Library_Function is access procedure
(Ofiles : Argument_List;
- Foreign : Argument_List;
- Afiles : Argument_List;
Options : Argument_List;
- Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
@@ -190,16 +179,12 @@ private
Driver_Name : Name_Id := No_Name;
Lib_Version : String := "";
Auto_Init : Boolean := False);
-
type Library_Exists_For_Function is access function
(Project : Project_Id; In_Tree : Project_Tree_Ref) return Boolean;
-
type Library_File_Name_For_Function is access function
(Project : Project_Id;
In_Tree : Project_Tree_Ref) return File_Name_Type;
-
type Boolean_Function is access function return Boolean;
-
type Library_Support_Function is access function return Library_Support;
function Archive_Builder_Default return String;
@@ -210,10 +195,8 @@ private
Archive_Builder_Options_Default'Access;
function Archive_Builder_Append_Options_Default return String_List_Access;
-
- Archive_Builder_Append_Options_Ptr :
- String_List_Access_Function :=
- Archive_Builder_Append_Options_Default'Access;
+ Archive_Builder_Append_Options_Ptr : String_List_Access_Function :=
+ Archive_Builder_Append_Options_Default'Access;
function Archive_Ext_Default return String;
Archive_Ext_Ptr : String_Function := Archive_Ext_Default'Access;
@@ -276,4 +259,8 @@ private
function Support_For_Libraries_Default return Library_Support;
Support_For_Libraries_Ptr : Library_Support_Function :=
Support_For_Libraries_Default'Access;
+
+ function Library_Major_Minor_Id_Supported_Default return Boolean;
+ Library_Major_Minor_Id_Supported_Ptr : Boolean_Function :=
+ Library_Major_Minor_Id_Supported_Default'Access;
end MLib.Tgt;