-- --
-- S p e c --
-- --
--- Copyright (C) 1999-2005 Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2007, 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- --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
-- only item in this category is whether type Address is private.
with Rident; use Rident;
+with Namet; use Namet;
with Types; use Types;
package Targparm is
-- then the flag Opt.Address_Is_Private is set True, otherwise this flag
-- is set False.
- Restrictions_On_Target : Restrictions_Info;
+ Restrictions_On_Target : Restrictions_Info := No_Restrictions;
-- Records restrictions specified by system.ads. Only the Set and Value
-- members are modified. The Violated and Count fields are never modified.
-- Note that entries can be set either by a pragma Restrictions or by
-- The name should contain only letters A-Z, digits 1-9, spaces,
-- and underscores.
+ --------------------------
+ -- Executable Extension --
+ --------------------------
+
+ Executable_Extension_On_Target : Name_Id := No_Name;
+ -- Executable extension on the target. This name is useful for setting
+ -- the executable extension in a dynamic way, e.g. depending on the
+ -- run time used, rather than using a configure-time macro as done by
+ -- Get_Target_Executable_Suffix. If not set (No_Name), instead use
+ -- System.OS_Lib.Get_Target_Executable_Suffix.
+
-----------------------
-- Target Parameters --
-----------------------
-- text buffer containing the source of the system package.
-- The default values here are used if no value is found in system.ads.
- -- This should normally happen only if the special version of system.ads
- -- used by the compiler itself is in use. The default values are suitable
- -- for use by the compiler itself in normal environments. This approach
- -- allows the possibility of new versions of the compiler (possibly with
- -- new system parameters added) being used to compile older versions of
- -- the compiler sources. This is not guaranteed to work, but often will
- -- and by setting appropriate default values, we make it more likely that
- -- this can succeed.
-
- Compiler_System_Version : Boolean := True;
- -- This is set False in all target dependent versions of System. In the
- -- compiler default version, it is omitted entirely, meaning that the
- -- above default value of True will be set. If the flag is False, then
- -- the scanning circuits in the body of this package do an error check to
- -- ensure that all parameters other than this one are specified and not
- -- defaulted. If the parameter is set True, then this check is omitted,
- -- and any parameters not present in system.ads are left set to their
- -- default value as described above.
+ -- This should normally happen if the special version of system.ads used
+ -- by the compiler itself is in use or if the value is only relevant to
+ -- a particular target (e.g. OpenVMS, AAMP). The default values are
+ -- suitable for use in normal environments. This approach allows the
+ -- possibility of new versions of the compiler (possibly with new system
+ -- parameters added) being used to compile older versions of the compiler
+ -- sources, as well as avoiding duplicating values in all system-*.ads
+ -- files for flags that are used on a few platforms only.
----------------------------
-- Special Target Control --
OpenVMS_On_Target : Boolean := False;
-- Set to True if target is OpenVMS
+ type Virtual_Machine_Kind is (No_VM, JVM_Target, CLI_Target);
+ VM_Target : Virtual_Machine_Kind := No_VM;
+ -- Kind of virtual machine targetted
+
-------------------------------
-- Backend Arithmetic Checks --
-------------------------------
-- this variable is True, then GCC ZCX is used.
GCC_ZCX_Support_On_Target : Boolean := False;
- -- Indicates that the target supports GCC Exceptions.
+ -- Indicates that the target supports GCC Exceptions
------------------------------------
-- Run-Time Library Configuration --
-- Set to True for targets where S'Machine_Overflows is True
Signed_Zeros_On_Target : Boolean := True;
- -- Set to False on targets that do not reliably support signed zeros.
+ -- Set to False on targets that do not reliably support signed zeros
-------------------------------------------
-- Boolean-Valued Fixed-Point Attributes --
-- 2 ** (-(T'Object_Size - 1)) and whose values have an absolute
-- value less than 1.0.
- --------------------------------------------------------------
- -- Handling of Unconstrained Values Returned from Functions --
- --------------------------------------------------------------
-
- -- Functions that return variable length objects, notably unconstrained
- -- arrays are a special case, because there is no simple obvious way of
- -- implementing this feature. Furthermore, this capability is not present
- -- in C++ or C, so typically the system ABI does not handle this case.
-
- -- GNAT uses two different approaches
-
- -- The Secondary Stack
-
- -- The secondary stack is a special storage pool that is used for
- -- this purpose. The called function places the result on the
- -- secondary stack, and the caller uses or copies the value from
- -- the secondary stack, and pops the secondary stack after the
- -- value is consumed. The secondary stack is outside the system
- -- ABI, and the important point is that although generally it is
- -- handled in a stack like manner corresponding to the subprogram
- -- call structure, a return from a function does NOT pop the stack.
-
- -- DSP (Depressed Stack Pointer)
-
- -- Some targets permit the implementation of a function call/return
- -- protocol in which the function does not pop the main stack pointer
- -- on return, but rather returns with the stack pointer depressed.
- -- This is not generally permitted by any ABI, but for at least some
- -- targets, the implementation of alloca provides a model for this
- -- approach. If return-with-DSP is implemented, then functions that
- -- return variable length objects do it by returning with the stack
- -- pointer depressed, and the returned object is a pointer to the
- -- area within the stack frame of the called procedure that contains
- -- the returned value. The caller must then pop the main stack when
- -- this value is consumed.
-
- Functions_Return_By_DSP_On_Target : Boolean := False;
- -- Set to True if target permits functions to return with using the
- -- DSP (depressed stack pointer) approach.
-
-----------------
-- Data Layout --
-----------------