1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
9 -- Copyright (C) 1999-2017, 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
;
31 package body Targparm
is
34 Parameters_Obtained
: Boolean := False;
35 -- Set True after first call to Get_Target_Parameters. Used to avoid
36 -- reading system.ads more than once, since it cannot change.
38 -- The following array defines a tag name for each entry
42 ACR
, -- Always_Compatible_Rep
43 ASD
, -- Atomic_Sync_Default
44 BDC
, -- Backend_Divide_Checks
45 BOC
, -- Backend_Overflow_Checks
46 CLA
, -- Command_Line_Args
47 CRT
, -- Configurable_Run_Times
48 D32
, -- Duration_32_Bits
50 EXS
, -- Exit_Status_Supported
51 FEL
, -- Frontend_Layout
52 FEX
, -- Frontend_Exceptions
53 FFO
, -- Fractional_Fixed_Ops
54 MOV
, -- Machine_Overflows
55 MRN
, -- Machine_Rounds
56 PAS
, -- Preallocated_Stacks
57 SAG
, -- Support_Aggregates
58 SAP
, -- Support_Atomic_Primitives
59 SCA
, -- Support_Composite_Assign
60 SCC
, -- Support_Composite_Compare
61 SCD
, -- Stack_Check_Default
62 SCL
, -- Stack_Check_Limits
63 SCP
, -- Stack_Check_Probes
64 SLS
, -- Support_Long_Shifts
66 SSL
, -- Suppress_Standard_Library
67 UAM
, -- Use_Ada_Main_Program_Name
68 ZCX
); -- ZCX_By_Default
70 Targparm_Flags
: array (Targparm_Tags
) of Boolean := (others => False);
71 -- Flag is set True if corresponding parameter is scanned
73 -- The following list of string constants gives the parameter names
75 AAM_Str
: aliased constant Source_Buffer
:= "AAMP";
76 ACR_Str
: aliased constant Source_Buffer
:= "Always_Compatible_Rep";
77 ASD_Str
: aliased constant Source_Buffer
:= "Atomic_Sync_Default";
78 BDC_Str
: aliased constant Source_Buffer
:= "Backend_Divide_Checks";
79 BOC_Str
: aliased constant Source_Buffer
:= "Backend_Overflow_Checks";
80 CLA_Str
: aliased constant Source_Buffer
:= "Command_Line_Args";
81 CRT_Str
: aliased constant Source_Buffer
:= "Configurable_Run_Time";
82 D32_Str
: aliased constant Source_Buffer
:= "Duration_32_Bits";
83 DEN_Str
: aliased constant Source_Buffer
:= "Denorm";
84 EXS_Str
: aliased constant Source_Buffer
:= "Exit_Status_Supported";
85 FEL_Str
: aliased constant Source_Buffer
:= "Frontend_Layout";
86 FEX_Str
: aliased constant Source_Buffer
:= "Frontend_Exceptions";
87 FFO_Str
: aliased constant Source_Buffer
:= "Fractional_Fixed_Ops";
88 MOV_Str
: aliased constant Source_Buffer
:= "Machine_Overflows";
89 MRN_Str
: aliased constant Source_Buffer
:= "Machine_Rounds";
90 PAS_Str
: aliased constant Source_Buffer
:= "Preallocated_Stacks";
91 SAG_Str
: aliased constant Source_Buffer
:= "Support_Aggregates";
92 SAP_Str
: aliased constant Source_Buffer
:= "Support_Atomic_Primitives";
93 SCA_Str
: aliased constant Source_Buffer
:= "Support_Composite_Assign";
94 SCC_Str
: aliased constant Source_Buffer
:= "Support_Composite_Compare";
95 SCD_Str
: aliased constant Source_Buffer
:= "Stack_Check_Default";
96 SCL_Str
: aliased constant Source_Buffer
:= "Stack_Check_Limits";
97 SCP_Str
: aliased constant Source_Buffer
:= "Stack_Check_Probes";
98 SLS_Str
: aliased constant Source_Buffer
:= "Support_Long_Shifts";
99 SNZ_Str
: aliased constant Source_Buffer
:= "Signed_Zeros";
100 SSL_Str
: aliased constant Source_Buffer
:= "Suppress_Standard_Library";
101 UAM_Str
: aliased constant Source_Buffer
:= "Use_Ada_Main_Program_Name";
102 ZCX_Str
: aliased constant Source_Buffer
:= "ZCX_By_Default";
104 -- The following defines a set of pointers to the above strings,
105 -- indexed by the tag values.
107 type Buffer_Ptr
is access constant Source_Buffer
;
108 Targparm_Str
: constant array (Targparm_Tags
) of Buffer_Ptr
:=
109 (AAM
=> AAM_Str
'Access,
110 ACR
=> ACR_Str
'Access,
111 ASD
=> ASD_Str
'Access,
112 BDC
=> BDC_Str
'Access,
113 BOC
=> BOC_Str
'Access,
114 CLA
=> CLA_Str
'Access,
115 CRT
=> CRT_Str
'Access,
116 D32
=> D32_Str
'Access,
117 DEN
=> DEN_Str
'Access,
118 EXS
=> EXS_Str
'Access,
119 FEL
=> FEL_Str
'Access,
120 FEX
=> FEX_Str
'Access,
121 FFO
=> FFO_Str
'Access,
122 MOV
=> MOV_Str
'Access,
123 MRN
=> MRN_Str
'Access,
124 PAS
=> PAS_Str
'Access,
125 SAG
=> SAG_Str
'Access,
126 SAP
=> SAP_Str
'Access,
127 SCA
=> SCA_Str
'Access,
128 SCC
=> SCC_Str
'Access,
129 SCD
=> SCD_Str
'Access,
130 SCL
=> SCL_Str
'Access,
131 SCP
=> SCP_Str
'Access,
132 SLS
=> SLS_Str
'Access,
133 SNZ
=> SNZ_Str
'Access,
134 SSL
=> SSL_Str
'Access,
135 UAM
=> UAM_Str
'Access,
136 ZCX
=> ZCX_Str
'Access);
138 -----------------------
139 -- Local Subprograms --
140 -----------------------
142 procedure Set_Profile_Restrictions
(P
: Profile_Name
);
143 -- Set Restrictions_On_Target for the given profile
145 ---------------------------
146 -- Get_Target_Parameters --
147 ---------------------------
149 -- Version that reads in system.ads
151 procedure Get_Target_Parameters
152 (Make_Id
: Make_Id_Type
:= null;
153 Make_SC
: Make_SC_Type
:= null;
154 Set_NOD
: Set_NOD_Type
:= null;
155 Set_NSA
: Set_NSA_Type
:= null;
156 Set_NUA
: Set_NUA_Type
:= null;
157 Set_NUP
: Set_NUP_Type
:= null)
159 Text
: Source_Buffer_Ptr
;
163 if Parameters_Obtained
then
167 Name_Buffer
(1 .. 10) := "system.ads";
170 Read_Source_File
(Name_Find
, Lo
=> 0, Hi
=> Hi
, Src
=> Text
);
172 if Null_Source_Buffer_Ptr
(Text
) then
173 Write_Line
("fatal error, run-time library not installed correctly");
174 Write_Line
("cannot locate file system.ads");
175 raise Unrecoverable_Error
;
178 Get_Target_Parameters
179 (System_Text
=> Text
,
188 end Get_Target_Parameters
;
190 -- Version where caller supplies system.ads text
192 procedure Get_Target_Parameters
193 (System_Text
: Source_Buffer_Ptr
;
194 Source_First
: Source_Ptr
;
195 Source_Last
: Source_Ptr
;
196 Make_Id
: Make_Id_Type
:= null;
197 Make_SC
: Make_SC_Type
:= null;
198 Set_NOD
: Set_NOD_Type
:= null;
199 Set_NSA
: Set_NSA_Type
:= null;
200 Set_NUA
: Set_NUA_Type
:= null;
201 Set_NUP
: Set_NUP_Type
:= null)
203 pragma Assert
(System_Text
'First = Source_First
);
204 pragma Assert
(System_Text
'Last = Source_Last
);
207 -- Scans source buffer containing source of system.ads
209 Fatal
: Boolean := False;
210 -- Set True if a fatal error is detected
213 -- Records boolean from system line
216 -- Status result from Set_NUP/NSA/NUA call
218 PR_Start
: Source_Ptr
;
219 -- Pointer to ( following pragma Restrictions
221 procedure Collect_Name
;
222 -- Scan a name starting at System_Text (P), and put Name in Name_Buffer,
223 -- with Name_Len being length, folded to lower case. On return, P points
224 -- just past the last character (which should be a right paren).
226 function Looking_At
(S
: Source_Buffer
) return Boolean;
227 -- True if P points to the same text as S in System_Text
229 function Looking_At_Skip
(S
: Source_Buffer
) return Boolean;
230 -- True if P points to the same text as S in System_Text,
231 -- and if True, moves P forward to skip S as a side effect.
237 procedure Collect_Name
is
241 if System_Text
(P
) in 'a' .. 'z'
243 System_Text
(P
) = '_'
245 System_Text
(P
) in '0' .. '9'
247 Name_Buffer
(Name_Len
+ 1) := System_Text
(P
);
249 elsif System_Text
(P
) in 'A' .. 'Z' then
250 Name_Buffer
(Name_Len
+ 1) :=
251 Character'Val (Character'Pos (System_Text
(P
)) + 32);
258 Name_Len
:= Name_Len
+ 1;
266 function Looking_At
(S
: Source_Buffer
) return Boolean is
267 Last
: constant Source_Ptr
:= P
+ S
'Length - 1;
269 return Last
<= System_Text
'Last
270 and then System_Text
(P
.. Last
) = S
;
273 ---------------------
274 -- Looking_At_Skip --
275 ---------------------
277 function Looking_At_Skip
(S
: Source_Buffer
) return Boolean is
278 Result
: constant Boolean := Looking_At
(S
);
287 -- Start of processing for Get_Target_Parameters
290 if Parameters_Obtained
then
294 Parameters_Obtained
:= True;
295 Opt
.Address_Is_Private
:= False;
297 -- Loop through source lines
299 -- Note: in the case or pragmas, we are only interested in pragmas that
300 -- appear as configuration pragmas. These are left justified, so they
301 -- do not have three spaces at the start. Pragmas appearing within the
302 -- package (like Pure and No_Elaboration_Code_All) will have the three
303 -- spaces at the start and so will be ignored.
305 -- For a special exception, see processing for pragma Pure below
309 while not Looking_At
("end System;") loop
312 if Looking_At
("-") then
313 goto Line_Loop_Continue
;
315 -- Test for type Address is private
317 elsif Looking_At_Skip
(" type Address is private;") then
318 Opt
.Address_Is_Private
:= True;
319 goto Line_Loop_Continue
;
321 -- Test for pragma Profile (Ravenscar);
323 elsif Looking_At_Skip
("pragma Profile (Ravenscar);") then
324 Set_Profile_Restrictions
(Ravenscar
);
325 Opt
.Task_Dispatching_Policy
:= 'F';
326 Opt
.Locking_Policy
:= 'C';
327 goto Line_Loop_Continue
;
329 -- Test for pragma Profile (GNAT_Extended_Ravenscar);
331 elsif Looking_At_Skip
332 ("pragma Profile (GNAT_Extended_Ravenscar);")
334 Set_Profile_Restrictions
(GNAT_Extended_Ravenscar
);
335 Opt
.Task_Dispatching_Policy
:= 'F';
336 Opt
.Locking_Policy
:= 'C';
337 goto Line_Loop_Continue
;
339 -- Test for pragma Profile (GNAT_Ravenscar_EDF);
341 elsif Looking_At_Skip
("pragma Profile (GNAT_Ravenscar_EDF);") then
342 Set_Profile_Restrictions
(GNAT_Ravenscar_EDF
);
343 Opt
.Task_Dispatching_Policy
:= 'E';
344 Opt
.Locking_Policy
:= 'C';
345 goto Line_Loop_Continue
;
347 -- Test for pragma Profile (Restricted);
349 elsif Looking_At_Skip
("pragma Profile (Restricted);") then
350 Set_Profile_Restrictions
(Restricted
);
351 goto Line_Loop_Continue
;
353 -- Test for pragma Restrictions
355 elsif Looking_At_Skip
("pragma Restrictions (") then
358 -- Boolean restrictions
360 for K
in All_Boolean_Restrictions
loop
362 Rname
: constant String := Restriction_Id
'Image (K
);
365 for J
in Rname
'Range loop
366 if Fold_Upper
(System_Text
(P
+ Source_Ptr
(J
- 1)))
373 if System_Text
(P
+ Rname
'Length) = ')' then
374 Restrictions_On_Target
.Set
(K
) := True;
375 goto Line_Loop_Continue
;
379 <<Rloop_Continue
>> null;
382 -- Restrictions taking integer parameter
384 Ploop
: for K
in Integer_Parameter_Restrictions
loop
386 Rname
: constant String :=
387 All_Parameter_Restrictions
'Image (K
);
393 for J
in Rname
'Range loop
394 if Fold_Upper
(System_Text
(P
+ Source_Ptr
(J
- 1)))
401 if System_Text
(P
+ Rname
'Length .. P
+ Rname
'Length + 3) =
404 P
:= P
+ Rname
'Length + 4;
408 if System_Text
(P
) in '0' .. '9' then
410 pragma Unsuppress
(Overflow_Check
);
413 -- Accumulate next digit
416 Character'Pos (System_Text
(P
)) -
420 -- On overflow, we just ignore the pragma since
421 -- that is the standard handling in this case.
423 when Constraint_Error
=>
424 goto Line_Loop_Continue
;
427 elsif System_Text
(P
) = '_' then
430 elsif System_Text
(P
) = ')' then
431 Restrictions_On_Target
.Value
(K
) := V
;
432 Restrictions_On_Target
.Set
(K
) := True;
433 goto Line_Loop_Continue
;
447 <<Ploop_Continue
>> null;
450 -- No_Dependence case
452 if Looking_At_Skip
("No_Dependence => ") then
453 -- Skip this processing (and simply ignore No_Dependence lines)
454 -- if caller did not supply the three subprograms we need to
455 -- process these lines.
457 if Make_Id
= null then
458 goto Line_Loop_Continue
;
461 -- We have scanned out "pragma Restrictions (No_Dependence =>"
471 -- Loop through components of name, building up Unit
475 while System_Text
(P
) /= '.'
477 System_Text
(P
) /= ')'
482 Id
:= Make_Id
(System_Text
(Start
.. P
- 1));
484 -- If first name, just capture the identifier
489 Unit
:= Make_SC
(Unit
, Id
);
492 exit when System_Text
(P
) = ')';
497 goto Line_Loop_Continue
;
500 -- No_Specification_Of_Aspect case
502 elsif Looking_At_Skip
("No_Specification_Of_Aspect => ") then
503 -- Skip this processing (and simply ignore the pragma), if
504 -- caller did not supply the subprogram we need to process
507 if Set_NSA
= null then
508 goto Line_Loop_Continue
;
512 -- "pragma Restrictions (No_Specification_Of_Aspect =>"
516 if System_Text
(P
) /= ')' then
517 goto Bad_Restrictions_Pragma
;
520 Set_NSA
(Name_Find
, OK
);
523 goto Line_Loop_Continue
;
525 goto Bad_Restrictions_Pragma
;
529 -- No_Use_Of_Attribute case
531 elsif Looking_At_Skip
("No_Use_Of_Attribute => ") then
532 -- Skip this processing (and simply ignore No_Use_Of_Attribute
533 -- lines) if caller did not supply the subprogram we need to
534 -- process such lines.
536 if Set_NUA
= null then
537 goto Line_Loop_Continue
;
541 -- "pragma Restrictions (No_Use_Of_Attribute =>"
545 if System_Text
(P
) /= ')' then
546 goto Bad_Restrictions_Pragma
;
549 Set_NUA
(Name_Find
, OK
);
552 goto Line_Loop_Continue
;
554 goto Bad_Restrictions_Pragma
;
558 -- No_Use_Of_Pragma case
560 elsif Looking_At_Skip
("No_Use_Of_Pragma => ") then
561 -- Skip this processing (and simply ignore No_Use_Of_Pragma
562 -- lines) if caller did not supply the subprogram we need to
563 -- process such lines.
565 if Set_NUP
= null then
566 goto Line_Loop_Continue
;
570 -- "pragma Restrictions (No_Use_Of_Pragma =>"
574 if System_Text
(P
) /= ')' then
575 goto Bad_Restrictions_Pragma
;
578 Set_NUP
(Name_Find
, OK
);
581 goto Line_Loop_Continue
;
583 goto Bad_Restrictions_Pragma
;
588 -- Here if unrecognizable restrictions pragma form
590 <<Bad_Restrictions_Pragma
>>
594 ("fatal error: system.ads is incorrectly formatted");
595 Write_Str
("unrecognized or incorrect restrictions pragma: ");
599 exit when System_Text
(P
) = ASCII
.LF
;
600 Write_Char
(System_Text
(P
));
601 exit when System_Text
(P
) = ')';
609 -- Test for pragma Detect_Blocking;
611 elsif Looking_At_Skip
("pragma Detect_Blocking;") then
612 Opt
.Detect_Blocking
:= True;
613 goto Line_Loop_Continue
;
617 elsif Looking_At_Skip
("pragma Discard_Names;") then
618 Opt
.Global_Discard_Names
:= True;
619 goto Line_Loop_Continue
;
623 elsif Looking_At_Skip
("pragma Locking_Policy (") then
624 Opt
.Locking_Policy
:= System_Text
(P
);
625 Opt
.Locking_Policy_Sloc
:= System_Location
;
626 goto Line_Loop_Continue
;
630 elsif Looking_At_Skip
("pragma Normalize_Scalars;") then
631 Opt
.Normalize_Scalars
:= True;
632 Opt
.Init_Or_Norm_Scalars
:= True;
633 goto Line_Loop_Continue
;
635 -- Partition_Elaboration_Policy
637 elsif Looking_At_Skip
("pragma Partition_Elaboration_Policy (") then
638 Opt
.Partition_Elaboration_Policy
:= System_Text
(P
);
639 Opt
.Partition_Elaboration_Policy_Sloc
:= System_Location
;
640 goto Line_Loop_Continue
;
644 elsif Looking_At_Skip
("pragma Polling (On);") then
645 Opt
.Polling_Required
:= True;
646 goto Line_Loop_Continue
;
650 elsif Looking_At_Skip
("pragma Queuing_Policy (") then
651 Opt
.Queuing_Policy
:= System_Text
(P
);
652 Opt
.Queuing_Policy_Sloc
:= System_Location
;
653 goto Line_Loop_Continue
;
655 -- Suppress_Exception_Locations
657 elsif Looking_At_Skip
("pragma Suppress_Exception_Locations;") then
658 Opt
.Exception_Locations_Suppressed
:= True;
659 goto Line_Loop_Continue
;
661 -- Task_Dispatching Policy
663 elsif Looking_At_Skip
("pragma Task_Dispatching_Policy (") then
664 Opt
.Task_Dispatching_Policy
:= System_Text
(P
);
665 Opt
.Task_Dispatching_Policy_Sloc
:= System_Location
;
666 goto Line_Loop_Continue
;
668 -- No other configuration pragmas are permitted
670 elsif Looking_At
("pragma ") then
671 -- Special exception, we allow pragma Pure (System) appearing in
672 -- column one. This is an obsolete usage which may show up in old
673 -- tests with an obsolete version of system.ads, so we recognize
674 -- and ignore it to make life easier in handling such tests.
676 if Looking_At_Skip
("pragma Pure (System);") then
677 goto Line_Loop_Continue
;
681 Write_Line
("unrecognized line in system.ads: ");
683 while System_Text
(P
) /= ')'
684 and then System_Text
(P
) /= ASCII
.LF
686 Write_Char
(System_Text
(P
));
694 -- See if we have a Run_Time_Name
696 elsif Looking_At_Skip
697 (" Run_Time_Name : constant String := """)
700 while System_Text
(P
) in 'A' .. 'Z'
702 System_Text
(P
) in 'a' .. 'z'
704 System_Text
(P
) in '0' .. '9'
706 System_Text
(P
) = ' '
708 System_Text
(P
) = '_'
710 Add_Char_To_Name_Buffer
(System_Text
(P
));
714 if System_Text
(P
) /= '"'
715 or else System_Text
(P
+ 1) /= ';'
716 or else (System_Text
(P
+ 2) /= ASCII
.LF
718 System_Text
(P
+ 2) /= ASCII
.CR
)
722 ("incorrectly formatted Run_Time_Name in system.ads");
727 Run_Time_Name_On_Target
:= Name_Enter
;
730 goto Line_Loop_Continue
;
732 -- See if we have an Executable_Extension
734 elsif Looking_At_Skip
735 (" Executable_Extension : constant String := """)
738 while System_Text
(P
) /= '"'
739 and then System_Text
(P
) /= ASCII
.LF
741 Add_Char_To_Name_Buffer
(System_Text
(P
));
745 if System_Text
(P
) /= '"' or else System_Text
(P
+ 1) /= ';' then
748 ("incorrectly formatted Executable_Extension in system.ads");
753 Executable_Extension_On_Target
:= Name_Enter
;
756 goto Line_Loop_Continue
;
758 -- Next see if we have a configuration parameter
761 Config_Param_Loop
: for K
in Targparm_Tags
loop
762 if Looking_At_Skip
(" " & Targparm_Str
(K
).all) then
763 if Targparm_Flags
(K
) then
766 ("fatal error: system.ads is incorrectly formatted");
767 Write_Str
("duplicate line for parameter: ");
769 for J
in Targparm_Str
(K
)'Range loop
770 Write_Char
(Targparm_Str
(K
).all (J
));
778 Targparm_Flags
(K
) := True;
781 while System_Text
(P
) /= ':'
782 or else System_Text
(P
+ 1) /= '='
789 while System_Text
(P
) = ' ' loop
793 Result
:= (System_Text
(P
) = 'T');
796 when AAM
=> AAMP_On_Target
:= Result
;
797 when ACR
=> Always_Compatible_Rep_On_Target
:= Result
;
798 when ASD
=> Atomic_Sync_Default_On_Target
:= Result
;
799 when BDC
=> Backend_Divide_Checks_On_Target
:= Result
;
800 when BOC
=> Backend_Overflow_Checks_On_Target
:= Result
;
801 when CLA
=> Command_Line_Args_On_Target
:= Result
;
802 when CRT
=> Configurable_Run_Time_On_Target
:= Result
;
803 when D32
=> Duration_32_Bits_On_Target
:= Result
;
804 when DEN
=> Denorm_On_Target
:= Result
;
805 when EXS
=> Exit_Status_Supported_On_Target
:= Result
;
806 when FEL
=> Frontend_Layout_On_Target
:= Result
;
807 when FEX
=> Frontend_Exceptions_On_Target
:= Result
;
808 when FFO
=> Fractional_Fixed_Ops_On_Target
:= Result
;
809 when MOV
=> Machine_Overflows_On_Target
:= Result
;
810 when MRN
=> Machine_Rounds_On_Target
:= Result
;
811 when PAS
=> Preallocated_Stacks_On_Target
:= Result
;
812 when SAG
=> Support_Aggregates_On_Target
:= Result
;
813 when SAP
=> Support_Atomic_Primitives_On_Target
:= Result
;
814 when SCA
=> Support_Composite_Assign_On_Target
:= Result
;
815 when SCC
=> Support_Composite_Compare_On_Target
:= Result
;
816 when SCD
=> Stack_Check_Default_On_Target
:= Result
;
817 when SCL
=> Stack_Check_Limits_On_Target
:= Result
;
818 when SCP
=> Stack_Check_Probes_On_Target
:= Result
;
819 when SLS
=> Support_Long_Shifts_On_Target
:= Result
;
820 when SSL
=> Suppress_Standard_Library_On_Target
:= Result
;
821 when SNZ
=> Signed_Zeros_On_Target
:= Result
;
822 when UAM
=> Use_Ada_Main_Program_Name_On_Target
:= Result
;
823 when ZCX
=> ZCX_By_Default_On_Target
:= Result
;
825 goto Line_Loop_Continue
;
828 -- Here we are seeing a parameter we do not understand. We
829 -- simply ignore this (will happen when an old compiler is
830 -- used to compile a newer version of GNAT which does not
831 -- support the parameter).
833 end loop Config_Param_Loop
;
836 -- Here after processing one line of System spec
838 <<Line_Loop_Continue
>>
840 while P
< Source_Last
841 and then System_Text
(P
) /= CR
842 and then System_Text
(P
) /= LF
847 while P
< Source_Last
848 and then (System_Text
(P
) = CR
849 or else System_Text
(P
) = LF
)
854 if P
>= Source_Last
then
856 Write_Line
("fatal error, system.ads not formatted correctly");
857 Write_Line
("unexpected end of file");
859 raise Unrecoverable_Error
;
864 raise Unrecoverable_Error
;
866 end Get_Target_Parameters
;
868 ------------------------------
869 -- Set_Profile_Restrictions --
870 ------------------------------
872 procedure Set_Profile_Restrictions
(P
: Profile_Name
) is
873 R
: Restriction_Flags
renames Profile_Info
(P
).Set
;
874 V
: Restriction_Values
renames Profile_Info
(P
).Value
;
876 for J
in R
'Range loop
878 Restrictions_On_Target
.Set
(J
) := True;
880 if J
in All_Parameter_Restrictions
then
881 Restrictions_On_Target
.Value
(J
) := V
(J
);
885 end Set_Profile_Restrictions
;