Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PolyORB-HI-Ada
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
PolyORB-HI-Ada
Commits
447efaab
Commit
447efaab
authored
Jun 16, 2017
by
Jerome Hugues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Clean up restriction pragmas, and add support for GNAT Runtime
parent
49d1de94
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
200 additions
and
24 deletions
+200
-24
src/Makefile.am
src/Makefile.am
+1
-0
src/hi-e.adc
src/hi-e.adc
+54
-15
src/native.adc
src/native.adc
+68
-2
src/polyorb_hi-output.adb
src/polyorb_hi-output.adb
+4
-2
src/polyorb_hi-output_low_level_gnatruntime.adb
src/polyorb_hi-output_low_level_gnatruntime.adb
+52
-0
src/polyorb_hi.gpr.in
src/polyorb_hi.gpr.in
+21
-5
No files found.
src/Makefile.am
View file @
447efaab
...
@@ -30,6 +30,7 @@ ADA_SPECS = $(ADA_SPECS_WITH_BODY) $(srcdir)/polyorb_hi.ads \
...
@@ -30,6 +30,7 @@ ADA_SPECS = $(ADA_SPECS_WITH_BODY) $(srcdir)/polyorb_hi.ads \
$(srcdir)
/polyorb_hi-transport_low_level.ads
$(srcdir)
/polyorb_hi-transport_low_level.ads
ADA_BODIES
=
$(ADA_SPECS_WITH_BODY:.ads=.adb)
\
ADA_BODIES
=
$(ADA_SPECS_WITH_BODY:.ads=.adb)
\
$(srcdir)
/polyorb_hi-output_low_level_gnatruntime.adb
\
$(srcdir)
/polyorb_hi-output_low_level_leon.adb
\
$(srcdir)
/polyorb_hi-output_low_level_leon.adb
\
$(srcdir)
/polyorb_hi-output_low_level_native.adb
\
$(srcdir)
/polyorb_hi-output_low_level_native.adb
\
$(srcdir)
/polyorb_hi-transport_low_level_sockets.adb
$(srcdir)
/polyorb_hi-transport_low_level_sockets.adb
...
...
src/hi-e.adc
View file @
447efaab
-- Ada restrictions to be supported by the PolyORB HI, for HI targets
-- Ada restrictions to be supported by PolyORB-HI/Ada, for HI targets
--------------------------------------------------------------------------------
-- Enforce Ravenscar profile.
pragma Profile (Ravenscar); -- D.13.1
pragma Profile (Ravenscar); -- D.13.1
pragma Restrictions (No_Dependence => Ada.Finalization); -- 13.12.1 (12)
--------------------------------------------------------------------------------
-- No controlled types, cannot be enforced for native compilers
-- Activate SPARK Mode, even if we do not actually use it on the
-- because of the s-tpoben file.
-- 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.
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_Dependence => Ada.Streams); -- 13.12.1 (12)
-- pragma Restrictions (No_Direct_Boolean_Operators); -- GNAT specific
-- No implicit dependency on Ada.Tags and other object oriented
-- For the use of "and then" and "or else" in boolean operations
-- compiler units. Cannot be enforced for native platforms because of
-- the g-socket file
-- pragma Restrictions (No_Exception_Handlers); -- GNAT specific
-- pragma Restrictions (No_Enumeration_Maps); -- GNAT specific
-- Implied by GNAT Pro 5.03a1 for High-Integrity, for the Ravenscar
-- Forbids <type>'Image for enumeration types. Cannot be supported
-- run-time, cannot be enforced for native compilers because of the
-- because some examples use it
-- s-tpoben file.
-- pragma Restrictions (No_Secondary_Stack); -- GNAT specific
-- pragma Restrictions (No_Implicit_Conditionals); -- GNAT specific
-- No unconstrained objects, including arrays, but also forbids
-- pragma Restrictions (No_Implicit_Loops); -- GNAT specific
-- string concatenation. (GNAT specific)
src/native.adc
View file @
447efaab
-- Ada restrictions to be supported by PolyORB
HI, for native
targets
-- Ada restrictions to be supported by PolyORB
-HI/Ada, for NATIVE
targets
pragma Profile_Warnings (Ravenscar); -- D.13.1
--------------------------------------------------------------------------------
-- Enforce Ravenscar profile.
--
-- Note that NATIVE targets are not Ravenscar compatible, we simply
-- look for warning. The user must run the program with admin rights
-- to have the right scheduling behavior.
--pragma Task_Dispatching_Policy (FIFO_Within_Priotities); -- D.13.1
-- Note: GCC 4.3.5 does not support this policy, changed to binder
-- option "-T0" per section A.3 of the GNAT user manual
pragma Locking_Policy (Ceiling_Locking); -- D.13.1
pragma Profile_Warnings (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.
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
src/polyorb_hi-output.adb
View file @
447efaab
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
-- --
-- --
-- B o d y --
-- B o d y --
-- --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
7
ESA & ISAE. --
-- --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- terms of the GNU General Public License as published by the Free Soft- --
...
@@ -177,8 +177,10 @@ package body PolyORB_HI.Output is
...
@@ -177,8 +177,10 @@ package body PolyORB_HI.Output is
end
if
;
end
if
;
PolyORB_HI
.
Output_Low_Level
.
Put
(
"["
);
PolyORB_HI
.
Output_Low_Level
.
Put
(
"["
);
-- XXX The following is disabled as some cross-runtime do not have
-- the capability to build Duration'Image
PolyORB_HI
.
Output_Low_Level
.
Put
PolyORB_HI
.
Output_Low_Level
.
Put
(
Duration
'
Image
(
To_Duration
(
Elapsed
*
1000
)));
(
Integer
'
Image
(
Integer
(
To_Duration
(
Elapsed
*
1000
)
)));
PolyORB_HI
.
Output_Low_Level
.
Put
(
"] "
);
PolyORB_HI
.
Output_Low_Level
.
Put
(
"] "
);
PolyORB_HI
.
Output_Low_Level
.
Put
(
Text
);
PolyORB_HI
.
Output_Low_Level
.
Put
(
Text
);
end
Unprotected_Put
;
end
Unprotected_Put
;
...
...
src/polyorb_hi-output_low_level_gnatruntime.adb
0 → 100644
View file @
447efaab
------------------------------------------------------------------------------
-- --
-- PolyORB HI COMPONENTS --
-- --
-- P O L Y O R B _ H I . O U T P U T _ L O W _ L E V E L --
-- --
-- B o d y --
-- --
-- Copyright (C) 2017 ESA & ISAE. --
-- --
-- PolyORB-HI is free software; you can redistribute it and/or modify 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. PolyORB-HI is distributed in the hope that it will be useful, but --
-- WITHOUT 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/>. --
-- --
-- PolyORB-HI/Ada is maintained by the TASTE project --
-- (taste-users@lists.tuxfamily.org) --
-- --
------------------------------------------------------------------------------
package
body
PolyORB_HI
.
Output_Low_Level
is
---------
-- Put --
---------
procedure
Put
(
S
:
String
)
is
begin
null
;
end
Put
;
--------------
-- New_Line --
--------------
procedure
New_Line
is
begin
null
;
end
New_Line
;
end
PolyORB_HI
.
Output_Low_Level
;
src/polyorb_hi.gpr.in
View file @
447efaab
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
--
--
--
--
--
P
r
o
j
e
c
t
--
--
P
r
o
j
e
c
t
--
--
--
--
--
--
Copyright
(
C
)
2007
-
2009
Telecom
ParisTech
,
2010
-
201
5
ESA
&
ISAE
.
--
--
Copyright
(
C
)
2007
-
2009
Telecom
ParisTech
,
2010
-
201
7
ESA
&
ISAE
.
--
--
--
--
--
--
PolyORB
-
HI
is
free
software
;
you
can
redistribute
it
and
/
or
modify
under
--
--
PolyORB
-
HI
is
free
software
;
you
can
redistribute
it
and
/
or
modify
under
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
...
@@ -31,7 +31,8 @@
...
@@ -31,7 +31,8 @@
project
PolyORB_HI
is
project
PolyORB_HI
is
type
Target_Type
is
(
"NATIVE"
,
"LEON_ORK"
,
"LEON_GNAT"
,
"ERC32"
,
"MARTEOS"
);
type
Target_Type
is
(
"NATIVE"
,
"LEON_ORK"
,
"LEON_GNAT"
,
"ERC32"
,
"MARTEOS"
,
"GNAT_Runtime"
);
Target
:
Target_Type
:=
external
(
"TARGET"
,
"NATIVE"
);
Target
:
Target_Type
:=
external
(
"TARGET"
,
"NATIVE"
);
type
Build_Type
is
(
"Debug"
,
"Release"
,
"Analyzable"
);
type
Build_Type
is
(
"Debug"
,
"Release"
,
"Analyzable"
);
...
@@ -122,8 +123,15 @@ project PolyORB_HI is
...
@@ -122,8 +123,15 @@ project PolyORB_HI is
case
Target
is
case
Target
is
when
"NATIVE"
|
"MARTEOS"
=>
when
"NATIVE"
|
"MARTEOS"
=>
for
Local_Configuration_Pragmas
use
"native.adc"
;
for
Local_Configuration_Pragmas
use
"native.adc"
;
when
"LEON_ORK"
|
"LEON_GNAT"
|
"ERC32"
=>
when
"LEON_ORK"
|
"LEON_GNAT"
|
"ERC32"
=>
for
Local_Configuration_Pragmas
use
"hi-e.adc"
;
for
Local_Configuration_Pragmas
use
"hi-e.adc"
;
when
"GNAT_Runtime"
=>
--
For
GNAT
runtimes
,
it
is
assumed
an
external
configuration
file
--
is
provided
null
;
end
case
;
end
case
;
end
Compiler
;
end
Compiler
;
...
@@ -132,8 +140,6 @@ project PolyORB_HI is
...
@@ -132,8 +140,6 @@ project PolyORB_HI is
-------------
-------------
package
Builder
is
package
Builder
is
for
Global_Configuration_Pragmas
use
"gnat.adc"
;
case
Build
is
case
Build
is
when
"Debug"
=>
when
"Debug"
=>
for
Default_Switches
(
"Ada"
)
use
(
"-s"
,
"-m"
,
"-g"
);
for
Default_Switches
(
"Ada"
)
use
(
"-s"
,
"-m"
,
"-g"
);
...
@@ -170,7 +176,17 @@ project PolyORB_HI is
...
@@ -170,7 +176,17 @@ project PolyORB_HI is
package
Linker
is
package
Linker
is
case
Build
is
case
Build
is
when
"Debug"
=>
when
"Debug"
=>
for
Default_Switches
(
"ada"
)
use
(
"-g"
);
case
Target
is
when
"GNAT_Runtime"
=>
--
For
GNAT
runtimes
,
we
clean
up
unused
symbols
.
--
Unfortunately
,
this
does
not
work
for
macOS
--
because
of
clang
linker
.
for
Default_Switches
(
"ada"
)
use
(
"-g"
,
"-Wl,--gc-sections"
);
when
others
=>
for
Default_Switches
(
"ada"
)
use
(
"-g"
);
end
case
;
when
"Release"
=>
when
"Release"
=>
null
;
null
;
end
case
;
end
case
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment