[multiple changes]
2017-09-08 Bob Duff <duff@adacore.com> * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag): New routine to read the Tag robustly. * exp_attr.adb (Input): Change the expansion of 'Input, in the class-wide case, to call String_Input_Tag instead of String_Input_Blk_IO. 2017-09-08 Arnaud Charlet <charlet@adacore.com> * s-rident.ads (Restriction_Id): reorder enum literals, so that Pure_Barriers is no longer in range of the Cunit_Boolean_Restrictions subtype. 2017-09-08 Nicolas Roche <roche@adacore.com> * a-taster.ads, a-taster.adb: Move to libgnarl * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups. Add support for files in libgnarl. 2017-09-08 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply accessibility check to an interface conversion, whose purpose is to perform a pointer adjustment in a dispatching call. * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks when the actual is a construct that involves a dereference of an expression that includes a formal of the enclosing subprogram, In such cases, the accessibility level of the actual is that of the corresponding formal, which is passed in as an additional actual in the outer call. From-SVN: r251886
This commit is contained in:
parent
17d7aa85b7
commit
6a237c4530
|
@ -1,3 +1,35 @@
|
|||
2017-09-08 Bob Duff <duff@adacore.com>
|
||||
|
||||
* s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
|
||||
New routine to read the Tag robustly.
|
||||
* exp_attr.adb (Input): Change the expansion of 'Input,
|
||||
in the class-wide case, to call String_Input_Tag instead of
|
||||
String_Input_Blk_IO.
|
||||
|
||||
2017-09-08 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* s-rident.ads (Restriction_Id): reorder enum
|
||||
literals, so that Pure_Barriers is no longer in range of the
|
||||
Cunit_Boolean_Restrictions subtype.
|
||||
|
||||
2017-09-08 Nicolas Roche <roche@adacore.com>
|
||||
|
||||
* a-taster.ads, a-taster.adb: Move to libgnarl
|
||||
* gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
|
||||
Add support for files in libgnarl.
|
||||
|
||||
2017-09-08 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
|
||||
accessibility check to an interface conversion, whose purpose
|
||||
is to perform a pointer adjustment in a dispatching call.
|
||||
* exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
|
||||
when the actual is a construct that involves a dereference of an
|
||||
expression that includes a formal of the enclosing subprogram,
|
||||
In such cases, the accessibility level of the actual is that of
|
||||
the corresponding formal, which is passed in as an additional
|
||||
actual in the outer call.
|
||||
|
||||
2017-09-08 Bob Duff <duff@adacore.com>
|
||||
|
||||
* exp_intr.adb (Add_Source_Info): Do not decode
|
||||
|
|
|
@ -3837,10 +3837,17 @@ package body Exp_Attr is
|
|||
|
||||
begin
|
||||
-- Read the internal tag (RM 13.13.2(34)) and use it to
|
||||
-- initialize a dummy tag value:
|
||||
|
||||
-- initialize a dummy tag value. We used to generate:
|
||||
--
|
||||
-- Descendant_Tag (String'Input (Strm), P_Type);
|
||||
|
||||
--
|
||||
-- which turns into a call to String_Input_Blk_IO. However,
|
||||
-- if the input is malformed, that could try to read an
|
||||
-- enormous String, causing chaos. So instead we call
|
||||
-- String_Input_Tag, which does the same thing as
|
||||
-- String_Input_Blk_IO, except that if the String is
|
||||
-- absurdly long, it raises an exception.
|
||||
--
|
||||
-- This value is used only to provide a controlling
|
||||
-- argument for the eventual _Input call. Descendant_Tag is
|
||||
-- called rather than Internal_Tag to ensure that we have a
|
||||
|
@ -3860,11 +3867,11 @@ package body Exp_Attr is
|
|||
Name =>
|
||||
New_Occurrence_Of (RTE (RE_Descendant_Tag), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Occurrence_Of (Standard_String, Loc),
|
||||
Attribute_Name => Name_Input,
|
||||
Expressions => New_List (
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_String_Input_Tag), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Relocate_Node (Duplicate_Subexpr (Strm)))),
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Occurrence_Of (P_Type, Loc),
|
||||
|
|
|
@ -11230,7 +11230,8 @@ package body Exp_Ch4 is
|
|||
|
||||
-- Apply an accessibility check when the conversion operand is an
|
||||
-- access parameter (or a renaming thereof), unless conversion was
|
||||
-- expanded from an Unchecked_ or Unrestricted_Access attribute.
|
||||
-- expanded from an Unchecked_ or Unrestricted_Access attribute,
|
||||
-- or for the actual of a class-wide interface parameter.
|
||||
-- Note that other checks may still need to be applied below (such
|
||||
-- as tagged type checks).
|
||||
|
||||
|
@ -11240,8 +11241,19 @@ package body Exp_Ch4 is
|
|||
and then (Nkind (Original_Node (N)) /= N_Attribute_Reference
|
||||
or else Attribute_Name (Original_Node (N)) = Name_Access)
|
||||
then
|
||||
Apply_Accessibility_Check
|
||||
(Operand, Target_Type, Insert_Node => Operand);
|
||||
if not Comes_From_Source (N)
|
||||
and then Nkind_In (Parent (N),
|
||||
N_Function_Call,
|
||||
N_Procedure_Call_Statement)
|
||||
and then Is_Interface (Designated_Type (Target_Type))
|
||||
and then Is_Class_Wide_Type (Designated_Type (Target_Type))
|
||||
then
|
||||
null;
|
||||
|
||||
else
|
||||
Apply_Accessibility_Check
|
||||
(Operand, Target_Type, Insert_Node => Operand);
|
||||
end if;
|
||||
|
||||
-- If the level of the operand type is statically deeper than the
|
||||
-- level of the target type, then force Program_Error. Note that this
|
||||
|
|
|
@ -2623,6 +2623,7 @@ package body Exp_Ch6 is
|
|||
Param_Count : Natural := 0;
|
||||
Parent_Formal : Entity_Id;
|
||||
Parent_Subp : Entity_Id;
|
||||
Pref_Entity : Entity_Id;
|
||||
Scop : Entity_Id;
|
||||
Subp : Entity_Id;
|
||||
|
||||
|
@ -3010,6 +3011,9 @@ package body Exp_Ch6 is
|
|||
and then In_Open_Scopes (Scope (Entity (Actual)))
|
||||
then
|
||||
Prev_Orig := Prev;
|
||||
|
||||
elsif Nkind (Prev_Orig) = N_Type_Conversion then
|
||||
Prev_Orig := Expression (Prev_Orig);
|
||||
end if;
|
||||
|
||||
-- Ada 2005 (AI-251): Thunks must propagate the extra actuals of
|
||||
|
@ -3125,6 +3129,24 @@ package body Exp_Ch6 is
|
|||
|
||||
when Attribute_Access =>
|
||||
|
||||
-- Accessibility level of S'Access is that of A.
|
||||
|
||||
Prev_Orig := Prefix (Prev_Orig);
|
||||
|
||||
-- If the expression is a view conversion,
|
||||
-- the accessibility level is that of the
|
||||
-- expression.
|
||||
|
||||
if Nkind (Original_Node (Prev_Orig))
|
||||
= N_Type_Conversion
|
||||
and then
|
||||
Nkind (Expression (Original_Node (Prev_Orig)))
|
||||
= N_Explicit_Dereference
|
||||
then
|
||||
Prev_Orig :=
|
||||
Expression (Original_Node (Prev_Orig));
|
||||
end if;
|
||||
|
||||
-- If this is an Access attribute applied to the
|
||||
-- the current instance object passed to a type
|
||||
-- initialization procedure, then use the level
|
||||
|
@ -3140,14 +3162,41 @@ package body Exp_Ch6 is
|
|||
-- which can be one level too deep in some cases.
|
||||
-- ???
|
||||
|
||||
if Is_Entity_Name (Prefix (Prev_Orig))
|
||||
and then Is_Type (Entity (Prefix (Prev_Orig)))
|
||||
-- A further case that requires special handling
|
||||
-- is the common idiom E.all'access. If E is a
|
||||
-- formal of the enclosing subprogram, the
|
||||
-- accessibility of the expression is that of E.
|
||||
|
||||
if Is_Entity_Name (Prev_Orig) then
|
||||
Pref_Entity := Entity (Prev_Orig);
|
||||
|
||||
elsif Nkind (Prev_Orig) = N_Explicit_Dereference
|
||||
and then
|
||||
Is_Entity_Name (Prefix (Prev_Orig))
|
||||
then
|
||||
Pref_Entity := Entity (Prefix ((Prev_Orig)));
|
||||
|
||||
else
|
||||
Pref_Entity := Empty;
|
||||
end if;
|
||||
|
||||
if Is_Entity_Name (Prev_Orig)
|
||||
and then Is_Type (Entity (Prev_Orig))
|
||||
then
|
||||
Add_Extra_Actual
|
||||
(Make_Integer_Literal (Loc,
|
||||
Intval =>
|
||||
Type_Access_Level
|
||||
(Entity (Prefix (Prev_Orig)))),
|
||||
Intval => Type_Access_Level (Pref_Entity)),
|
||||
Extra_Accessibility (Formal));
|
||||
|
||||
elsif Nkind (Prev_Orig) = N_Explicit_Dereference
|
||||
and then Present (Pref_Entity)
|
||||
and then Is_Formal (Pref_Entity)
|
||||
and then Present
|
||||
(Extra_Accessibility (Pref_Entity))
|
||||
then
|
||||
Add_Extra_Actual (
|
||||
New_Occurrence_Of
|
||||
(Extra_Accessibility (Pref_Entity), Loc),
|
||||
Extra_Accessibility (Formal));
|
||||
|
||||
else
|
||||
|
@ -3155,7 +3204,7 @@ package body Exp_Ch6 is
|
|||
(Make_Integer_Literal (Loc,
|
||||
Intval =>
|
||||
Object_Access_Level
|
||||
(Prefix (Prev_Orig))),
|
||||
(Prev_Orig)),
|
||||
Extra_Accessibility (Formal));
|
||||
end if;
|
||||
|
||||
|
|
|
@ -380,9 +380,6 @@ SO_OPTS = -Wl,-soname,
|
|||
# target when supported.
|
||||
GNATLIB_SHARED = gnatlib
|
||||
|
||||
# default value for gnatmake's target dependent file
|
||||
MLIB_TGT = mlib-tgt
|
||||
|
||||
# By default, build socket support units. On platforms that do not support
|
||||
# sockets, reset this variable to empty and add DUMMY_SOCKETS_TARGET_PAIRS
|
||||
# to LIBGNAT_TARGET_PAIRS.
|
||||
|
@ -466,49 +463,6 @@ GCC_SPEC_FILES=
|
|||
# $(strip STRING) removes leading and trailing spaces from STRING.
|
||||
# If what's left is null then it's a match.
|
||||
|
||||
# m68k VxWorks
|
||||
ifeq ($(strip $(filter-out m68k% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<a-intnam-vxworks.ads \
|
||||
a-numaux.ads<a-numaux-vxworks.ads \
|
||||
s-inmaop.adb<s-inmaop-vxworks.adb \
|
||||
s-interr.adb<s-interr-vxworks.adb \
|
||||
s-intman.ads<s-intman-vxworks.ads \
|
||||
s-intman.adb<s-intman-vxworks.adb \
|
||||
s-osinte.adb<s-osinte-vxworks.adb \
|
||||
s-osinte.ads<s-osinte-vxworks.ads \
|
||||
s-osprim.adb<s-osprim-vxworks.adb \
|
||||
s-parame.ads<s-parame-vxworks.ads \
|
||||
s-parame.adb<s-parame-vxworks.adb \
|
||||
s-stchop.ads<s-stchop-limit.ads \
|
||||
s-stchop.adb<s-stchop-vxworks.adb \
|
||||
s-taprop.adb<s-taprop-vxworks.adb \
|
||||
s-tasinf.ads<s-tasinf-vxworks.ads \
|
||||
s-taspri.ads<s-taspri-vxworks.ads \
|
||||
s-tpopsp.adb<s-tpopsp-vxworks.adb \
|
||||
s-vxwork.ads<s-vxwork-m68k.ads \
|
||||
g-socthi.ads<g-socthi-vxworks.ads \
|
||||
g-socthi.adb<g-socthi-vxworks.adb \
|
||||
g-stsifd.adb<g-stsifd-sockets.adb \
|
||||
system.ads<system-vxworks-m68k.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-stchop.o
|
||||
EXTRA_GNATRTL_TASKING_OBJS=i-vxinco.o s-vxwork.o s-vxwext.o
|
||||
|
||||
EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
|
||||
|
||||
ifeq ($(strip $(filter-out yes,$(TRACE))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-traces.adb<s-traces-default.adb \
|
||||
s-tratas.adb<s-tratas-default.adb \
|
||||
s-trafor.adb<s-trafor-default.adb \
|
||||
s-trafor.ads<s-trafor-default.ads \
|
||||
s-tfsetr.adb<s-tfsetr-vxworks.adb
|
||||
endif
|
||||
endif
|
||||
|
||||
# PowerPC and e500v2 VxWorks
|
||||
ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworksspe vxworks7 vxworks7spe,$(target_cpu) $(target_vendor) $(target_os))),)
|
||||
|
||||
|
@ -567,18 +521,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworksspe vxworks7 vxworks7spe,
|
|||
EXTRA_GNATRTL_NONTASKING_OBJS+=s-stchop.o
|
||||
endif
|
||||
|
||||
TOOLS_TARGET_PAIRS=\
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
ifeq ($(strip $(filter-out yes,$(TRACE))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-traces.adb<s-traces-default.adb \
|
||||
s-trafor.adb<s-trafor-default.adb \
|
||||
s-trafor.ads<s-trafor-default.ads \
|
||||
s-tratas.adb<s-tratas-default.adb \
|
||||
s-tfsetr.adb<s-tfsetr-vxworks.adb
|
||||
endif
|
||||
TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
|
@ -693,9 +636,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae vxworksaespe,$(target_cpu) $(t
|
|||
|
||||
EH_MECHANISM=-gcc
|
||||
|
||||
TOOLS_TARGET_PAIRS=\
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
|
||||
EXTRA_GNATRTL_TASKING_OBJS=i-vxinco.o s-vxwork.o s-vxwext.o
|
||||
|
@ -719,70 +660,6 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae vxworksaespe,$(target_cpu) $(t
|
|||
g-stsifd.adb<g-stsifd-sockets.adb
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(filter-out yes,$(TRACE))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-traces.adb<s-traces-default.adb \
|
||||
s-trafor.adb<s-trafor-default.adb \
|
||||
s-trafor.ads<s-trafor-default.ads \
|
||||
s-tratas.adb<s-tratas-default.adb \
|
||||
s-tfsetr.adb<s-tfsetr-vxworks.adb
|
||||
endif
|
||||
endif
|
||||
|
||||
# PowerPC and e500v2 VxWorks MILS
|
||||
ifeq ($(strip $(filter-out powerpc% wrs vxworksmils,$(target_cpu) $(target_vendor) $(target_os))),)
|
||||
# target pairs for vthreads runtime
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-elchha.adb<a-elchha-vx6-raven-cert.adb \
|
||||
a-intnam.ads<a-intnam-vxworks.ads \
|
||||
a-numaux.ads<a-numaux-vxworks.ads \
|
||||
g-io.adb<g-io-vxworks-ppc-cert.adb \
|
||||
s-inmaop.adb<s-inmaop-vxworks.adb \
|
||||
s-interr.adb<s-interr-vxworks.adb \
|
||||
s-intman.ads<s-intman-vxworks.ads \
|
||||
s-intman.adb<s-intman-vxworks.adb \
|
||||
s-osinte.adb<s-osinte-vxworks.adb \
|
||||
s-osinte.ads<s-osinte-vxworks.ads \
|
||||
s-osprim.adb<s-osprim-vxworks.adb \
|
||||
s-osvers.ads<s-osvers-vxworks-mils.ads \
|
||||
s-parame.ads<s-parame-ae653.ads \
|
||||
s-parame.adb<s-parame-vxworks.adb \
|
||||
s-stchop.adb<s-stchop-vxworks.adb \
|
||||
s-stchop.ads<s-stchop-limit.ads \
|
||||
s-taprop.adb<s-taprop-vxworks.adb \
|
||||
s-tasinf.ads<s-tasinf-vxworks.ads \
|
||||
s-taspri.ads<s-taspri-vxworks.ads \
|
||||
s-thread.adb<s-thread-ae653.adb \
|
||||
s-tpopsp.adb<s-tpopsp-vxworks.adb \
|
||||
s-vxwork.ads<s-vxwork-ppc.ads \
|
||||
system.ads<system-vxworks-ppc-mils.ads \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(DUMMY_SOCKETS_TARGET_PAIRS)
|
||||
|
||||
TOOLS_TARGET_PAIRS=\
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o \
|
||||
s-thread.o s-osvers.o s-stchop.o
|
||||
EXTRA_GNATRTL_TASKING_OBJS=i-vxinco.o s-vxwork.o s-vxwext.o
|
||||
|
||||
EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
|
||||
|
||||
EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
|
||||
EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
|
||||
|
||||
GNATRTL_SOCKETS_OBJS =
|
||||
|
||||
ifeq ($(strip $(filter-out yes,$(TRACE))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-traces.adb<s-traces-default.adb \
|
||||
s-trafor.adb<s-trafor-default.adb \
|
||||
s-trafor.ads<s-trafor-default.ads \
|
||||
s-tratas.adb<s-tratas-default.adb \
|
||||
s-tfsetr.adb<s-tfsetr-vxworks.adb
|
||||
endif
|
||||
endif
|
||||
|
||||
# VxWorksae / VxWorks 653 for x86 (vxsim) - ?? VxWorks mils not implemented
|
||||
|
@ -815,9 +692,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworksae,$(target_cpu) $(target_vendor) $(ta
|
|||
|
||||
EH_MECHANISM=-gcc
|
||||
|
||||
TOOLS_TARGET_PAIRS=\
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-thread.o
|
||||
EXTRA_GNATRTL_TASKING_OBJS=i-vxinco.o s-vxwork.o s-vxwext.o
|
||||
|
@ -841,66 +716,6 @@ ifeq ($(strip $(filter-out %86 wrs vxworksae,$(target_cpu) $(target_vendor) $(ta
|
|||
g-stsifd.adb<g-stsifd-sockets.adb
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(filter-out yes,$(TRACE))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-traces.adb<s-traces-default.adb \
|
||||
s-trafor.adb<s-trafor-default.adb \
|
||||
s-trafor.ads<s-trafor-default.ads \
|
||||
s-tratas.adb<s-tratas-default.adb \
|
||||
s-tfsetr.adb<s-tfsetr-vxworks.adb
|
||||
endif
|
||||
endif
|
||||
|
||||
# Sparc VxWorks
|
||||
ifeq ($(strip $(filter-out sparc% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<a-intnam-vxworks.ads \
|
||||
a-numaux.ads<a-numaux-vxworks.ads \
|
||||
s-inmaop.adb<s-inmaop-vxworks.adb \
|
||||
s-interr.adb<s-interr-vxworks.adb \
|
||||
s-intman.ads<s-intman-vxworks.ads \
|
||||
s-intman.adb<s-intman-vxworks.adb \
|
||||
s-osinte.adb<s-osinte-vxworks.adb \
|
||||
s-osinte.ads<s-osinte-vxworks.ads \
|
||||
s-osprim.adb<s-osprim-vxworks.adb \
|
||||
s-parame.ads<s-parame-vxworks.ads \
|
||||
s-parame.adb<s-parame-vxworks.adb \
|
||||
s-stchop.ads<s-stchop-limit.ads \
|
||||
s-stchop.adb<s-stchop-vxworks.adb \
|
||||
s-taprop.adb<s-taprop-vxworks.adb \
|
||||
s-tasinf.ads<s-tasinf-vxworks.ads \
|
||||
s-taspri.ads<s-taspri-vxworks.ads \
|
||||
s-tpopsp.adb<s-tpopsp-vxworks.adb \
|
||||
g-socthi.ads<g-socthi-vxworks.ads \
|
||||
g-socthi.adb<g-socthi-vxworks.adb \
|
||||
g-stsifd.adb<g-stsifd-sockets.adb
|
||||
|
||||
TOOLS_TARGET_PAIRS=\
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
ifeq ($(strip $(filter-out sparc64 sparcv9, $(target_cpu))),)
|
||||
# 64-bits
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-vxwork.ads<s-vxwork-sparcv9.ads \
|
||||
system.ads<system-vxworks-sparcv9.ads
|
||||
else
|
||||
# 32-bits
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-vxwork.ads<s-vxwork-sparc.ads \
|
||||
system.ads<system-vxworks-sparc-kernel.ads
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-vxwext.ads<s-vxwext-kernel.ads \
|
||||
s-vxwext.adb<s-vxwext-kernel.adb
|
||||
endif
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-stchop.o
|
||||
EXTRA_GNATRTL_TASKING_OBJS=i-vxinco.o s-vxwork.o s-vxwext.o
|
||||
|
||||
EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
|
||||
endif
|
||||
|
||||
# x86/x86_64 VxWorks
|
||||
|
@ -947,18 +762,7 @@ ifeq ($(strip $(filter-out %86 x86_64 wrs vxworks vxworks7,$(target_cpu) $(targe
|
|||
$(CERTMATH_TARGET_PAIRS_SQRT_FPU) \
|
||||
$(CERTMATH_TARGET_PAIRS_X86TRA)
|
||||
|
||||
TOOLS_TARGET_PAIRS=\
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
ifeq ($(strip $(filter-out yes,$(TRACE))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-traces.adb<s-traces-default.adb \
|
||||
s-trafor.adb<s-trafor-default.adb \
|
||||
s-trafor.ads<s-trafor-default.ads \
|
||||
s-tratas.adb<s-tratas-default.adb \
|
||||
s-tfsetr.adb<s-tfsetr-vxworks.adb
|
||||
endif
|
||||
TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
# The CPU setting for VxSim varies with the
|
||||
# host (Windows or Linux)
|
||||
|
@ -1102,9 +906,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
|
|||
g-socthi.adb<g-socthi-vxworks.adb \
|
||||
g-stsifd.adb<g-stsifd-sockets.adb
|
||||
|
||||
TOOLS_TARGET_PAIRS=\
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
|
@ -1165,76 +967,6 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
|
|||
endif
|
||||
endif
|
||||
|
||||
# MIPS VxWorks
|
||||
ifeq ($(strip $(filter-out mips% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<a-intnam-vxworks.ads \
|
||||
a-numaux.ads<a-numaux-vxworks.ads \
|
||||
s-inmaop.adb<s-inmaop-vxworks.adb \
|
||||
s-interr.adb<s-interr-vxworks.adb \
|
||||
s-intman.ads<s-intman-vxworks.ads \
|
||||
s-intman.adb<s-intman-vxworks.adb \
|
||||
s-osinte.adb<s-osinte-vxworks.adb \
|
||||
s-osinte.ads<s-osinte-vxworks.ads \
|
||||
s-osprim.adb<s-osprim-vxworks.adb \
|
||||
s-parame.ads<s-parame-vxworks.ads \
|
||||
s-parame.adb<s-parame-vxworks.adb \
|
||||
s-stchop.ads<s-stchop-limit.ads \
|
||||
s-stchop.adb<s-stchop-vxworks.adb \
|
||||
s-taprop.adb<s-taprop-vxworks.adb \
|
||||
s-tasinf.ads<s-tasinf-vxworks.ads \
|
||||
s-taspri.ads<s-taspri-vxworks.ads \
|
||||
s-tpopsp.adb<s-tpopsp-vxworks.adb \
|
||||
s-vxwork.ads<s-vxwork-mips.ads \
|
||||
g-socthi.ads<g-socthi-vxworks.ads \
|
||||
g-socthi.adb<g-socthi-vxworks.adb \
|
||||
g-stsifd.adb<g-stsifd-sockets.adb \
|
||||
system.ads<system-vxworks-mips.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS=\
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
|
||||
EH_MECHANISM=-gcc
|
||||
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-mudido.adb<s-mudido-affinity.adb \
|
||||
s-vxwext.ads<s-vxwext-rtp.ads \
|
||||
s-vxwext.adb<s-vxwext-rtp-smp.adb \
|
||||
s-tpopsp.adb<s-tpopsp-vxworks-tls.adb
|
||||
|
||||
EXTRA_LIBGNAT_OBJS+=affinity.o
|
||||
|
||||
EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
|
||||
EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
|
||||
else
|
||||
ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-mudido.adb<s-mudido-affinity.adb \
|
||||
s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
|
||||
s-vxwext.ads<s-vxwext-kernel.ads \
|
||||
s-vxwext.adb<s-vxwext-kernel-smp.adb
|
||||
|
||||
EXTRA_LIBGNAT_OBJS+=affinity.o
|
||||
else
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-tpopsp.adb<s-tpopsp-vxworks.adb
|
||||
|
||||
ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-vxwext.ads<s-vxwext-kernel.ads \
|
||||
s-vxwext.adb<s-vxwext-kernel.adb
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-stchop.o
|
||||
EXTRA_GNATRTL_TASKING_OBJS=i-vxinco.o s-vxwork.o s-vxwext.o
|
||||
|
||||
EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
|
||||
endif
|
||||
|
||||
# ARM android
|
||||
ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
|
@ -1252,9 +984,7 @@ ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
|
|||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<system-linux-arm.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
|
||||
EXTRA_LIBGNAT_OBJS+=sigtramp-armdroid.o
|
||||
|
@ -1285,8 +1015,6 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(target_cpu) $(target_vendor) $(
|
|||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<system-solaris-sparc.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
|
||||
|
||||
EH_MECHANISM=-gcc
|
||||
THREADSLIB = -lposix4 -lthread
|
||||
MISCLIB = -lposix4 -lnsl -lsocket
|
||||
|
@ -1295,23 +1023,6 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(target_cpu) $(target_vendor) $(
|
|||
GMEM_LIB = gmemlib
|
||||
LIBRARY_VERSION := $(LIB_VERSION)
|
||||
|
||||
ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<a-intnam-solaris.ads \
|
||||
s-inmaop.adb<s-inmaop-posix.adb \
|
||||
s-intman.adb<s-intman-posix.adb \
|
||||
s-osinte.adb<s-osinte-posix.adb \
|
||||
s-osinte.ads<s-osinte-solaris-posix.ads \
|
||||
s-osprim.adb<s-osprim-solaris.adb \
|
||||
s-taprop.adb<s-taprop-posix.adb \
|
||||
s-taspri.ads<s-taspri-posix.ads \
|
||||
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
|
||||
g-soliop.ads<g-soliop-solaris.ads \
|
||||
system.ads<system-solaris-sparc.ads
|
||||
|
||||
THREADSLIB = -lposix4 -lpthread
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
|
||||
LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
|
||||
endif
|
||||
|
@ -1354,8 +1065,6 @@ ifeq ($(strip $(filter-out %86 %x86_64 solaris2%,$(target_cpu) $(target_os))),)
|
|||
endif
|
||||
endif
|
||||
|
||||
TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
|
||||
|
||||
EH_MECHANISM=-gcc
|
||||
|
@ -1390,31 +1099,21 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
|||
LIBGNAT_TARGET_PAIRS += $(X86_TARGET_PAIRS)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-osinte.ads<s-osinte-linux-xenomai.ads \
|
||||
s-osprim.adb<s-osprim-linux-xenomai.adb \
|
||||
s-taprop.adb<s-taprop-linux-xenomai.adb \
|
||||
s-taspri.ads<s-taspri-linux-xenomai.ads
|
||||
else
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-mudido.adb<s-mudido-affinity.adb \
|
||||
s-osinte.ads<s-osinte-linux.ads \
|
||||
s-osprim.adb<s-osprim-posix.adb \
|
||||
s-taprop.adb<s-taprop-linux.adb \
|
||||
s-tasinf.ads<s-tasinf-linux.ads \
|
||||
s-tasinf.adb<s-tasinf-linux.adb \
|
||||
s-taspri.ads<s-taspri-posix.ads
|
||||
endif
|
||||
LIBGNAT_TARGET_PAIRS += \
|
||||
s-mudido.adb<s-mudido-affinity.adb \
|
||||
s-osinte.ads<s-osinte-linux.ads \
|
||||
s-osprim.adb<s-osprim-posix.adb \
|
||||
s-taprop.adb<s-taprop-linux.adb \
|
||||
s-tasinf.ads<s-tasinf-linux.ads \
|
||||
s-tasinf.adb<s-tasinf-linux.adb \
|
||||
s-taspri.ads<s-taspri-posix.ads
|
||||
|
||||
EH_MECHANISM=-gcc
|
||||
THREADSLIB = -lpthread -lrt
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
GNATLIB_SHARED = gnatlib-shared-dual
|
||||
MISCLIB = -ldl
|
||||
|
@ -1438,9 +1137,7 @@ ifeq ($(strip $(filter-out %86 kfreebsd%,$(target_cpu) $(target_os))),)
|
|||
$(X86_TARGET_PAIRS) \
|
||||
system.ads<system-freebsd.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
|
||||
|
||||
|
@ -1496,9 +1193,7 @@ ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(target_cpu) $(target_os))),)
|
|||
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
|
||||
system.ads<system-freebsd.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EH_MECHANISM=-gcc
|
||||
THREADSLIB = -lpthread
|
||||
|
@ -1552,8 +1247,6 @@ ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),)
|
|||
$(X86_TARGET_PAIRS) \
|
||||
system.ads<system-freebsd.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
|
||||
GNATLIB_SHARED = gnatlib-shared-dual
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
|
||||
|
@ -1582,8 +1275,6 @@ ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
|
|||
$(X86_64_TARGET_PAIRS) \
|
||||
system.ads<system-freebsd.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
|
||||
GNATLIB_SHARED = gnatlib-shared-dual
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
|
||||
|
@ -1642,9 +1333,7 @@ ifeq ($(strip $(filter-out s390% linux%,$(target_cpu) $(target_os))),)
|
|||
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
|
||||
system.ads<system-linux-s390.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
|
||||
EH_MECHANISM=-gcc
|
||||
|
@ -1689,7 +1378,6 @@ ifeq ($(strip $(filter-out hppa% hp hpux11%,$(target_cpu) $(target_vendor) $(tar
|
|||
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
|
||||
system.ads<system-hpux.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
|
||||
EH_MECHANISM=-gcc
|
||||
TGT_LIB = /usr/lib/libcl.a
|
||||
THREADSLIB = -lpthread
|
||||
|
@ -1727,8 +1415,6 @@ ifeq ($(strip $(filter-out ibm aix%,$(target_vendor) $(target_os))),)
|
|||
|
||||
THREADSLIB = -lpthreads
|
||||
EH_MECHANISM=-gcc
|
||||
TOOLS_TARGET_PAIRS += \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb
|
||||
|
||||
GMEM_LIB = gmemlib
|
||||
endif
|
||||
|
@ -1753,16 +1439,12 @@ endif
|
|||
|
||||
# PikeOS
|
||||
ifeq ($(strip $(filter-out powerpc% %86 sysgo pikeos,$(target_cpu) $(target_vendor) $(target_os)))),)
|
||||
TOOLS_TARGET_PAIRS=\
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-xi.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
|
||||
endif
|
||||
|
||||
# *-elf, *-eabi, or *-eabispe
|
||||
ifeq ($(strip $(filter-out elf eabi eabispe,$(target_os))),)
|
||||
TOOLS_TARGET_PAIRS=\
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-xi.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(filter-out %djgpp,$(target_os))),)
|
||||
|
@ -1856,9 +1538,7 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
|
|||
|
||||
EH_MECHANISM=-gcc
|
||||
|
||||
TOOLS_TARGET_PAIRS= \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
|
||||
indepsw.adb<indepsw-mingw.adb
|
||||
TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
GMEM_LIB = gmemlib
|
||||
EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
|
||||
|
@ -1885,9 +1565,7 @@ ifeq ($(strip $(filter-out mips% linux%,$(target_cpu) $(target_os))),)
|
|||
g-sercom.adb<g-sercom-linux.adb \
|
||||
system.ads<system-linux-mips.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
|
||||
EH_MECHANISM=-gcc
|
||||
|
@ -1915,28 +1593,17 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
|||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<system-linux-ppc.ads
|
||||
|
||||
ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
$(LIBGNAT_TARGET_PAIRS_COMMON) \
|
||||
s-osinte.ads<s-osinte-linux-xenomai.ads \
|
||||
s-osprim.adb<s-osprim-linux-xenomai.adb \
|
||||
s-taprop.adb<s-taprop-linux-xenomai.adb \
|
||||
s-taspri.ads<s-taspri-linux-xenomai.ads
|
||||
else
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
$(LIBGNAT_TARGET_PAIRS_COMMON) \
|
||||
s-mudido.adb<s-mudido-affinity.adb \
|
||||
s-osinte.ads<s-osinte-linux.ads \
|
||||
s-osprim.adb<s-osprim-posix.adb \
|
||||
s-taprop.adb<s-taprop-linux.adb \
|
||||
s-tasinf.ads<s-tasinf-linux.ads \
|
||||
s-tasinf.adb<s-tasinf-linux.adb \
|
||||
s-taspri.ads<s-taspri-posix-noaltstack.ads
|
||||
endif
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
$(LIBGNAT_TARGET_PAIRS_COMMON) \
|
||||
s-mudido.adb<s-mudido-affinity.adb \
|
||||
s-osinte.ads<s-osinte-linux.ads \
|
||||
s-osprim.adb<s-osprim-posix.adb \
|
||||
s-taprop.adb<s-taprop-linux.adb \
|
||||
s-tasinf.ads<s-tasinf-linux.ads \
|
||||
s-tasinf.adb<s-tasinf-linux.adb \
|
||||
s-taspri.ads<s-taspri-posix-noaltstack.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
|
||||
|
||||
|
@ -1972,9 +1639,7 @@ ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
|
|||
EH_MECHANISM=-arm
|
||||
endif
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
|
||||
THREADSLIB = -lpthread
|
||||
|
@ -2008,9 +1673,7 @@ ifeq ($(strip $(filter-out aarch64% linux%,$(target_cpu) $(target_os))),)
|
|||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<system-linux-arm.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
|
||||
EH_MECHANISM=-gcc
|
||||
|
@ -2037,9 +1700,7 @@ ifeq ($(strip $(filter-out sparc% linux%,$(target_cpu) $(target_os))),)
|
|||
s-tpopsp.adb<s-tpopsp-tls.adb \
|
||||
system.ads<system-linux-sparc.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
|
||||
EH_MECHANISM=-gcc
|
||||
|
@ -2066,9 +1727,7 @@ ifeq ($(strip $(filter-out hppa% linux%,$(target_cpu) $(target_os))),)
|
|||
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
|
||||
system.ads<system-linux-hppa.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
|
||||
EH_MECHANISM=-gcc
|
||||
|
@ -2124,9 +1783,7 @@ ifeq ($(strip $(filter-out sh4% linux%,$(target_cpu) $(target_os))),)
|
|||
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
|
||||
system.ads<system-linux-sh4.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-linux.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-linux.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
|
||||
EH_MECHANISM=-gcc
|
||||
|
@ -2163,9 +1820,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
|||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<system-linux-ia64.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
|
||||
EH_MECHANISM=-gcc
|
||||
|
@ -2192,9 +1847,6 @@ ifeq ($(strip $(filter-out ia64% hp hpux%,$(target_cpu) $(target_vendor) $(targe
|
|||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<system-hpux-ia64.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-ia64-hpux.adb
|
||||
|
||||
MISCLIB=
|
||||
EH_MECHANISM=-gcc
|
||||
THREADSLIB=-lpthread
|
||||
|
@ -2224,9 +1876,7 @@ ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),)
|
|||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<system-linux-alpha.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
|
||||
EH_MECHANISM=-gcc
|
||||
|
@ -2261,9 +1911,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
|||
$(X86_64_TARGET_PAIRS) \
|
||||
system.ads<system-linux-x86.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
|
||||
|
@ -2300,9 +1948,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
|
|||
$(X86_64_TARGET_PAIRS) \
|
||||
system.ads<system-linux-x86.ads
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
|
||||
indepsw.adb<indepsw-gnu.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
|
||||
|
||||
EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
|
||||
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
|
||||
|
@ -2323,6 +1969,7 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),)
|
|||
s-osinte.ads<s-osinte-darwin.ads \
|
||||
s-taprop.adb<s-taprop-posix.adb \
|
||||
s-taspri.ads<s-taspri-posix.ads \
|
||||
g-sercom.adb<g-sercom-linux.adb \
|
||||
s-tpopsp.adb<s-tpopsp-posix-foreign.adb
|
||||
|
||||
ifeq ($(strip $(filter-out %86,$(target_cpu))),)
|
||||
|
@ -2401,9 +2048,7 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),)
|
|||
system.ads<system-darwin-arm.ads
|
||||
endif
|
||||
|
||||
TOOLS_TARGET_PAIRS = \
|
||||
mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \
|
||||
indepsw.adb<indepsw-darwin.adb
|
||||
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-darwin.adb
|
||||
|
||||
EH_MECHANISM=-gcc
|
||||
GNATLIB_SHARED = gnatlib-shared-darwin
|
||||
|
@ -2472,7 +2117,8 @@ ADA_INCLUDE_SRCS =\
|
|||
machcode.ads text_io.ads unchconv.ads unchdeal.ads \
|
||||
sequenio.ads system.ads memtrack.adb \
|
||||
a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
|
||||
s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
|
||||
s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads libgnarl/*.ads \
|
||||
libgnarl/*.adb
|
||||
|
||||
# Files that are in ADA_INCLUDE_SRCS but not in all configurations.
|
||||
# They will be removed from the run time if not used.
|
||||
|
@ -2494,7 +2140,7 @@ ADA_EXCLUDE_SRCS =\
|
|||
s-sam4.ads s-sopco3.adb s-sopco3.ads s-sopco4.adb s-sopco4.ads \
|
||||
s-sopco5.adb s-sopco5.ads s-stchop.ads s-stchop.adb s-stm32.ads \
|
||||
s-strcom.adb s-strcom.ads s-thread.ads \
|
||||
s-vxwexc.adb s-vxwexc.ads s-vxwext.adb s-vxwext.ads \
|
||||
s-vxwext.adb s-vxwext.ads \
|
||||
s-win32.ads s-winext.ads
|
||||
|
||||
# ADA_EXCLUDE_SRCS without the sources used by the target
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1992-2017, 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- --
|
||||
|
@ -1519,6 +1519,7 @@ package Rtsfind is
|
|||
|
||||
RE_String_Input, -- System.Strings.Stream_Ops
|
||||
RE_String_Input_Blk_IO, -- System.Strings.Stream_Ops
|
||||
RE_String_Input_Tag, -- System.Strings.Stream_Ops
|
||||
RE_String_Output, -- System.Strings.Stream_Ops
|
||||
RE_String_Output_Blk_IO, -- System.Strings.Stream_Ops
|
||||
RE_String_Read, -- System.Strings.Stream_Ops
|
||||
|
@ -2756,6 +2757,7 @@ package Rtsfind is
|
|||
|
||||
RE_String_Input => System_Strings_Stream_Ops,
|
||||
RE_String_Input_Blk_IO => System_Strings_Stream_Ops,
|
||||
RE_String_Input_Tag => System_Strings_Stream_Ops,
|
||||
RE_String_Output => System_Strings_Stream_Ops,
|
||||
RE_String_Output_Blk_IO => System_Strings_Stream_Ops,
|
||||
RE_String_Read => System_Strings_Stream_Ops,
|
||||
|
|
|
@ -89,6 +89,7 @@ package System.Rident is
|
|||
-- does not violate the restriction.
|
||||
|
||||
(Simple_Barriers, -- Ada 2012 (D.7 (10.9/3))
|
||||
Pure_Barriers, -- GNAT
|
||||
No_Abort_Statements, -- (RM D.7(5), H.4(3))
|
||||
No_Access_Parameter_Allocators, -- Ada 2012 (RM H.4 (8.3/3))
|
||||
No_Access_Subprograms, -- (RM H.4(17))
|
||||
|
@ -182,7 +183,6 @@ package System.Rident is
|
|||
No_Elaboration_Code, -- GNAT
|
||||
No_Obsolescent_Features, -- Ada 2005 AI-368
|
||||
No_Wide_Characters, -- GNAT
|
||||
Pure_Barriers, -- GNAT
|
||||
SPARK_05, -- GNAT
|
||||
|
||||
-- The following cases require a parameter value
|
||||
|
|
|
@ -58,8 +58,11 @@ package body System.Strings.Stream_Ops is
|
|||
|
||||
package Stream_Ops_Internal is
|
||||
function Input
|
||||
(Strm : access Root_Stream_Type'Class;
|
||||
IO : IO_Kind) return Array_Type;
|
||||
(Strm : access Root_Stream_Type'Class;
|
||||
IO : IO_Kind;
|
||||
Max_Length : Long_Integer := Long_Integer'Last) return Array_Type;
|
||||
-- Raises an exception if you try to read a String that is longer than
|
||||
-- Max_Length. See expansion of Attribute_Input in Exp_Attr for details.
|
||||
|
||||
procedure Output
|
||||
(Strm : access Root_Stream_Type'Class;
|
||||
|
@ -125,8 +128,9 @@ package body System.Strings.Stream_Ops is
|
|||
-----------
|
||||
|
||||
function Input
|
||||
(Strm : access Root_Stream_Type'Class;
|
||||
IO : IO_Kind) return Array_Type
|
||||
(Strm : access Root_Stream_Type'Class;
|
||||
IO : IO_Kind;
|
||||
Max_Length : Long_Integer := Long_Integer'Last) return Array_Type
|
||||
is
|
||||
pragma Unsuppress (All_Checks);
|
||||
-- To make T'Class'Input robust in the case of bad data. The
|
||||
|
@ -146,6 +150,10 @@ package body System.Strings.Stream_Ops is
|
|||
Index_Type'Read (Strm, Low);
|
||||
Index_Type'Read (Strm, High);
|
||||
|
||||
if Long_Integer (High) - Long_Integer (Low) > Max_Length then
|
||||
raise Constraint_Error;
|
||||
end if;
|
||||
|
||||
-- Read the character content of the string
|
||||
|
||||
declare
|
||||
|
@ -632,6 +640,17 @@ package body System.Strings.Stream_Ops is
|
|||
return String_Ops.Input (Strm, Block_IO);
|
||||
end String_Input_Blk_IO;
|
||||
|
||||
-------------------------
|
||||
-- String_Input_Tag --
|
||||
-------------------------
|
||||
|
||||
function String_Input_Tag
|
||||
(Strm : access Ada.Streams.Root_Stream_Type'Class) return String
|
||||
is
|
||||
begin
|
||||
return String_Ops.Input (Strm, Block_IO, Max_Length => 10_000);
|
||||
end String_Input_Tag;
|
||||
|
||||
-------------------
|
||||
-- String_Output --
|
||||
-------------------
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 2009-2013, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 2009-2017, 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- --
|
||||
|
@ -155,6 +155,12 @@ package System.Strings.Stream_Ops is
|
|||
(Strm : access Ada.Streams.Root_Stream_Type'Class)
|
||||
return String;
|
||||
|
||||
function String_Input_Tag
|
||||
(Strm : access Ada.Streams.Root_Stream_Type'Class)
|
||||
return String;
|
||||
-- Same as String_Input_Blk_IO, except raises an exception for overly long
|
||||
-- Strings. See expansion of Attribute_Input in Exp_Attr for details.
|
||||
|
||||
procedure String_Output
|
||||
(Strm : access Ada.Streams.Root_Stream_Type'Class;
|
||||
Item : String);
|
||||
|
|
Loading…
Reference in New Issue