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-2018, 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 Polling (Off); 40-- We must turn polling off for this unit, because otherwise we get 41-- elaboration circularities with Ada.Exceptions if polling is on. 42 43pragma Warnings (Off); 44-- Kill warnings from unused withs. These unused with's are here to make 45-- sure the relevant units are loaded and properly elaborated. 46 47with System.Soft_Links; 48-- Referenced directly from generated code using external symbols so it 49-- must always be present in a build, even if no unit has a direct with 50-- of this unit. Also referenced from exception handling routines. 51-- This is needed for programs that don't use exceptions explicitly but 52-- direct calls to Ada.Exceptions are generated by gigi (for example, 53-- by calling __gnat_raise_constraint_error directly). 54 55with System.Memory; 56-- Referenced directly from generated code using external symbols, so it 57-- must always be present in a build, even if no unit has a direct with 58-- of this unit. 59 60pragma Warnings (On); 61 62package body System.Standard_Library is 63 64 Runtime_Finalized : Boolean := False; 65 -- Set to True when adafinal is called. Used to ensure that subsequent 66 -- calls to adafinal after the first have no effect. 67 68 -------------------------- 69 -- Abort_Undefer_Direct -- 70 -------------------------- 71 72 procedure Abort_Undefer_Direct is 73 begin 74 System.Soft_Links.Abort_Undefer.all; 75 end Abort_Undefer_Direct; 76 77 -------------- 78 -- Adafinal -- 79 -------------- 80 81 procedure Adafinal is 82 begin 83 if not Runtime_Finalized then 84 Runtime_Finalized := True; 85 System.Soft_Links.Adafinal.all; 86 end if; 87 end Adafinal; 88 89 ----------------- 90 -- Break_Start -- 91 ----------------- 92 93 procedure Break_Start; 94 pragma Export (C, Break_Start, "__gnat_break_start"); 95 -- This is a dummy procedure that is called at the start of execution. 96 -- Its sole purpose is to provide a well defined point for the placement 97 -- of a main program breakpoint. This is not used anymore but kept for 98 -- bootstrapping issues (still referenced by old gnatbind generated files). 99 100 procedure Break_Start is 101 begin 102 null; 103 end Break_Start; 104 105end System.Standard_Library; 106