You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-lang/gnat-gpl/files/gnat-gpl-2016-profile.patch

114 lines
5.5 KiB

--- a/gcc/ada/s-rident.ads 2018-11-18 18:47:39.042412895 +0100
+++ b/gcc/ada/s-rident.ads 2018-11-18 19:02:31.736559044 +0100
@@ -378,15 +378,17 @@
type Profile_Name is
(No_Profile,
No_Implementation_Extensions,
+ Restricted_Tasking,
+ Restricted,
Ravenscar,
GNAT_Extended_Ravenscar,
- Restricted);
+ GNAT_Ravenscar_EDF);
-- Names of recognized profiles. No_Profile is used to indicate that a
-- restriction came from pragma Restrictions[_Warning], as opposed to
-- pragma Profile[_Warning].
subtype Profile_Name_Actual is Profile_Name
- range No_Implementation_Extensions .. Restricted;
+ range No_Implementation_Extensions .. Profile_Name'Last;
-- Actual used profile names
type Profile_Data is record
@@ -456,6 +458,40 @@
Max_Task_Entries => 0,
others => 0)),
+ -- Restricted_Tasking Profile
+
+ Restricted_Tasking =>
+
+ -- Restrictions for Restricted_Tasking profile
+
+ (Set =>
+ (No_Abort_Statements => True,
+ No_Asynchronous_Control => True,
+ No_Dynamic_Attachment => True,
+ No_Dynamic_Priorities => True,
+ No_Entry_Queue => True,
+ No_Local_Protected_Objects => True,
+ No_Protected_Type_Allocators => True,
+ No_Requeue_Statements => True,
+ No_Task_Allocators => True,
+ No_Task_Attributes_Package => True,
+ No_Task_Hierarchy => True,
+ No_Terminate_Alternatives => True,
+ Max_Asynchronous_Select_Nesting => True,
+ Max_Protected_Entries => True,
+ Max_Select_Alternatives => True,
+ Max_Task_Entries => True,
+ others => False),
+
+ -- Value settings for Restricted profile
+
+ Value =>
+ (Max_Asynchronous_Select_Nesting => 0,
+ Max_Protected_Entries => 1,
+ Max_Select_Alternatives => 0,
+ Max_Task_Entries => 0,
+ others => 0)),
+
-- Ravenscar Profile
-- Note: the table entries here only represent the
@@ -509,6 +545,49 @@
Max_Task_Entries => 0,
others => 0)),
+ GNAT_Ravenscar_EDF =>
+
+ -- Restrictions for Ravenscar = Restricted profile ..
+
+ (Set =>
+ (No_Abort_Statements => True,
+ No_Asynchronous_Control => True,
+ No_Dynamic_Attachment => True,
+ No_Dynamic_Priorities => True,
+ No_Entry_Queue => True,
+ No_Local_Protected_Objects => True,
+ No_Protected_Type_Allocators => True,
+ No_Requeue_Statements => True,
+ No_Task_Allocators => True,
+ No_Task_Attributes_Package => True,
+ No_Task_Hierarchy => True,
+ No_Terminate_Alternatives => True,
+ Max_Asynchronous_Select_Nesting => True,
+ Max_Protected_Entries => True,
+ Max_Select_Alternatives => True,
+ Max_Task_Entries => True,
+
+ -- plus these additional restrictions:
+
+ No_Calendar => True,
+ No_Implicit_Heap_Allocations => True,
+ No_Local_Timing_Events => True,
+ No_Relative_Delay => True,
+ No_Select_Statements => True,
+ No_Specific_Termination_Handlers => True,
+ No_Task_Termination => True,
+ Simple_Barriers => True,
+ others => False),
+
+ -- Value settings for Ravenscar (same as Restricted)
+
+ Value =>
+ (Max_Asynchronous_Select_Nesting => 0,
+ Max_Protected_Entries => 1,
+ Max_Select_Alternatives => 0,
+ Max_Task_Entries => 0,
+ others => 0)),
+
GNAT_Extended_Ravenscar =>
-- Restrictions for GNAT_Extended_Ravenscar =