1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
9 -- Copyright (C) 1999-2018, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
26 with Csets
; use Csets
;
28 with Osint
; use Osint
;
29 with Output
; use Output
;
30 with System
.OS_Lib
; use System
.OS_Lib
;
32 package body Targparm
is
35 Parameters_Obtained
: Boolean := False;
36 -- Set True after first call to Get_Target_Parameters. Used to avoid
37 -- reading system.ads more than once, since it cannot change.
39 -- The following array defines a tag name for each entry
43 ACR
, -- Always_Compatible_Rep
44 ASD
, -- Atomic_Sync_Default
45 BDC
, -- Backend_Divide_Checks
46 BOC
, -- Backend_Overflow_Checks
47 CLA
, -- Command_Line_Args
48 CRT
, -- Configurable_Run_Times
49 D32
, -- Duration_32_Bits
51 EXS
, -- Exit_Status_Supported
52 FEL
, -- Frontend_Layout
53 FEX
, -- Frontend_Exceptions
54 FFO
, -- Fractional_Fixed_Ops
55 MOV
, -- Machine_Overflows
56 MRN
, -- Machine_Rounds
57 PAS
, -- Preallocated_Stacks
58 SAG
, -- Support_Aggregates
59 SAP
, -- Support_Atomic_Primitives
60 SCA
, -- Support_Composite_Assign
61 SCC
, -- Support_Composite_Compare
62 SCD
, -- Stack_Check_Default
63 SCL
, -- Stack_Check_Limits
64 SCP
, -- Stack_Check_Probes
65 SLS
, -- Support_Long_Shifts
67 SSL
, -- Suppress_Standard_Library
68 UAM
, -- Use_Ada_Main_Program_Name
69 ZCX
); -- ZCX_By_Default
71 Targparm_Flags
: array (Targparm_Tags
) of Boolean := (others => False);
72 -- Flag is set True if corresponding parameter is scanned
74 -- The following list of string constants gives the parameter names
76 AAM_Str
: aliased constant Source_Buffer
:= "AAMP";
77 ACR_Str
: aliased constant Source_Buffer
:= "Always_Compatible_Rep";
78 ASD_Str
: aliased constant Source_Buffer
:= "Atomic_Sync_Default";
79 BDC_Str
: aliased constant Source_Buffer
:= "Backend_Divide_Checks";
80 BOC_Str
: aliased constant Source_Buffer
:= "Backend_Overflow_Checks";
81 CLA_Str
: aliased constant Source_Buffer
:= "Command_Line_Args";
82 CRT_Str
: aliased constant Source_Buffer
:= "Configurable_Run_Time";
83 D32_Str
: aliased constant Source_Buffer
:= "Duration_32_Bits";
84 DEN_Str
: aliased constant Source_Buffer
:= "Denorm";
85 EXS_Str
: aliased constant Source_Buffer
:= "Exit_Status_Supported";
86 FEL_Str
: aliased constant Source_Buffer
:= "Frontend_Layout";
87 FEX_Str
: aliased constant Source_Buffer
:= "Frontend_Exceptions";
88 FFO_Str
: aliased constant Source_Buffer
:= "Fractional_Fixed_Ops";
89 MOV_Str
: aliased constant Source_Buffer
:= "Machine_Overflows";
90 MRN_Str
: aliased constant Source_Buffer
:= "Machine_Rounds";
91 PAS_Str
: aliased constant Source_Buffer
:= "Preallocated_Stacks";
92 SAG_Str
: aliased constant Source_Buffer
:= "Support_Aggregates";
93 SAP_Str
: aliased constant Source_Buffer
:= "Support_Atomic_Primitives";
94 SCA_Str
: aliased constant Source_Buffer
:= "Support_Composite_Assign";
95 SCC_Str
: aliased constant Source_Buffer
:= "Support_Composite_Compare";
96 SCD_Str
: aliased constant Source_Buffer
:= "Stack_Check_Default";
97 SCL_Str
: aliased constant Source_Buffer
:= "Stack_Check_Limits";
98 SCP_Str
: aliased constant Source_Buffer
:= "Stack_Check_Probes";
99 SLS_Str
: aliased constant Source_Buffer
:= "Support_Long_Shifts";
100 SNZ_Str
: aliased constant Source_Buffer
:= "Signed_Zeros";
101 SSL_Str
: aliased constant Source_Buffer
:= "Suppress_Standard_Library";
102 UAM_Str
: aliased constant Source_Buffer
:= "Use_Ada_Main_Program_Name";
103 ZCX_Str
: aliased constant Source_Buffer
:= "ZCX_By_Default";
105 -- The following defines a set of pointers to the above strings,
106 -- indexed by the tag values.
108 type Buffer_Ptr
is access constant Source_Buffer
;
109 Targparm_Str
: constant array (Targparm_Tags
) of Buffer_Ptr
:=
110 (AAM
=> AAM_Str
'Access,
111 ACR
=> ACR_Str
'Access,
112 ASD
=> ASD_Str
'Access,
113 BDC
=> BDC_Str
'Access,
114 BOC
=> BOC_Str
'Access,
115 CLA
=> CLA_Str
'Access,
116 CRT
=> CRT_Str
'Access,
117 D32
=> D32_Str
'Access,
118 DEN
=> DEN_Str
'Access,
119 EXS
=> EXS_Str
'Access,
120 FEL
=> FEL_Str
'Access,
121 FEX
=> FEX_Str
'Access,
122 FFO
=> FFO_Str
'Access,
123 MOV
=> MOV_Str
'Access,
124 MRN
=> MRN_Str
'Access,
125 PAS
=> PAS_Str
'Access,
126 SAG
=> SAG_Str
'Access,
127 SAP
=> SAP_Str
'Access,
128 SCA
=> SCA_Str
'Access,
129 SCC
=> SCC_Str
'Access,
130 SCD
=> SCD_Str
'Access,
131 SCL
=> SCL_Str
'Access,
132 SCP
=> SCP_Str
'Access,
133 SLS
=> SLS_Str
'Access,
134 SNZ
=> SNZ_Str
'Access,
135 SSL
=> SSL_Str
'Access,
136 UAM
=> UAM_Str
'Access,
137 ZCX
=> ZCX_Str
'Access);
139 -----------------------
140 -- Local Subprograms --
141 -----------------------
143 procedure Set_Profile_Restrictions
(P
: Profile_Name
);
144 -- Set Restrictions_On_Target for the given profile
146 ---------------------------
147 -- Get_Target_Parameters --
148 ---------------------------
150 -- Version that reads in system.ads
152 procedure Get_Target_Parameters
153 (Make_Id
: Make_Id_Type
:= null;
154 Make_SC
: Make_SC_Type
:= null;
155 Set_NOD
: Set_NOD_Type
:= null;
156 Set_NSA
: Set_NSA_Type
:= null;
157 Set_NUA
: Set_NUA_Type
:= null;
158 Set_NUP
: Set_NUP_Type
:= null)
160 FD
: File_Descriptor
;
162 Text
: Source_Buffer_Ptr
;
165 if Parameters_Obtained
then
169 Name_Buffer
(1 .. 10) := "system.ads";
172 Read_Source_File
(Name_Find
, 0, Hi
, Text
, FD
);
174 if Null_Source_Buffer_Ptr
(Text
) then
175 Write_Line
("fatal error, run-time library not installed correctly");
178 Write_Line
("cannot locate file system.ads");
180 Write_Line
("no read access for file system.ads");
183 raise Unrecoverable_Error
;
186 Get_Target_Parameters
187 (System_Text
=> Text
,
196 end Get_Target_Parameters
;
198 -- Version where caller supplies system.ads text
200 procedure Get_Target_Parameters
201 (System_Text
: Source_Buffer_Ptr
;
202 Source_First
: Source_Ptr
;
203 Source_Last
: Source_Ptr
;
204 Make_Id
: Make_Id_Type
:= null;
205 Make_SC
: Make_SC_Type
:= null;
206 Set_NOD
: Set_NOD_Type
:= null;
207 Set_NSA
: Set_NSA_Type
:= null;
208 Set_NUA
: Set_NUA_Type
:= null;
209 Set_NUP
: Set_NUP_Type
:= null)
211 pragma Assert
(System_Text
'First = Source_First
);
212 pragma Assert
(System_Text
'Last = Source_Last
);
215 -- Scans source buffer containing source of system.ads
217 Fatal
: Boolean := False;
218 -- Set True if a fatal error is detected
221 -- Records boolean from system line
224 -- Status result from Set_NUP/NSA/NUA call
226 PR_Start
: Source_Ptr
;
227 -- Pointer to ( following pragma Restrictions
229 procedure Collect_Name
;
230 -- Scan a name starting at System_Text (P), and put Name in Name_Buffer,
231 -- with Name_Len being length, folded to lower case. On return, P points
232 -- just past the last character (which should be a right paren).
234 function Looking_At
(S
: Source_Buffer
) return Boolean;
235 -- True if P points to the same text as S in System_Text
237 function Looking_At_Skip
(S
: Source_Buffer
) return Boolean;
238 -- True if P points to the same text as S in System_Text,
239 -- and if True, moves P forward to skip S as a side effect.
245 procedure Collect_Name
is
249 if System_Text
(P
) in 'a' .. 'z'
251 System_Text
(P
) = '_'
253 System_Text
(P
) in '0' .. '9'
255 Name_Buffer
(Name_Len
+ 1) := System_Text
(P
);
257 elsif System_Text
(P
) in 'A' .. 'Z' then
258 Name_Buffer
(Name_Len
+ 1) :=
259 Character'Val (Character'Pos (System_Text
(P
)) + 32);
266 Name_Len
:= Name_Len
+ 1;
274 function Looking_At
(S
: Source_Buffer
) return Boolean is
275 Last
: constant Source_Ptr
:= P
+ S
'Length - 1;
277 return Last
<= System_Text
'Last
278 and then System_Text
(P
.. Last
) = S
;
281 ---------------------
282 -- Looking_At_Skip --
283 ---------------------
285 function Looking_At_Skip
(S
: Source_Buffer
) return Boolean is
286 Result
: constant Boolean := Looking_At
(S
);
295 -- Start of processing for Get_Target_Parameters
298 if Parameters_Obtained
then
302 Parameters_Obtained
:= True;
303 Opt
.Address_Is_Private
:= False;
305 -- Loop through source lines
307 -- Note: in the case or pragmas, we are only interested in pragmas that
308 -- appear as configuration pragmas. These are left justified, so they
309 -- do not have three spaces at the start. Pragmas appearing within the
310 -- package (like Pure and No_Elaboration_Code_All) will have the three
311 -- spaces at the start and so will be ignored.
313 -- For a special exception, see processing for pragma Pure below
317 while not Looking_At
("end System;") loop
320 if Looking_At
("-") then
321 goto Line_Loop_Continue
;
323 -- Test for type Address is private
325 elsif Looking_At_Skip
(" type Address is private;") then
326 Opt
.Address_Is_Private
:= True;
327 goto Line_Loop_Continue
;
329 -- Test for pragma Profile (Ravenscar);
331 elsif Looking_At_Skip
("pragma Profile (Ravenscar);") then
332 Set_Profile_Restrictions
(Ravenscar
);
333 Opt
.Task_Dispatching_Policy
:= 'F';
334 Opt
.Locking_Policy
:= 'C';
335 goto Line_Loop_Continue
;
337 -- Test for pragma Profile (GNAT_Extended_Ravenscar);
339 elsif Looking_At_Skip
340 ("pragma Profile (GNAT_Extended_Ravenscar);")
342 Set_Profile_Restrictions
(GNAT_Extended_Ravenscar
);
343 Opt
.Task_Dispatching_Policy
:= 'F';
344 Opt
.Locking_Policy
:= 'C';
345 goto Line_Loop_Continue
;
347 -- Test for pragma Profile (GNAT_Ravenscar_EDF);
349 elsif Looking_At_Skip
("pragma Profile (GNAT_Ravenscar_EDF);") then
350 Set_Profile_Restrictions
(GNAT_Ravenscar_EDF
);
351 Opt
.Task_Dispatching_Policy
:= 'E';
352 Opt
.Locking_Policy
:= 'C';
353 goto Line_Loop_Continue
;
355 -- Test for pragma Profile (Restricted);
357 elsif Looking_At_Skip
("pragma Profile (Restricted);") then
358 Set_Profile_Restrictions
(Restricted
);
359 goto Line_Loop_Continue
;
361 -- Test for pragma Restrictions
363 elsif Looking_At_Skip
("pragma Restrictions (") then
366 -- Boolean restrictions
368 for K
in All_Boolean_Restrictions
loop
370 Rname
: constant String := Restriction_Id
'Image (K
);
373 for J
in Rname
'Range loop
374 if Fold_Upper
(System_Text
(P
+ Source_Ptr
(J
- 1)))
381 if System_Text
(P
+ Rname
'Length) = ')' then
382 Restrictions_On_Target
.Set
(K
) := True;
383 goto Line_Loop_Continue
;
387 <<Rloop_Continue
>> null;
390 -- Restrictions taking integer parameter
392 Ploop
: for K
in Integer_Parameter_Restrictions
loop
394 Rname
: constant String :=
395 All_Parameter_Restrictions
'Image (K
);
401 for J
in Rname
'Range loop
402 if Fold_Upper
(System_Text
(P
+ Source_Ptr
(J
- 1)))
409 if System_Text
(P
+ Rname
'Length .. P
+ Rname
'Length + 3) =
412 P
:= P
+ Rname
'Length + 4;
416 if System_Text
(P
) in '0' .. '9' then
418 pragma Unsuppress
(Overflow_Check
);
421 -- Accumulate next digit
424 Character'Pos (System_Text
(P
)) -
428 -- On overflow, we just ignore the pragma since
429 -- that is the standard handling in this case.
431 when Constraint_Error
=>
432 goto Line_Loop_Continue
;
435 elsif System_Text
(P
) = '_' then
438 elsif System_Text
(P
) = ')' then
439 Restrictions_On_Target
.Value
(K
) := V
;
440 Restrictions_On_Target
.Set
(K
) := True;
441 goto Line_Loop_Continue
;
455 <<Ploop_Continue
>> null;
458 -- No_Dependence case
460 if Looking_At_Skip
("No_Dependence => ") then
461 -- Skip this processing (and simply ignore No_Dependence lines)
462 -- if caller did not supply the three subprograms we need to
463 -- process these lines.
465 if Make_Id
= null then
466 goto Line_Loop_Continue
;
469 -- We have scanned out "pragma Restrictions (No_Dependence =>"
479 -- Loop through components of name, building up Unit
483 while System_Text
(P
) /= '.'
485 System_Text
(P
) /= ')'
490 Id
:= Make_Id
(System_Text
(Start
.. P
- 1));
492 -- If first name, just capture the identifier
497 Unit
:= Make_SC
(Unit
, Id
);
500 exit when System_Text
(P
) = ')';
505 goto Line_Loop_Continue
;
508 -- No_Specification_Of_Aspect case
510 elsif Looking_At_Skip
("No_Specification_Of_Aspect => ") then
511 -- Skip this processing (and simply ignore the pragma), if
512 -- caller did not supply the subprogram we need to process
515 if Set_NSA
= null then
516 goto Line_Loop_Continue
;
520 -- "pragma Restrictions (No_Specification_Of_Aspect =>"
524 if System_Text
(P
) /= ')' then
525 goto Bad_Restrictions_Pragma
;
528 Set_NSA
(Name_Find
, OK
);
531 goto Line_Loop_Continue
;
533 goto Bad_Restrictions_Pragma
;
537 -- No_Use_Of_Attribute case
539 elsif Looking_At_Skip
("No_Use_Of_Attribute => ") then
540 -- Skip this processing (and simply ignore No_Use_Of_Attribute
541 -- lines) if caller did not supply the subprogram we need to
542 -- process such lines.
544 if Set_NUA
= null then
545 goto Line_Loop_Continue
;
549 -- "pragma Restrictions (No_Use_Of_Attribute =>"
553 if System_Text
(P
) /= ')' then
554 goto Bad_Restrictions_Pragma
;
557 Set_NUA
(Name_Find
, OK
);
560 goto Line_Loop_Continue
;
562 goto Bad_Restrictions_Pragma
;
566 -- No_Use_Of_Pragma case
568 elsif Looking_At_Skip
("No_Use_Of_Pragma => ") then
569 -- Skip this processing (and simply ignore No_Use_Of_Pragma
570 -- lines) if caller did not supply the subprogram we need to
571 -- process such lines.
573 if Set_NUP
= null then
574 goto Line_Loop_Continue
;
578 -- "pragma Restrictions (No_Use_Of_Pragma =>"
582 if System_Text
(P
) /= ')' then
583 goto Bad_Restrictions_Pragma
;
586 Set_NUP
(Name_Find
, OK
);
589 goto Line_Loop_Continue
;
591 goto Bad_Restrictions_Pragma
;
596 -- Here if unrecognizable restrictions pragma form
598 <<Bad_Restrictions_Pragma
>>
602 ("fatal error: system.ads is incorrectly formatted");
603 Write_Str
("unrecognized or incorrect restrictions pragma: ");
607 exit when System_Text
(P
) = ASCII
.LF
;
608 Write_Char
(System_Text
(P
));
609 exit when System_Text
(P
) = ')';
617 -- Test for pragma Detect_Blocking;
619 elsif Looking_At_Skip
("pragma Detect_Blocking;") then
620 Opt
.Detect_Blocking
:= True;
621 goto Line_Loop_Continue
;
625 elsif Looking_At_Skip
("pragma Discard_Names;") then
626 Opt
.Global_Discard_Names
:= True;
627 goto Line_Loop_Continue
;
631 elsif Looking_At_Skip
("pragma Locking_Policy (") then
632 Opt
.Locking_Policy
:= System_Text
(P
);
633 Opt
.Locking_Policy_Sloc
:= System_Location
;
634 goto Line_Loop_Continue
;
638 elsif Looking_At_Skip
("pragma Normalize_Scalars;") then
639 Opt
.Normalize_Scalars
:= True;
640 Opt
.Init_Or_Norm_Scalars
:= True;
641 goto Line_Loop_Continue
;
643 -- Partition_Elaboration_Policy
645 elsif Looking_At_Skip
("pragma Partition_Elaboration_Policy (") then
646 Opt
.Partition_Elaboration_Policy
:= System_Text
(P
);
647 Opt
.Partition_Elaboration_Policy_Sloc
:= System_Location
;
648 goto Line_Loop_Continue
;
652 elsif Looking_At_Skip
("pragma Polling (On);") then
653 Opt
.Polling_Required
:= True;
654 goto Line_Loop_Continue
;
658 elsif Looking_At_Skip
("pragma Queuing_Policy (") then
659 Opt
.Queuing_Policy
:= System_Text
(P
);
660 Opt
.Queuing_Policy_Sloc
:= System_Location
;
661 goto Line_Loop_Continue
;
663 -- Suppress_Exception_Locations
665 elsif Looking_At_Skip
("pragma Suppress_Exception_Locations;") then
666 Opt
.Exception_Locations_Suppressed
:= True;
667 goto Line_Loop_Continue
;
669 -- Task_Dispatching Policy
671 elsif Looking_At_Skip
("pragma Task_Dispatching_Policy (") then
672 Opt
.Task_Dispatching_Policy
:= System_Text
(P
);
673 Opt
.Task_Dispatching_Policy_Sloc
:= System_Location
;
674 goto Line_Loop_Continue
;
676 -- No other configuration pragmas are permitted
678 elsif Looking_At
("pragma ") then
679 -- Special exception, we allow pragma Pure (System) appearing in
680 -- column one. This is an obsolete usage which may show up in old
681 -- tests with an obsolete version of system.ads, so we recognize
682 -- and ignore it to make life easier in handling such tests.
684 if Looking_At_Skip
("pragma Pure (System);") then
685 goto Line_Loop_Continue
;
689 Write_Line
("unrecognized line in system.ads: ");
691 while System_Text
(P
) /= ')'
692 and then System_Text
(P
) /= ASCII
.LF
694 Write_Char
(System_Text
(P
));
702 -- See if we have a Run_Time_Name
704 elsif Looking_At_Skip
705 (" Run_Time_Name : constant String := """)
708 while System_Text
(P
) in 'A' .. 'Z'
710 System_Text
(P
) in 'a' .. 'z'
712 System_Text
(P
) in '0' .. '9'
714 System_Text
(P
) = ' '
716 System_Text
(P
) = '_'
718 Add_Char_To_Name_Buffer
(System_Text
(P
));
722 if System_Text
(P
) /= '"'
723 or else System_Text
(P
+ 1) /= ';'
724 or else (System_Text
(P
+ 2) /= ASCII
.LF
726 System_Text
(P
+ 2) /= ASCII
.CR
)
730 ("incorrectly formatted Run_Time_Name in system.ads");
735 Run_Time_Name_On_Target
:= Name_Enter
;
738 goto Line_Loop_Continue
;
740 -- See if we have an Executable_Extension
742 elsif Looking_At_Skip
743 (" Executable_Extension : constant String := """)
746 while System_Text
(P
) /= '"'
747 and then System_Text
(P
) /= ASCII
.LF
749 Add_Char_To_Name_Buffer
(System_Text
(P
));
753 if System_Text
(P
) /= '"' or else System_Text
(P
+ 1) /= ';' then
756 ("incorrectly formatted Executable_Extension in system.ads");
761 Executable_Extension_On_Target
:= Name_Enter
;
764 goto Line_Loop_Continue
;
766 -- Next see if we have a configuration parameter
769 Config_Param_Loop
: for K
in Targparm_Tags
loop
770 if Looking_At_Skip
(" " & Targparm_Str
(K
).all) then
771 if Targparm_Flags
(K
) then
774 ("fatal error: system.ads is incorrectly formatted");
775 Write_Str
("duplicate line for parameter: ");
777 for J
in Targparm_Str
(K
)'Range loop
778 Write_Char
(Targparm_Str
(K
).all (J
));
786 Targparm_Flags
(K
) := True;
789 while System_Text
(P
) /= ':'
790 or else System_Text
(P
+ 1) /= '='
797 while System_Text
(P
) = ' ' loop
801 Result
:= (System_Text
(P
) = 'T');
805 when ACR
=> Always_Compatible_Rep_On_Target
:= Result
;
806 when ASD
=> Atomic_Sync_Default_On_Target
:= Result
;
807 when BDC
=> Backend_Divide_Checks_On_Target
:= Result
;
808 when BOC
=> Backend_Overflow_Checks_On_Target
:= Result
;
809 when CLA
=> Command_Line_Args_On_Target
:= Result
;
810 when CRT
=> Configurable_Run_Time_On_Target
:= Result
;
811 when D32
=> Duration_32_Bits_On_Target
:= Result
;
812 when DEN
=> Denorm_On_Target
:= Result
;
813 when EXS
=> Exit_Status_Supported_On_Target
:= Result
;
815 when FEX
=> Frontend_Exceptions_On_Target
:= Result
;
816 when FFO
=> Fractional_Fixed_Ops_On_Target
:= Result
;
817 when MOV
=> Machine_Overflows_On_Target
:= Result
;
818 when MRN
=> Machine_Rounds_On_Target
:= Result
;
819 when PAS
=> Preallocated_Stacks_On_Target
:= Result
;
820 when SAG
=> Support_Aggregates_On_Target
:= Result
;
821 when SAP
=> Support_Atomic_Primitives_On_Target
:= Result
;
822 when SCA
=> Support_Composite_Assign_On_Target
:= Result
;
823 when SCC
=> Support_Composite_Compare_On_Target
:= Result
;
824 when SCD
=> Stack_Check_Default_On_Target
:= Result
;
825 when SCL
=> Stack_Check_Limits_On_Target
:= Result
;
826 when SCP
=> Stack_Check_Probes_On_Target
:= Result
;
827 when SLS
=> Support_Long_Shifts_On_Target
:= Result
;
828 when SSL
=> Suppress_Standard_Library_On_Target
:= Result
;
829 when SNZ
=> Signed_Zeros_On_Target
:= Result
;
830 when UAM
=> Use_Ada_Main_Program_Name_On_Target
:= Result
;
831 when ZCX
=> ZCX_By_Default_On_Target
:= Result
;
833 goto Line_Loop_Continue
;
836 -- Here we are seeing a parameter we do not understand. We
837 -- simply ignore this (will happen when an old compiler is
838 -- used to compile a newer version of GNAT which does not
839 -- support the parameter).
841 end loop Config_Param_Loop
;
844 -- Here after processing one line of System spec
846 <<Line_Loop_Continue
>>
848 while P
< Source_Last
849 and then System_Text
(P
) /= CR
850 and then System_Text
(P
) /= LF
855 while P
< Source_Last
856 and then (System_Text
(P
) = CR
857 or else System_Text
(P
) = LF
)
862 if P
>= Source_Last
then
864 Write_Line
("fatal error, system.ads not formatted correctly");
865 Write_Line
("unexpected end of file");
867 raise Unrecoverable_Error
;
872 raise Unrecoverable_Error
;
874 end Get_Target_Parameters
;
876 ------------------------------
877 -- Set_Profile_Restrictions --
878 ------------------------------
880 procedure Set_Profile_Restrictions
(P
: Profile_Name
) is
881 R
: Restriction_Flags
renames Profile_Info
(P
).Set
;
882 V
: Restriction_Values
renames Profile_Info
(P
).Value
;
884 for J
in R
'Range loop
886 Restrictions_On_Target
.Set
(J
) := True;
888 if J
in All_Parameter_Restrictions
then
889 Restrictions_On_Target
.Value
(J
) := V
(J
);
893 end Set_Profile_Restrictions
;