Commit fa0c3a2a authored by yoogx's avatar yoogx

* Use pragma Suppress (Elaboration_Checks) on Native and Hi-E

          targets, use Sequential elaboration policy when possible

          For openaadl/ocarina#106
parent 37bedd85
......@@ -37,7 +37,8 @@ ADA_BODIES = $(ADA_SPECS_WITH_BODY:.ads=.adb) \
# END: DO NOT DELETE THIS LINE
ADA_ADC = $(srcdir)/gnat.adc $(srcdir)/hi-e.adc $(srcdir)/native.adc
ADA_ADC = $(srcdir)/gnat.adc $(srcdir)/hi-e.adc $(srcdir)/native.adc \
$(srcdir)/gnat_runtime.adc
EXTRA_DIST = $(ADA_SPECS) $(ADA_BODIES) $(ADA_ADC)
......
-- Ada restrictions to be supported by PolyORB-HI/Ada, for GNAT
-- Runtime targets, e.g. ARM driver libraries
--------------------------------------------------------------------------------
-- Enforce Ravenscar profile.
pragma Profile (Ravenscar); -- D.13.1
--------------------------------------------------------------------------------
-- Activate SPARK Mode, even if we do not actually use it on the
-- target: the code has Spark_Mode disabled in some occurences,
-- without this pragma the code would be rejected.
--pragma Spark_Mode (On);
--------------------------------------------------------------------------------
-- The following define restrictions to be supported by the
-- PolyORB-HI, common restrictions
--
-- For each restriction, we list its definition place in the Ada 2005
-- reference manual.
-- Note: most of these restrictions are *NOT* supported by
-- Ada_Drivers_Library
-- pragma Restrictions (No_Allocators); -- H.4 (7)
-- pragma Restrictions (No_Floating_Point); -- H.4 (14)
-- pragma Restrictions (No_Access_Subprograms); -- H.4 (17)
-- pragma Restrictions (No_Unchecked_Access); -- H.4 (18)
-- pragma Restrictions (No_Dispatch); -- H.4 (19)
-- pragma Restrictions (No_IO); -- H.4 (20)
-- pragma Restrictions (No_Recursion); -- H.4 (22)
pragma Partition_Elaboration_Policy (Sequential); -- H.6 (3)
-- This policy eases task initial synchronization and the bootstrap
-- of the VM, see Ada 2005 Rationale for more details). (Not yet
-- supported by GNAT for Native platforms)
-- pragma Restriction_Warnings (No_Implementation_Attributes); -- 13.12 (2)
-- Style-check to enforce compliance with pure Ada, but also to avoid
-- the 'Unrestricted_Access attribute, which is GNAT specific.
-- pragma Restrictions (No_Obsolescent_Features); -- 13.12 (4)
-- Deactivated as of 20090702: GPL 2009 deprecated
-- GNAT.Sockets.Initialize, but it might still be required for older
-- compilers supported.
pragma Restrictions (No_Unchecked_Deallocation); -- J.13 (4)
-- Sibling of the No_Allocators restriction.
-- XXX to be replaced with a No_Dependence restriction
-- GNAT Specific restrictions
pragma Restrictions (No_Streams); -- GNAT specific
-- pragma Restrictions (No_Direct_Boolean_Operators); -- GNAT specific
-- For the use of "and then" and "or else" in boolean operations
-- pragma Restrictions (No_Enumeration_Maps); -- GNAT specific
-- Forbids <type>'Image for enumeration types. Cannot be supported
-- because some examples use it
-- pragma Restrictions (No_Implicit_Conditionals); -- GNAT specific
-- pragma Restrictions (No_Implicit_Loops); -- GNAT specific
......@@ -5,6 +5,8 @@
pragma Profile (Ravenscar); -- D.13.1
pragma Suppress (Elaboration_Check);
--------------------------------------------------------------------------------
-- Activate SPARK Mode, even if we do not actually use it on the
-- target: the code has Spark_Mode disabled in some occurences,
......
......@@ -14,6 +14,8 @@
pragma Locking_Policy (Ceiling_Locking); -- D.13.1
pragma Profile_Warnings (Ravenscar); -- D.13.1
pragma Suppress (Elaboration_Check);
--------------------------------------------------------------------------------
-- Activate SPARK Mode, even if we do not actually use it on the
-- target: the code has Spark_Mode disabled in some occurences,
......
......@@ -62,9 +62,6 @@ project PolyORB_HI is
--@WARNINGS_ARE_ERRORS@"-gnatfy", -- Style warnings
--@WARNINGS_ARE_ERRORS@"-gnatwe", -- Warnings are errors
"-gnatwG", -- Suppress warnings on unrecognized pragmas
"-gnatE", -- Dynamic elaboration checking mode enabled
-- XXX This is a work around, see issue #106 for details
"-gnat12" -- Ada 2012 mode
);
......@@ -132,10 +129,8 @@ project PolyORB_HI is
for Local_Configuration_Pragmas use "hi-e.adc";
when "GNAT_Runtime" =>
-- For GNAT runtimes, it is assumed an external configuration file
-- is provided
for Local_Configuration_Pragmas use "gnat_runtime.adc";
null;
end case;
end Compiler;
......@@ -187,12 +182,13 @@ project PolyORB_HI is
-- because of clang linker.
for Default_Switches ("ada") use ("-g", "-Wl,--gc-sections");
when others =>
when others =>
for Default_Switches ("ada") use ("-g");
end case;
when "Release" | "Analyzable" =>
null;
null;
end case;
end Linker;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment