summaryrefslogtreecommitdiff
blob: 56c4f89691924408a94def056c4e23e82b16800f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" ?>
<gprconfig>
  <compiler_description>
    <name>GNAT-@VER@</name>
    <executable prefix="1">gnatls-@VER@</executable>
    <version>
      <external>${PREFIX}gnatls-@VER@ -v --version</external>
      <grep regexp="^GNATLS.+?(\d+(\.\d+)?)" group="1"></grep>
    </version>
    <languages>Ada</languages>
    <variable name="gcc_version">
      <external>${PREFIX}gcc-@VER@ -v</external>
      <grep regexp="^[-\w]*gcc \S+ (\S+)" group="1"></grep>
    </variable>
    <runtimes default="default,kernel,native">
       <directory group="default" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/</directory>
       <directory group="default" contents="^rts-">\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path</directory>
       <directory group="2" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/</directory>
       <directory group="1" >\.\./$TARGET/lib/gnat/(.*)/adalib/</directory>
    </runtimes>
    <target>
      <external>${PREFIX}gcc-@VER@ -dumpmachine</external>
      <grep regexp="[^\r\n]+"></grep>
    </target>
  </compiler_description>

  <configuration>
    <compilers>
      <compiler name="GNAT-@VER@" />
    </compilers>
   <config>
   package Compiler is
      for Driver                   ("Ada") use "${PATH(ada)}${PREFIX(ada)}gcc-@VER@";
      for Language_Kind            ("Ada") use "unit_based";
      for Dependency_Kind          ("Ada") use "ALI_File";
      for Leading_Required_Switches        ("Ada") use
	  ("-c", "-x", "ada", "-gnatA")
             &amp; Compiler'Leading_Required_Switches ("Ada");
      for Mapping_File_Switches    ("Ada") use ("-gnatem=");
      for Mapping_Spec_Suffix      ("Ada") use "%s";
      for Mapping_Body_Suffix      ("Ada") use "%b";
      for Config_File_Switches     ("Ada") use ("-gnatec=");
      for Include_Path_File     ("Ada") use "ADA_PRJ_INCLUDE_FILE";
      for Multi_Unit_Switches ("Ada") use ("-gnateI");
      for Multi_Unit_Object_Separator ("Ada") use "~";
      for Config_Body_File_Name ("Ada") use
           "pragma Source_File_Name_Project (%u, Body_File_Name => ""%f"");";
      for Config_Spec_File_Name ("Ada") use
           "pragma Source_File_Name_Project (%u, Spec_File_Name => ""%f"");";
      for Config_Body_File_Name_Index ("Ada") use
           "pragma Source_File_Name_Project (%u, Body_File_Name => ""%f"", Index => %i);";
      for Config_Spec_File_Name_Index ("Ada") use
           "pragma Source_File_Name_Project (%u, Spec_File_Name => ""%f"", Index => %i);";
      for Config_Body_File_Name_Pattern ("Ada") use
           "pragma Source_File_Name_Project " &amp;
           "  (Body_File_Name  => ""*%b""," &amp;
           "   Casing          => %c," &amp;
           "   Dot_Replacement => ""%d"");";
      for Config_Spec_File_Name_Pattern ("Ada") use
           "pragma Source_File_Name_Project " &amp;
           "  (Spec_File_Name  => ""*%s""," &amp;
           "   Casing          => %c," &amp;
           "   Dot_Replacement => ""%d"");";
      for Config_File_Unique    ("Ada") use "False";
      for PIC_Option      ("Ada") use ("-fPIC");
      for Leading_Required_Switches ("Ada") use
        Compiler'Leading_Required_Switches ("Ada") &amp; ("--RTS=${RUNTIME_DIR(ada)}");
      for Driver ("C") use "${PATH(c)}${PREFIX(c)}gcc-@VER@";
      for Leading_Required_Switches ("C") use
        ("-c", "-x", "c") &amp; Compiler'Leading_Required_Switches ("C");
      for Include_Switches_Via_Spec ("C") use ("cc1", "-I");
      for Max_Command_Line_Length use "8192";
      for Response_File_Format ("C") use "GCC_GNU";
      for Dependency_Switches ("C") use ("-MMD", "-MF", "");
      for PIC_Option ("C") use ("-fPIC");
   end Compiler;

   package Binder is
      for Objects_Path_File     ("Ada") use "ADA_PRJ_OBJECTS_FILE";
      for Driver         ("Ada") use
          "${GPRCONFIG_PREFIX}libexec/gprbuild/gprbind";
      for Switches ("Ada") use ("--gnatbind_path=gnatbind-@VER@");
      for Required_Switches ("Ada") use
        Binder'Required_Switches ("Ada") &amp; ("--RTS=${RUNTIME_DIR(ada)}");
   end Binder;

   for Toolchain_Version ("Ada") use "GNAT ${VERSION(ada)}";

for Runtime_Dir       ("Ada") use "${RUNTIME_DIR(ada)}";
   for Library_Encapsulated_Supported use "true";
   </config>
  </configuration>
</gprconfig>