<?xml version="1.0" ?>
<!DOCTYPE gprconfig [
<!ENTITY % env.ent SYSTEM "env.ent"> %env.ent;
<!ENTITY % shortcuts.ent SYSTEM "shortcuts.ent"> %shortcuts.ent;
<!ENTITY % vxworks.ent SYSTEM "vxworks.ent"> %vxworks.ent;
<!ENTITY % vx7.ent SYSTEM "vx7.ent"> %vx7.ent;
<!ENTITY % vx7r2.ent SYSTEM "vx7r2.ent"> %vx7r2.ent;

<!-- Local target-specific conditions -->

<!ENTITY this_target 'aarch64-wrs-vxworks7r2'>

<!ENTITY if_these_c_compilers
    '<compilers>
       <compiler name="^GCC_Pro$" />
       <compiler name="^LLVMC-AARCH64$" />
     </compilers>'>

<!ENTITY if_these_clang_c_compilers
    '<compilers>
       <compiler name="CLANG-C-VXWORKS-WITH-OPTIONAL-TOOL-PREFIX" language="C" />
       <compiler name="^CLANG-C-&this_target;$" />
     </compilers>'>

<!-- GNAT_LLVM_VXWORKS needed for compiling runtimes, where the toolchain
     is not yet prefixed the by target name. -->

<!ENTITY if_these_gnat_llvm_compilers
    '<compilers>
       <compiler name="^GNAT_LLVM-&this_target;$" />
       <compiler name="^GNAT_LLVM_VXWORKS$" />
     </compilers>'>

<!ENTITY if_these_cpp_compilers
    '<compilers>
       <compiler name="^G\+\+_Pro$" />
     </compilers>'>

<!ENTITY if_these_gnu_wrs_compilers
    '<compilers>
       <compiler name="^LLVMC-AARCH64$" />
     </compilers>'>

<!ENTITY this_wrs_rtp_base '0x80000000'>
]>

<!-- The environment entities must be called first to define and 
     initialize some variables used later. For example in
     "vx7r2_environment" the variable VxLink_Required_Switches
     is defined.

     ??? This configuration relies on the ordering that gprconfig picks
     to instantiate the config bits, and this is not a documented
     property.

     Note also entity "environment" may have this same problem, is
     widely used, and assumed to be processed first.

     We may eventually refactor these config bits to use macros for
     config contents instead. Something like:

     ENTITY config_llvm_common_vx7r2_switches
        <config>
           &config_content_where_variable_foo_is_defined;
           &config_content_where_variable_foo_is_used;
        </config>

     eng/gpr/gpr-issues#661 has been opened to investigate that option.  -->

<gprconfig>

  &environment;
  &vx7r2_environment;

  &configurations_vxworks_gpp;

  &configurations_vx7;

  &configurations_vx7r2_gnat_llvm;
  &configurations_vx7r2_clang;
  &configurations_vx7r2_clang_kernel;
  &configurations_vx7r2_clang_rtp;

  &configurations_gnat_ar;

  <!--
   __aarch64_swp1_acq is provided by libgcc, but we want to avoid that
   dependency since we don't want users to link with libgcc when using
   restricted runtimes (this would introduce issues with certification).
  -->

  <configuration>
    &if_ada;
    &if_restricted_rts;
    &if_this_target;

    <!-- vx7r2cert -->

   <config>
   package Compiler is
      for Leading_Required_Switches   ("Ada") use
        Compiler'Leading_Required_Switches ("Ada")
        &amp; ("-mno-outline-atomics");
   end Compiler;
   </config>
  </configuration>

  <configuration>
    &if_adacore_c;
    &if_restricted_rts;
    &if_this_target;

    <!-- vx7r2cert -->

   <config>
   package Compiler is
      for Leading_Required_Switches   ("C") use
        Compiler'Leading_Required_Switches ("C")
        &amp; ("-mno-outline-atomics");
   end Compiler;
   </config>
  </configuration>

  <configuration>
    &if_adacore_cpp;
    &if_restricted_rts;
    &if_this_target;

    <!-- vx7r2cert -->

   <config>
   package Compiler is
      for Leading_Required_Switches   ("C++") use
        Compiler'Leading_Required_Switches ("C++")
        &amp; ("-mno-outline-atomics");
   end Compiler;
   </config>
  </configuration>

</gprconfig>
