Allow building a vaxfloat runtime by setting a target system.ads boolean, vice having a build directory gnat.adc configuration pragma and the attendant and repeated full runtime recompilation with gnatmake.
Tested on x86_64-pc-linux-gnu, committed on trunk 2013-04-25 Doug Rupp <r...@adacore.com> * targparm.adb (VXF{_Str}): New tag for vaxfloat. (Get_Target_Parameters): Handle VXF tag. * targparm.ads (VAX_Float_On_Target): New boolean. * system-vms-ia64.ads (VAX_Float): New boolean. * frontend.adb (Frontend): Handle VAX float boolean.
Index: frontend.adb =================================================================== --- frontend.adb (revision 198221) +++ frontend.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2013, 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- -- @@ -56,6 +56,7 @@ with Sem_SCIL; with Sem_Elab; use Sem_Elab; with Sem_Prag; use Sem_Prag; +with Sem_VFpt; use Sem_VFpt; with Sem_Warn; use Sem_Warn; with Sinfo; use Sinfo; with Sinput; use Sinput; @@ -181,6 +182,18 @@ Config_Pragmas := Empty_List; end if; + -- Check for VAX Float + + if Targparm.VAX_Float_On_Target then + -- pragma Float_Representation (VAX_Float); + Opt.Float_Format := 'V'; + + -- pragma Long_Float (G_Float); + Opt.Float_Format_Long := 'G'; + + Set_Standard_Fpt_Formats; + end if; + -- Now deal with specified config pragmas files if there are any if Opt.Config_File_Names /= null then Index: targparm.adb =================================================================== --- targparm.adb (revision 198221) +++ targparm.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2013, 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- -- @@ -68,6 +68,7 @@ SSL, -- Suppress_Standard_Library UAM, -- Use_Ada_Main_Program_Name VMS, -- OpenVMS + VXF, -- VAX Float ZCD); -- ZCX_By_Default Targparm_Flags : array (Targparm_Tags) of Boolean := (others => False); @@ -105,6 +106,7 @@ SSL_Str : aliased constant Source_Buffer := "Suppress_Standard_Library"; UAM_Str : aliased constant Source_Buffer := "Use_Ada_Main_Program_Name"; VMS_Str : aliased constant Source_Buffer := "OpenVMS"; + VXF_Str : aliased constant Source_Buffer := "VAX_Float"; ZCD_Str : aliased constant Source_Buffer := "ZCX_By_Default"; -- The following defines a set of pointers to the above strings, @@ -142,6 +144,7 @@ SSL_Str'Access, UAM_Str'Access, VMS_Str'Access, + VXF_Str'Access, ZCD_Str'Access); ----------------------- @@ -600,6 +603,7 @@ when SNZ => Signed_Zeros_On_Target := Result; when UAM => Use_Ada_Main_Program_Name_On_Target := Result; when VMS => OpenVMS_On_Target := Result; + when VXF => VAX_Float_On_Target := Result; when ZCD => ZCX_By_Default_On_Target := Result; goto Line_Loop_Continue; Index: targparm.ads =================================================================== --- targparm.ads (revision 198221) +++ targparm.ads (working copy) @@ -206,6 +206,9 @@ OpenVMS_On_Target : Boolean := False; -- Set to True if target is OpenVMS + VAX_Float_On_Target : Boolean := False; + -- Set to True if target float format is VAX Float + RTX_RTSS_Kernel_Module_On_Target : Boolean := False; -- Set to True if target is RTSS module for RTX Index: system-vms-ia64.ads =================================================================== --- system-vms-ia64.ads (revision 198221) +++ system-vms-ia64.ads (working copy) @@ -7,7 +7,7 @@ -- S p e c -- -- (OpenVMS 64bit Itanium GCC_ZCX DEC Threads Version) -- -- -- --- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -144,6 +144,7 @@ Machine_Overflows : constant Boolean := False; Machine_Rounds : constant Boolean := True; OpenVMS : constant Boolean := True; + VAX_Float : constant Boolean := False; Preallocated_Stacks : constant Boolean := False; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := True;