1------------------------------------------------------------------------------
2--                                                                          --
3--                         GNAT COMPILER COMPONENTS                         --
4--                                                                          --
5--              S Y S T E M . S T A N D A R D _ L I B R A R Y               --
6--                                                                          --
7--                                 B o d y                                  --
8--                                                                          --
9--          Copyright (C) 1995-2020, Free Software Foundation, Inc.         --
10--                                                                          --
11-- GNAT is free software;  you can  redistribute it  and/or modify it under --
12-- terms of the  GNU General Public License as published  by the Free Soft- --
13-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
14-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
17--                                                                          --
18-- As a special exception under Section 7 of GPL version 3, you are granted --
19-- additional permissions described in the GCC Runtime Library Exception,   --
20-- version 3.1, as published by the Free Software Foundation.               --
21--                                                                          --
22-- You should have received a copy of the GNU General Public License and    --
23-- a copy of the GCC Runtime Library Exception along with this program;     --
24-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
25-- <http://www.gnu.org/licenses/>.                                          --
26--                                                                          --
27-- GNAT was originally developed  by the GNAT team at  New York University. --
28-- Extensive contributions were provided by Ada Core Technologies Inc.      --
29--                                                                          --
30------------------------------------------------------------------------------
31
32pragma Compiler_Unit_Warning;
33
34--  The purpose of this body is simply to ensure that the two with'ed units
35--  are properly included in the link. They are not with'ed from the spec
36--  of System.Standard_Library, since this would cause order of elaboration
37--  problems (Elaborate_Body would have the same problem).
38
39pragma Warnings (Off);
40--  Kill warnings from unused withs. These unused with's are here to make
41--  sure the relevant units are loaded and properly elaborated.
42
43with System.Soft_Links;
44--  Referenced directly from generated code using external symbols so it
45--  must always be present in a build, even if no unit has a direct with
46--  of this unit. Also referenced from exception handling routines.
47--  This is needed for programs that don't use exceptions explicitly but
48--  direct calls to Ada.Exceptions are generated by gigi (for example,
49--  by calling __gnat_raise_constraint_error directly).
50
51with System.Memory;
52--  Referenced directly from generated code using external symbols, so it
53--  must always be present in a build, even if no unit has a direct with
54--  of this unit.
55
56pragma Warnings (On);
57
58package body System.Standard_Library is
59
60   Runtime_Finalized : Boolean := False;
61   --  Set to True when adafinal is called. Used to ensure that subsequent
62   --  calls to adafinal after the first have no effect.
63
64   --------------------------
65   -- Abort_Undefer_Direct --
66   --------------------------
67
68   procedure Abort_Undefer_Direct is
69   begin
70      System.Soft_Links.Abort_Undefer.all;
71   end Abort_Undefer_Direct;
72
73   --------------
74   -- Adafinal --
75   --------------
76
77   procedure Adafinal is
78   begin
79      if not Runtime_Finalized then
80         Runtime_Finalized := True;
81         System.Soft_Links.Adafinal.all;
82      end if;
83   end Adafinal;
84
85   -----------------
86   -- Break_Start --
87   -----------------
88
89   procedure Break_Start;
90   pragma Export (C, Break_Start, "__gnat_break_start");
91   --  This is a dummy procedure that is called at the start of execution.
92   --  Its sole purpose is to provide a well defined point for the placement
93   --  of a main program breakpoint. This is not used anymore but kept for
94   --  bootstrapping issues (still referenced by old gnatbind generated files).
95
96   procedure Break_Start is
97   begin
98      null;
99   end Break_Start;
100
101end System.Standard_Library;
102