]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Generate runtime restrictions list when the standard library is suppressed
authorPatrick Bernardi <bernardi@adacore.com>
Thu, 17 Aug 2023 20:24:13 +0000 (16:24 -0400)
committerMarc Poulhiès <poulhies@adacore.com>
Fri, 15 Sep 2023 13:01:30 +0000 (15:01 +0200)
With the introduction of Jorvik support into the light-tasking runtime comes
the requirement to detect voliations of runtime restrictions (for example
Max_Entry_Queue_Length) where previously they could be hard coded in the
runtime. This means we now need the binder to populate
System.System.Restrictions.Run_Time_Restrictions when the standard library
is suppressed.

gcc/ada/

* bindgen.adb (Gen_Adainit): Generate restrictions when standard
library is suppressed.
(Gen_Output_File_Ada): Ditto.
(Gen_Restrictions): Ditto.

gcc/ada/bindgen.adb

index ae20e5f40d3813c0d3f2ba3b4e800dd0805b59e6..87f162e6b430a1626b7795781050ea62f58ba784 100644 (file)
@@ -691,6 +691,8 @@ package body Bindgen is
             WBI ("      null;");
          end if;
 
+         Gen_Restrictions;
+
          --  Generate the default-sized secondary stack pool if the secondary
          --  stack is used by the program.
 
@@ -2804,9 +2806,7 @@ package body Bindgen is
       --  Generate with of System.Restrictions to initialize
       --  Run_Time_Restrictions.
 
-      if System_Restrictions_Used
-        and not Suppress_Standard_Library_On_Target
-      then
+      if System_Restrictions_Used then
          WBI ("");
          WBI ("with System.Restrictions;");
       end if;
@@ -2946,9 +2946,7 @@ package body Bindgen is
       Count : Integer;
 
    begin
-      if Suppress_Standard_Library_On_Target
-        or not System_Restrictions_Used
-      then
+      if not System_Restrictions_Used then
          return;
       end if;