1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- M L I B . T G T . S P E C I F I C --
6 -- (VxWorks Version) --
10 -- Copyright (C) 2003-2007, Free Software Foundation, Inc. --
12 -- GNAT is free software; you can redistribute it and/or modify it under --
13 -- terms of the GNU General Public License as published by the Free Soft- --
14 -- ware Foundation; either version 2, or (at your option) any later ver- --
15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
18 -- for more details. You should have received a copy of the GNU General --
19 -- Public License distributed with GNAT; see file COPYING. If not, write --
20 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
21 -- Boston, MA 02110-1301, USA. --
23 -- GNAT was originally developed by the GNAT team at New York University. --
24 -- Extensive contributions were provided by Ada Core Technologies Inc. --
26 ------------------------------------------------------------------------------
28 -- This is the VxWorks version of the body
32 package body MLib.Tgt.Specific is
34 -----------------------
35 -- Local Subprograms --
36 -----------------------
38 function Get_Target_Suffix return String;
39 -- Returns the required suffix for some utilities
40 -- (such as ar and ranlib) that depend on the real target.
42 -- Non default subprograms
44 function Archive_Builder return String;
46 function Archive_Indexer return String;
48 procedure Build_Dynamic_Library
49 (Ofiles : Argument_List;
50 Options : Argument_List;
51 Interfaces : Argument_List;
52 Lib_Filename : String;
54 Symbol_Data : Symbol_Record;
55 Driver_Name : Name_Id := No_Name;
56 Lib_Version : String := "";
57 Auto_Init : Boolean := False);
59 function DLL_Ext return String;
61 function Dynamic_Option return String;
63 function Library_Major_Minor_Id_Supported return Boolean;
65 function PIC_Option return String;
67 function Standalone_Library_Auto_Init_Is_Supported return Boolean;
69 function Support_For_Libraries return Library_Support;
75 function Archive_Builder return String is
77 return "ar" & Get_Target_Suffix;
84 function Archive_Indexer return String is
86 return "ranlib" & Get_Target_Suffix;
89 ---------------------------
90 -- Build_Dynamic_Library --
91 ---------------------------
93 procedure Build_Dynamic_Library
94 (Ofiles : Argument_List;
95 Options : Argument_List;
96 Interfaces : Argument_List;
97 Lib_Filename : String;
99 Symbol_Data : Symbol_Record;
100 Driver_Name : Name_Id := No_Name;
101 Lib_Version : String := "";
102 Auto_Init : Boolean := False)
104 pragma Unreferenced (Ofiles);
105 pragma Unreferenced (Options);
106 pragma Unreferenced (Interfaces);
107 pragma Unreferenced (Lib_Filename);
108 pragma Unreferenced (Lib_Dir);
109 pragma Unreferenced (Symbol_Data);
110 pragma Unreferenced (Driver_Name);
111 pragma Unreferenced (Lib_Version);
112 pragma Unreferenced (Auto_Init);
116 end Build_Dynamic_Library;
122 function DLL_Ext return String is
131 function Dynamic_Option return String is
136 -----------------------------
137 -- Get_Target_Suffix --
138 -----------------------------
140 function Get_Target_Suffix return String is
141 Target_Name : constant String := Sdefault.Target_Name.all;
142 Index : Positive := Target_Name'First;
145 while Index < Target_Name'Last
146 and then Target_Name (Index + 1) /= '-'
151 if Target_Name (Target_Name'First .. Index) = "m68k" then
153 elsif Target_Name (Target_Name'First .. Index) = "mips" then
155 elsif Target_Name (Target_Name'First .. Index) = "powerpc" then
157 elsif Target_Name (Target_Name'First .. Index) = "sparc" then
159 elsif Target_Name (Target_Name'First .. Index) = "sparc64" then
161 elsif Target_Name (Target_Name'First .. Index) = "xscale" then
163 elsif Target_Name (Target_Name'First .. Index) = "i586" then
168 end Get_Target_Suffix;
170 --------------------------------------
171 -- Library_Major_Minor_Id_Supported --
172 --------------------------------------
174 function Library_Major_Minor_Id_Supported return Boolean is
177 end Library_Major_Minor_Id_Supported;
183 function PIC_Option return String is
188 -----------------------------------------------
189 -- Standalone_Library_Auto_Init_Is_Supported --
190 -----------------------------------------------
192 function Standalone_Library_Auto_Init_Is_Supported return Boolean is
195 end Standalone_Library_Auto_Init_Is_Supported;
197 ---------------------------
198 -- Support_For_Libraries --
199 ---------------------------
201 function Support_For_Libraries return Library_Support is
204 end Support_For_Libraries;
207 Archive_Builder_Ptr := Archive_Builder'Access;
208 Archive_Indexer_Ptr := Archive_Indexer'Access;
209 Build_Dynamic_Library_Ptr := Build_Dynamic_Library'Access;
210 DLL_Ext_Ptr := DLL_Ext'Access;
211 Dynamic_Option_Ptr := Dynamic_Option'Access;
212 PIC_Option_Ptr := PIC_Option'Access;
213 Library_Major_Minor_Id_Supported_Ptr :=
214 Library_Major_Minor_Id_Supported'Access;
215 Standalone_Library_Auto_Init_Is_Supported_Ptr :=
216 Standalone_Library_Auto_Init_Is_Supported'Access;
217 Support_For_Libraries_Ptr := Support_For_Libraries'Access;
218 end MLib.Tgt.Specific;