summaryrefslogtreecommitdiff
path: root/gcc/ada/targparm.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/targparm.adb')
-rw-r--r--gcc/ada/targparm.adb82
1 files changed, 41 insertions, 41 deletions
diff --git a/gcc/ada/targparm.adb b/gcc/ada/targparm.adb
index 9447471007c..afbb50a5a39 100644
--- a/gcc/ada/targparm.adb
+++ b/gcc/ada/targparm.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2005 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- --
@@ -44,7 +44,8 @@ package body Targparm is
BDC, -- Backend_Divide_Checks
BOC, -- Backend_Overflow_Checks
CLA, -- Command_Line_Args
- CRT, -- Configurable_Run_Time
+ CRT, -- Configurable_Run_Times
+ CSV, -- Compiler_System_Version
D32, -- Duration_32_Bits
DEN, -- Denorm
DSP, -- Functions_Return_By_DSP
@@ -67,12 +68,7 @@ package body Targparm is
VMS, -- OpenVMS
ZCD, -- ZCX_By_Default
ZCG, -- GCC_ZCX_Support
- ZCF, -- Front_End_ZCX_Support
-
- -- The following entries are obsolete and can eventually be removed
-
- HIM, -- High_Integrity_Mode
- LSI); -- Long_Shifts_Inlined
+ ZCF); -- Front_End_ZCX_Support
subtype Targparm_Tags_OK is Targparm_Tags range AAM .. ZCF;
-- Range excluding obsolete entries
@@ -87,6 +83,7 @@ package body Targparm is
BOC_Str : aliased constant Source_Buffer := "Backend_Overflow_Checks";
CLA_Str : aliased constant Source_Buffer := "Command_Line_Args";
CRT_Str : aliased constant Source_Buffer := "Configurable_Run_Time";
+ CSV_Str : aliased constant Source_Buffer := "Compiler_System_Version";
D32_Str : aliased constant Source_Buffer := "Duration_32_Bits";
DEN_Str : aliased constant Source_Buffer := "Denorm";
DSP_Str : aliased constant Source_Buffer := "Functions_Return_By_DSP";
@@ -111,11 +108,6 @@ package body Targparm is
ZCG_Str : aliased constant Source_Buffer := "GCC_ZCX_Support";
ZCF_Str : aliased constant Source_Buffer := "Front_End_ZCX_Support";
- -- Obsolete entries
-
- HIM_Str : aliased constant Source_Buffer := "High_Integrity_Mode";
- LSI_Str : aliased constant Source_Buffer := "Long_Shifts_Inlined";
-
-- The following defines a set of pointers to the above strings,
-- indexed by the tag values.
@@ -126,6 +118,7 @@ package body Targparm is
BOC_Str'Access,
CLA_Str'Access,
CRT_Str'Access,
+ CSV_Str'Access,
D32_Str'Access,
DEN_Str'Access,
DSP_Str'Access,
@@ -148,12 +141,7 @@ package body Targparm is
VMS_Str'Access,
ZCD_Str'Access,
ZCG_Str'Access,
- ZCF_Str'Access,
-
- -- Obsolete entries
-
- HIM_Str'Access,
- LSI_Str'Access);
+ ZCF_Str'Access);
-----------------------
-- Local Subprograms --
@@ -237,6 +225,8 @@ package body Targparm is
Parameters_Obtained := True;
end if;
+ Opt.Address_Is_Private := False;
+
P := Source_First;
Line_Loop : while System_Text (P .. P + 10) /= "end System;" loop
@@ -245,6 +235,13 @@ package body Targparm is
if System_Text (P) = '-' then
goto Line_Loop_Continue;
+ -- Test for type Address is private
+
+ elsif System_Text (P .. P + 26) = " type Address is private;" then
+ Opt.Address_Is_Private := True;
+ P := P + 26;
+ goto Line_Loop_Continue;
+
-- Test for pragma Profile (Ravenscar);
elsif System_Text (P .. P + 26) =
@@ -252,7 +249,7 @@ package body Targparm is
then
Set_Profile_Restrictions (Ravenscar);
Opt.Task_Dispatching_Policy := 'F';
- Opt.Locking_Policy := 'C';
+ Opt.Locking_Policy := 'C';
P := P + 27;
goto Line_Loop_Continue;
@@ -513,7 +510,6 @@ package body Targparm is
then
P := P + 3 + Targparm_Str (K)'Length;
-
if Targparm_Flags (K) then
Set_Standard_Error;
Write_Line
@@ -552,6 +548,7 @@ package body Targparm is
when BOC => Backend_Overflow_Checks_On_Target := Result;
when CLA => Command_Line_Args_On_Target := Result;
when CRT => Configurable_Run_Time_On_Target := Result;
+ when CSV => Compiler_System_Version := Result;
when D32 => Duration_32_Bits_On_Target := Result;
when DEN => Denorm_On_Target := Result;
when DSP => Functions_Return_By_DSP_On_Target := Result;
@@ -576,13 +573,13 @@ package body Targparm is
when ZCG => GCC_ZCX_Support_On_Target := Result;
when ZCF => Front_End_ZCX_Support_On_Target := Result;
- -- Obsolete entries
-
- when HIM => null;
- when LSI => null;
-
goto Line_Loop_Continue;
end case;
+
+ -- Here we are seeing a parameter we do not understand. We
+ -- simply ignore this (will happen when an old compiler is
+ -- used to compile a newer version of GNAT which does not
+ -- support the
end if;
end loop Config_Param_Loop;
end if;
@@ -610,24 +607,27 @@ package body Targparm is
end if;
end loop Line_Loop;
- -- Check no missing target parameter settings
+ -- Check no missing target parameter settings (skip for compiler vsn)
- for K in Targparm_Tags_OK loop
- if not Targparm_Flags (K) then
- Set_Standard_Error;
- Write_Line
- ("fatal error: system.ads is incorrectly formatted");
- Write_Str ("missing line for parameter: ");
+ if not Compiler_System_Version then
+ for K in Targparm_Tags_OK loop
+ if not Targparm_Flags (K) then
+ Set_Standard_Error;
+ Write_Line
+ ("fatal error: system.ads is incorrectly formatted");
+ Write_Str ("missing line for parameter: ");
- for J in Targparm_Str (K)'Range loop
- Write_Char (Targparm_Str (K).all (J));
- end loop;
+ for J in Targparm_Str (K)'Range loop
+ Write_Char (Targparm_Str (K).all (J));
+ end loop;
+
+ Write_Eol;
+ Set_Standard_Output;
+ Fatal := True;
+ end if;
+ end loop;
+ end if;
- Write_Eol;
- Set_Standard_Output;
- Fatal := True;
- end if;
- end loop;
if Fatal then
raise Unrecoverable_Error;