public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4550] [Ada] Delete unused runtime files
@ 2021-10-20 10:18 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-20 10:18 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f6f8b3f95e55084b59ecc8fbe0f0cfd485d58c39

commit r12-4550-gf6f8b3f95e55084b59ecc8fbe0f0cfd485d58c39
Author: Doug Rupp <rupp@adacore.com>
Date:   Thu Oct 14 08:41:56 2021 -0700

    [Ada] Delete unused runtime files
    
    gcc/ada/
    
            * libgnat/g-io-put__vxworks.adb: Remove (unused)
            * libgnat/s-parame__ae653.ads: Likewise.
            * libgnat/s-thread.ads: Likewise.
            * libgnat/s-thread__ae653.adb: Likewise.

Diff:
---
 gcc/ada/libgnat/g-io-put__vxworks.adb |  53 ---------
 gcc/ada/libgnat/s-parame__ae653.ads   | 196 ----------------------------------
 gcc/ada/libgnat/s-thread.ads          |  92 ----------------
 gcc/ada/libgnat/s-thread__ae653.adb   | 163 ----------------------------
 4 files changed, 504 deletions(-)

diff --git a/gcc/ada/libgnat/g-io-put__vxworks.adb b/gcc/ada/libgnat/g-io-put__vxworks.adb
deleted file mode 100644
index 29307f9e129..00000000000
--- a/gcc/ada/libgnat/g-io-put__vxworks.adb
+++ /dev/null
@@ -1,53 +0,0 @@
-------------------------------------------------------------------------------
---                                                                          --
---                         GNAT RUN-TIME COMPONENTS                         --
---                                                                          --
---                              G N A T . I O                               --
---                                                                          --
---                                 B o d y                                  --
---                                                                          --
---                     Copyright (C) 1995-2021, AdaCore                     --
---                                                                          --
--- GNAT is free software;  you can  redistribute it  and/or modify it under --
--- terms of the  GNU General Public License as published  by the Free Soft- --
--- ware  Foundation;  either version 3,  or (at your option) any later ver- --
--- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
---                                                                          --
--- As a special exception under Section 7 of GPL version 3, you are granted --
--- additional permissions described in the GCC Runtime Library Exception,   --
--- version 3.1, as published by the Free Software Foundation.               --
---                                                                          --
--- You should have received a copy of the GNU General Public License and    --
--- a copy of the GCC Runtime Library Exception along with this program;     --
--- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
--- <http://www.gnu.org/licenses/>.                                          --
---                                                                          --
--- GNAT was originally developed  by the GNAT team at  New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc.      --
---                                                                          --
-------------------------------------------------------------------------------
-
---  vxworks zfp version of Put (C : Character)
-
-with Interfaces.C; use Interfaces.C;
-
-separate (GNAT.IO)
-procedure Put (C : Character) is
-
-   function ioGlobalStdGet
-     (File : int) return int;
-   pragma Import (C, ioGlobalStdGet, "ioGlobalStdGet");
-
-   procedure fdprintf
-     (File   : int;
-      Format : String;
-      Value  : Character);
-   pragma Import (C, fdprintf, "fdprintf");
-
-   Stdout_ID : constant int := 1;
-
-begin
-   fdprintf (ioGlobalStdGet (Stdout_ID), "%c" & ASCII.NUL, C);
-end Put;
diff --git a/gcc/ada/libgnat/s-parame__ae653.ads b/gcc/ada/libgnat/s-parame__ae653.ads
deleted file mode 100644
index a3e23512489..00000000000
--- a/gcc/ada/libgnat/s-parame__ae653.ads
+++ /dev/null
@@ -1,196 +0,0 @@
-------------------------------------------------------------------------------
---                                                                          --
---                         GNAT COMPILER COMPONENTS                         --
---                                                                          --
---                    S Y S T E M . P A R A M E T E R S                     --
---                                                                          --
---                                 S p e c                                  --
---                                                                          --
---          Copyright (C) 1992-2021, Free Software Foundation, Inc.         --
---                                                                          --
--- GNAT is free software;  you can  redistribute it  and/or modify it under --
--- terms of the  GNU General Public License as published  by the Free Soft- --
--- ware  Foundation;  either version 3,  or (at your option) any later ver- --
--- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
---                                                                          --
--- As a special exception under Section 7 of GPL version 3, you are granted --
--- additional permissions described in the GCC Runtime Library Exception,   --
--- version 3.1, as published by the Free Software Foundation.               --
---                                                                          --
--- You should have received a copy of the GNU General Public License and    --
--- a copy of the GCC Runtime Library Exception along with this program;     --
--- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
--- <http://www.gnu.org/licenses/>.                                          --
---                                                                          --
--- GNAT was originally developed  by the GNAT team at  New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc.      --
---                                                                          --
-------------------------------------------------------------------------------
-
---  Version is used by VxWorks 653, VxWorks MILS, and VxWorks6 cert Ravenscar
-
---  This package defines some system dependent parameters for GNAT. These
---  are values that are referenced by the runtime library and are therefore
---  relevant to the target machine.
-
---  The parameters whose value is defined in the spec are not generally
---  expected to be changed. If they are changed, it will be necessary to
---  recompile the run-time library.
-
---  The parameters which are defined by functions can be changed by modifying
---  the body of System.Parameters in file s-parame.adb. A change to this body
---  requires only rebinding and relinking of the application.
-
---  Note: do not introduce any pragma Inline statements into this unit, since
---  otherwise the relinking and rebinding capability would be deactivated.
-
-package System.Parameters is
-   pragma Pure;
-
-   ---------------------------------------
-   -- Task And Stack Allocation Control --
-   ---------------------------------------
-
-   type Size_Type is range
-     -(2 ** (Integer'(Standard'Address_Size) - 1)) ..
-     +(2 ** (Integer'(Standard'Address_Size) - 1)) - 1;
-   --  Type used to provide task stack sizes to the runtime. Sized to permit
-   --  stack sizes of up to half the total addressable memory space. This may
-   --  seem excessively large (even for 32-bit systems), however there are many
-   --  instances of users requiring large stack sizes (for example string
-   --  processing).
-
-   Unspecified_Size : constant Size_Type := Size_Type'First;
-   --  Value used to indicate that no size type is set
-
-   function Default_Stack_Size return Size_Type;
-   --  Default task stack size used if none is specified
-
-   function Minimum_Stack_Size return Size_Type;
-   --  Minimum task stack size permitted
-
-   function Adjust_Storage_Size (Size : Size_Type) return Size_Type;
-   --  Given the storage size stored in the TCB, return the Storage_Size
-   --  value required by the RM for the Storage_Size attribute. The
-   --  required adjustment is as follows:
-   --
-   --    when Size = Unspecified_Size, return Default_Stack_Size
-   --    when Size < Minimum_Stack_Size, return Minimum_Stack_Size
-   --    otherwise return given Size
-
-   Default_Env_Stack_Size : constant Size_Type := 14_336;
-   --  Assumed size of the environment task, if no other information
-   --  is available. This value is used when stack checking is
-   --  enabled and no GNAT_STACK_LIMIT environment variable is set.
-   --  This value is chosen as the VxWorks default stack size is 20kB,
-   --  and a little more than 4kB is necessary for the run time.
-
-   Stack_Grows_Down  : constant Boolean := True;
-   --  This constant indicates whether the stack grows up (False) or
-   --  down (True) in memory as functions are called. It is used for
-   --  proper implementation of the stack overflow check.
-
-   Runtime_Default_Sec_Stack_Size : constant Size_Type := 10 * 1024;
-   --  The run-time chosen default size for secondary stacks that may be
-   --  overridden by the user with the use of binder -D switch.
-
-   Sec_Stack_Dynamic : constant Boolean := False;
-   --  Indicates if secondary stacks can grow and shrink at run-time. If False,
-   --  the size of a secondary stack is fixed at the point of its creation.
-
-   ------------------------------------
-   -- Characteristics of time_t type --
-   ------------------------------------
-
-   --  IMPORTANT NOTE:
-   --  time_t_bits must match the size specified in the VSB.
-
-   time_t_bits : constant := Long_Long_Integer'Size;
-   --  Number of bits in type time_t for SR0660 and newer,
-   --  with the default configuration of the VSB.
-
-   ----------------------------------------------
-   -- Characteristics of types in Interfaces.C --
-   ----------------------------------------------
-
-   long_bits : constant := Long_Integer'Size;
-   --  Number of bits in type long and unsigned_long. The normal convention
-   --  is that this is the same as type Long_Integer, but this may not be true
-   --  of all targets.
-
-   ptr_bits  : constant := Standard'Address_Size;
-   subtype C_Address is System.Address;
-   --  Number of bits in Interfaces.C pointers, normally a standard address
-
-   C_Malloc_Linkname : constant String := "__gnat_malloc";
-   --  Name of runtime function used to allocate such a pointer
-
-   ----------------------------------------------
-   -- Behavior of Pragma Finalize_Storage_Only --
-   ----------------------------------------------
-
-   --  Garbage_Collected is a Boolean constant whose value indicates the
-   --  effect of the pragma Finalize_Storage_Entry on a controlled type.
-
-   --    Garbage_Collected = False
-
-   --      The system releases all storage on program termination only,
-   --      but not other garbage collection occurs, so finalization calls
-   --      are omitted only for outer level objects can be omitted if
-   --      pragma Finalize_Storage_Only is used.
-
-   --    Garbage_Collected = True
-
-   --      The system provides full garbage collection, so it is never
-   --      necessary to release storage for controlled objects for which
-   --      a pragma Finalize_Storage_Only is used.
-
-   Garbage_Collected : constant Boolean := False;
-   --  The storage mode for this system (release on program exit)
-
-   ---------------------
-   -- Tasking Profile --
-   ---------------------
-
-   --  In the following sections, constant parameters are defined to
-   --  allow some optimizations and fine tuning within the tasking run time
-   --  based on restrictions on the tasking features.
-
-   -------------------
-   -- Task Abortion --
-   -------------------
-
-   No_Abort : constant Boolean := False;
-   --  This constant indicates whether abort statements and asynchronous
-   --  transfer of control (ATC) are disallowed. If set to True, it is
-   --  assumed that neither construct is used, and the run time does not
-   --  need to defer/undefer abort and check for pending actions at
-   --  completion points. A value of True for No_Abort corresponds to:
-   --  pragma Restrictions (No_Abort_Statements);
-   --  pragma Restrictions (Max_Asynchronous_Select_Nesting => 0);
-
-   ---------------------
-   -- Task Attributes --
-   ---------------------
-
-   Max_Attribute_Count : constant := 8;
-   --  Number of task attributes stored in the task control block
-
-   -----------------------
-   -- Task Image Length --
-   -----------------------
-
-   Max_Task_Image_Length : constant := 32;
-   --  This constant specifies the maximum length of a task's image
-
-   ------------------------------
-   -- Exception Message Length --
-   ------------------------------
-
-   Default_Exception_Msg_Max_Length : constant := 200;
-   --  This constant specifies the default number of characters to allow
-   --  in an exception message (200 is minimum required by RM 11.4.1(18)).
-
-end System.Parameters;
diff --git a/gcc/ada/libgnat/s-thread.ads b/gcc/ada/libgnat/s-thread.ads
deleted file mode 100644
index 6508df50c3f..00000000000
--- a/gcc/ada/libgnat/s-thread.ads
+++ /dev/null
@@ -1,92 +0,0 @@
-------------------------------------------------------------------------------
---                                                                          --
---                         GNAT COMPILER COMPONENTS                         --
---                                                                          --
---                       S Y S T E M . T H R E A D S                        --
---                                                                          --
---                                 S p e c                                  --
---                                                                          --
---          Copyright (C) 1992-2021, Free Software Foundation, Inc.         --
---                                                                          --
--- GNAT is free software;  you can  redistribute it  and/or modify it under --
--- terms of the  GNU General Public License as published  by the Free Soft- --
--- ware  Foundation;  either version 3,  or (at your option) any later ver- --
--- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
---                                                                          --
--- As a special exception under Section 7 of GPL version 3, you are granted --
--- additional permissions described in the GCC Runtime Library Exception,   --
--- version 3.1, as published by the Free Software Foundation.               --
---                                                                          --
--- You should have received a copy of the GNU General Public License and    --
--- a copy of the GCC Runtime Library Exception along with this program;     --
--- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
--- <http://www.gnu.org/licenses/>.                                          --
---                                                                          --
--- GNAT was originally developed  by the GNAT team at  New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc.      --
---                                                                          --
-------------------------------------------------------------------------------
-
---  This package provides facilities to register a thread to the runtime,
---  and allocate its task specific datas.
-
---  This package is currently implemented for:
-
---    VxWorks7r2Cert Light
-
-with Ada.Unchecked_Conversion;
-
-with Interfaces.C;
-
-with System.Secondary_Stack;
-
-package System.Threads is
-
-   package SST renames System.Secondary_Stack;
-
-   type ATSD is limited private;
-   --  Type of the Ada thread specific data. It contains datas needed
-   --  by the GNAT runtime.
-
-   type ATSD_Access is access ATSD;
-   function From_Address is
-     new Ada.Unchecked_Conversion (Address, ATSD_Access);
-
-   subtype STATUS is Interfaces.C.int;
-   --  Equivalent of the C type STATUS
-
-   type t_id is new Interfaces.C.long;
-   subtype Thread_Id is t_id;
-
-   function Register (T : Thread_Id) return STATUS;
-   --  Create the task specific data necessary for Ada language support
-
-   --------------------------
-   -- Thread Body Handling --
-   --------------------------
-
-   --  The subprograms in this section are called from the process body
-   --  wrapper in the APEX process registration package.
-
-   procedure Thread_Body_Enter
-     (Sec_Stack_Ptr        : SST.SS_Stack_Ptr;
-      Process_ATSD_Address : System.Address);
-   --  Enter thread body, see above for details
-
-   procedure Thread_Body_Leave;
-   --  Leave thread body (normally), see above for details
-
-   procedure Thread_Body_Exceptional_Exit;
-   --  Leave thread body (abnormally on exception), see above for details
-
-private
-
-   type ATSD is record
-      Sec_Stack_Ptr : SST.SS_Stack_Ptr;
-      --  Pointer of the allocated secondary stack
-
-   end record;
-
-end System.Threads;
diff --git a/gcc/ada/libgnat/s-thread__ae653.adb b/gcc/ada/libgnat/s-thread__ae653.adb
deleted file mode 100644
index 2282a66c87a..00000000000
--- a/gcc/ada/libgnat/s-thread__ae653.adb
+++ /dev/null
@@ -1,163 +0,0 @@
-------------------------------------------------------------------------------
---                                                                          --
---                         GNAT COMPILER COMPONENTS                         --
---                                                                          --
---                       S Y S T E M . T H R E A D S                        --
---                                                                          --
---                                 B o d y                                  --
---                                                                          --
---          Copyright (C) 1992-2021, Free Software Foundation, Inc.         --
---                                                                          --
--- GNAT is free software;  you can  redistribute it  and/or modify it under --
--- terms of the  GNU General Public License as published  by the Free Soft- --
--- ware  Foundation;  either version 3,  or (at your option) any later ver- --
--- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
---                                                                          --
--- As a special exception under Section 7 of GPL version 3, you are granted --
--- additional permissions described in the GCC Runtime Library Exception,   --
--- version 3.1, as published by the Free Software Foundation.               --
---                                                                          --
--- You should have received a copy of the GNU General Public License and    --
--- a copy of the GCC Runtime Library Exception along with this program;     --
--- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
--- <http://www.gnu.org/licenses/>.                                          --
---                                                                          --
--- GNAT was originally developed  by the GNAT team at  New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc.      --
---                                                                          --
-------------------------------------------------------------------------------
-
---  This is the VxWorks7r2Cert Light version of this package
-
-pragma Restrictions (No_Tasking);
---  The VxWorks7r2Cert Light version of this package is intended only
---  for programs which do not use Ada tasking. This restriction ensures
---  that this will be checked by the binder.
-
-with System.Storage_Elements; use System.Storage_Elements;
-
-package body System.Threads is
-
-   use Interfaces.C;
-
-   Main_ATSD : aliased ATSD;
-   --  TSD for environment task
-
-   Current_ATSD : aliased System.Address := System.Null_Address;
-   pragma Thread_Local_Storage (Current_ATSD);
-   --  pragma TLS needed since TaskVarAdd no longer available
-
-   --  VxWorks specific API
-   ERROR : constant STATUS := Interfaces.C.int (-1);
-   OK    : constant STATUS := Interfaces.C.int (0);
-
-   function taskIdVerify (tid : t_id) return STATUS;
-   pragma Import (C, taskIdVerify, "taskIdVerify");
-
-   function taskIdSelf return t_id;
-   pragma Import (C, taskIdSelf, "taskIdSelf");
-
-   -----------------------
-   -- Local Subprograms --
-   -----------------------
-
-   procedure Init_RTS;
-   --  This procedure performs the initialization of the run-time lib.
-   --  It installs System.Threads versions of certain operations of the
-   --  run-time lib.
-
-   function  Get_Sec_Stack return SST.SS_Stack_Ptr;
-
-   -----------------------
-   -- Thread_Body_Enter --
-   -----------------------
-
-   procedure Thread_Body_Enter
-     (Sec_Stack_Ptr        : SST.SS_Stack_Ptr;
-      Process_ATSD_Address : System.Address)
-   is
-
-      ATSD : constant ATSD_Access := From_Address (Process_ATSD_Address);
-
-   begin
-
-      ATSD.Sec_Stack_Ptr := Sec_Stack_Ptr;
-      SST.SS_Init (ATSD.Sec_Stack_Ptr);
-      Current_ATSD := Process_ATSD_Address;
-
-   end Thread_Body_Enter;
-
-   ----------------------------------
-   -- Thread_Body_Exceptional_Exit --
-   ----------------------------------
-
-   procedure Thread_Body_Exceptional_Exit is
-   begin
-      --  No action for this target
-
-      null;
-   end Thread_Body_Exceptional_Exit;
-
-   -----------------------
-   -- Thread_Body_Leave --
-   -----------------------
-
-   procedure Thread_Body_Leave is
-   begin
-      --  No action for this target
-
-      null;
-   end Thread_Body_Leave;
-
-   --------------
-   -- Init_RTS --
-   --------------
-
-   procedure Init_RTS is
-      --  Register environment task
-      Result : constant Interfaces.C.int := Register (taskIdSelf);
-      pragma Assert (Result /= ERROR);
-
-   begin
-      Main_ATSD.Sec_Stack_Ptr := Get_Sec_Stack;
-      Current_ATSD := Main_ATSD'Address;
-   end Init_RTS;
-
-   -------------------
-   -- Get_Sec_Stack --
-   -------------------
-
-   function  Get_Sec_Stack return SST.SS_Stack_Ptr is
-      CTSD : constant ATSD_Access := From_Address (Current_ATSD);
-   begin
-      pragma Assert (CTSD /= null);
-      return CTSD.Sec_Stack_Ptr;
-   end Get_Sec_Stack;
-
-   --------------
-   -- Register --
-   --------------
-
-   function Register (T : Thread_Id) return STATUS is
-   begin
-      --  It cannot be assumed that the caller of this routine has a ATSD;
-      --  so neither this procedure nor the procedures that it calls should
-      --  raise or handle exceptions, or make use of a secondary stack.
-
-      if taskIdVerify (T) = ERROR then
-         return ERROR;
-      end if;
-
-      Current_ATSD := To_Address (Integer_Address (T));
-
-      return OK;
-   end Register;
-
-begin
-   --  Initialize run-time library
-
-   Init_RTS;
-
-end System.Threads;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-20 10:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 10:18 [gcc r12-4550] [Ada] Delete unused runtime files Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).