File: gprconfig.patch

package info (click to toggle)
gprbuild 2011-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 10,396 kB
  • sloc: ada: 94,726; sh: 2,818; xml: 2,225; makefile: 471; ansic: 240; cpp: 89; fortran: 62; asm: 27
file content (346 lines) | stat: -rw-r--r-- 13,380 bytes parent folder | download
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
Subject: share/gprconfig/*.xml fixes for Debian
 .
 Patch all files in share/gprconfig/
 .
 Use gcc-4.6 explicitly, so gprbuild does not depend on which top-level
 gcc is installed.
 .
 We put gprbind and gprlib in /lib, not /libexec/gprbuild. We don't
 put them in /usr/lib/${DEB_HOST_MULTIARCH}, because the multiarch
 conventions do not yet address executables.
 .
 Patch the regular expressions that must match the version string
 output by 'gcc' to allow "Debian" in the string.
 .
 We don't change linker.xml and gnat.xml to find gprlib and gprbind in
 /usr/lib/${DEB_HOST_MULTIARCH}, because the multiarch conventions do
 not yet address executables.
 .
 Remove support for GCC 2.8 which is no longer available in Debian.
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Forwarded: not-needed

Index: b/share/gprconfig/asm.xml
===================================================================
--- a/share/gprconfig/asm.xml
+++ b/share/gprconfig/asm.xml
@@ -13,7 +13,7 @@
    end Naming;
 
    package Compiler is
-      for Driver            ("Asm_Cpp") use "${PATH(asm_cpp)}${PREFIX(asm_cpp)}gcc";
+      for Driver            ("Asm_Cpp") use "${PATH(asm_cpp)}${PREFIX(asm_cpp)}gcc-4.6";
       for Leading_Required_Switches ("Asm_Cpp") use
          Compiler'Leading_Required_Switches ("Asm_Cpp") &amp;
          ("-c", "-x", "assembler-with-cpp");
@@ -33,7 +33,7 @@
    end Naming;
 
    package Compiler is
-      for Driver            ("Asm") use "${PATH(asm)}${PREFIX(asm)}gcc";
+      for Driver            ("Asm") use "${PATH(asm)}${PREFIX(asm)}gcc-4.6";
       for Leading_Required_Switches ("Asm") use
         Compiler'Leading_Required_Switches ("Asm") &amp;
         ("-c", "-x", "assembler");
@@ -53,7 +53,7 @@
    end Naming;
 
    package Compiler is
-      for Driver            ("Asm2") use "${PATH(asm2)}${PREFIX(asm2)}gcc";
+      for Driver            ("Asm2") use "${PATH(asm2)}${PREFIX(asm2)}gcc-4.6";
       for Leading_Required_Switches ("Asm2") use
         Compiler'Leading_Required_Switches ("Asm2") &amp;
         ("-c", "-x", "assembler");
Index: b/share/gprconfig/c.xml
===================================================================
--- a/share/gprconfig/c.xml
+++ b/share/gprconfig/c.xml
@@ -23,7 +23,7 @@
      </compilers>
      <config>
    package Compiler is
-      for Driver              ("C") use "${PATH(c)}${PREFIX(c)}gcc";
+      for Driver              ("C") use "${PATH(c)}${PREFIX(c)}gcc-4.6";
    end Compiler;
      </config>
    </configuration>
Index: b/share/gprconfig/compilers.xml
===================================================================
--- a/share/gprconfig/compilers.xml
+++ b/share/gprconfig/compilers.xml
@@ -9,14 +9,14 @@
   <!--    GCC 3.x & 4.x -->
   <compiler_description>
     <name>GCC</name>
-    <executable prefix="1">(.*(-wrs-|-elf-|-eabispe-|avr-|-elinos-linux|-pc).*)?gcc</executable>
+    <executable prefix="1">(.*(-wrs-|-elf-|-eabispe-|avr-|-elinos-linux|-pc).*)?gcc-4.6</executable>
     <version>
-      <external>${PREFIX}gcc -v</external>
-      <grep regexp="^gcc \S+ (\S+)" group="1"></grep>
+      <external>${PREFIX}gcc-4.6 -dumpversion</external>
+      <grep regexp=".+"></grep>
     </version>
     <languages>C</languages>
     <target>
-      <external>${PREFIX}gcc -dumpmachine</external>
+      <external>${PREFIX}gcc-4.6 -dumpmachine</external>
       <grep regexp="[^\r\n]+"></grep>
     </target>
   </compiler_description>
@@ -135,26 +135,6 @@
     <target name="^.*-wrs-vxworksmils$" />
   </compiler_description>
 
-  <!--     GCC 2.8.1
-    There is no switch, in such versions, to find out the list of languages,
-    so we just assume there is only C.
-    C++ could be found by looking for the "g++" executable
-  -->
-  <compiler_description>
-    <name>GCC-28</name>
-    <executable>gcc</executable>
-    <version>
-      <external>gcc -v</external>
-      <grep regexp="^gcc \S+ (\S+)" group="1"></grep>
-      <must_match>2\.8\.</must_match>
-    </version>
-    <languages>C</languages>
-    <target>
-      <external>gcc -dumpmachine</external>
-      <grep regexp="[^\r\n]+"></grep>
-    </target>
-  </compiler_description>
-
   <!--    GNAAMP -->
   <compiler_description>
     <name>GNAAMP</name>
@@ -170,14 +150,14 @@
   <!--  G++ compilers, including recent CodeSourcery compilers  -->
   <compiler_description>
     <name>G++</name>
-    <executable>g\+\+</executable>
+    <executable>g\+\+-4\.6</executable>
     <version>
-      <external>g++ -v</external>
-      <grep regexp="^gcc \S+ (\S+)" group="1"></grep>
+      <external>g++-4.6 -dumpversion</external>
+      <grep regexp=".+"></grep>
     </version>
     <languages>C++</languages>
     <target>
-      <external>g++ -dumpmachine</external>
+      <external>g++-4.6 -dumpmachine</external>
       <grep regexp="[^\r\n]+"></grep>
     </target>
   </compiler_description>
@@ -296,23 +276,21 @@
   <!--  Assembler -->
   <compiler_description>
     <name>GCC-ASM</name>
-    <executable prefix="1">(.*(-wrs-|-elf-|-eabispe-|avr-|elinos-linux).*)?gcc</executable>
+    <executable prefix="1">(.*(-wrs-|-elf-|-eabispe-|avr-|elinos-linux).*)?gcc-4.6</executable>
     <version>
-      <external>${PREFIX}gcc -v</external>
-      <grep regexp="^gcc \S+ (\S+)" group="1"></grep>
+      <external>${PREFIX}gcc-4.6 -dumpversion</external>
+      <grep regexp=".+"></grep>
     </version>
     <languages>Asm,Asm_Cpp,Asm2</languages>
     <target>
-      <external>${PREFIX}gcc -dumpmachine</external>
+      <external>${PREFIX}gcc-4.6 -dumpmachine</external>
       <grep regexp="[^\r\n]+"></grep>
     </target>
   </compiler_description>
 
    <!--   GNAT
     To find the list of supported runtimes, we check the contents of
-    the directory. To be compatible with older versions of GNAT (3.16
-    for instance), we also accept lib/gcc-lib as the directory that
-    contains the runtime files.
+    the directory.
 
     Implementation note: we put two spaces after -adainclude $... in
     the external_tool, because on windows the path will end with a
@@ -326,17 +304,17 @@
       <grep regexp="^GNATLS.+?(\d+(\.\d+)?)" group="1"></grep>
     </version>
     <variable name="gcc_version">
-      <external>${PREFIX}gcc -v</external>
-      <grep regexp="^.*gcc \S+ (\S+)" group="1"></grep>
+      <external>${PREFIX}gcc-4.6 -dumpversion</external>
+      <grep regexp=".+"></grep>
     </variable>
     <languages>Ada</languages>
     <runtimes default="default,kernel">
-       <directory group="default" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/</directory>
-       <directory group="default" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/ada_source_path</directory>
-       <directory group="2" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/</directory>
+       <directory group="default" >\.\./lib/gcc/$TARGET/$gcc_version/adalib/</directory>
+       <directory group="default" >\.\./lib/gcc/$TARGET/$gcc_version/ada_source_path</directory>
+       <directory group="2" >\.\./lib/gcc/$TARGET/$gcc_version/rts-(.*)/adalib/</directory>
     </runtimes>
     <target>
-      <external>${PREFIX}gcc -dumpmachine</external>
+      <external>${PREFIX}gcc-4.6 -dumpmachine</external>
       <grep regexp="[^\r\n]+"></grep>
     </target>
   </compiler_description>
@@ -391,14 +369,14 @@
   <!--    mingw-cygwin compiler  -->
   <compiler_description>
     <name>GCC-CYGMING</name>
-    <executable>gcc</executable>
+    <executable prefix="1">(.*mingw32-)g\+\+</executable>
     <version>
-      <external>gcc --version</external>
+      <external>${PREFIX}gcc --version</external>
       <grep regexp="\(GCC\) (\S+).*\(cygming special\)" group="1"></grep>
     </version>
     <languages>C,C++,Fortran</languages>
     <target>
-      <external>gcc -mno-cygwin -dumpmachine</external>
+      <external>${PREFIX}gcc -mno-cygwin -dumpmachine</external>
       <grep regexp="[^\r\n]+"></grep>
     </target>
   </compiler_description>
Index: b/share/gprconfig/cpp.xml
===================================================================
--- a/share/gprconfig/cpp.xml
+++ b/share/gprconfig/cpp.xml
@@ -24,7 +24,7 @@
      </compilers>
      <config>
    package Compiler is
-      for Driver              ("C++") use "${PATH(c++)}g++${PREFIX(c++)}";
+      for Driver              ("C++") use "${PATH(c++)}g++-4.6${PREFIX(c++)}";
    end Compiler;
      </config>
    </configuration>
Index: b/share/gprconfig/fortran.xml
===================================================================
--- a/share/gprconfig/fortran.xml
+++ b/share/gprconfig/fortran.xml
@@ -50,7 +50,7 @@
    end Naming;
 
    package Compiler is
-      for Driver            ("Fortran") use "${PATH(fortran)}gfortran${PREFIX(fortran)}";
+      for Driver            ("Fortran") use "${PATH(fortran)}gfortran-4.6${PREFIX(fortran)}";
       for Leading_Required_Switches ("Fortran") use
          Compiler'Leading_Required_Switches ("Fortran") &amp;
          ("-c", "-fno-underscoring");
Index: b/share/gprconfig/gnat.xml
===================================================================
--- a/share/gprconfig/gnat.xml
+++ b/share/gprconfig/gnat.xml
@@ -52,7 +52,7 @@
           Binder'Required_Switches ("Ada")  &amp;
           ("-I-", "ada_binder=gnaampbind");
       for Driver         ("Ada") use
-          "${GPRCONFIG_PREFIX}/libexec/gprbuild/gprbind";
+          "${GPRCONFIG_PREFIX}/lib/gprbind";
    end Binder;
 
    for Toolchain_Version     ("Ada") use "GNAT ${VERSION(ada)}";
@@ -73,7 +73,7 @@
    end Naming;
 
    package Compiler is
-      for Driver                   ("Ada") use "${PATH(ada)}${PREFIX(ada)}gcc";
+      for Driver                   ("Ada") use "${PATH(ada)}${PREFIX(ada)}gcc-4.6";
       for Leading_Required_Switches        ("Ada") use
           Compiler'Leading_Required_Switches ("Ada")
 	     &amp; ("-c", "-x", "ada", "-gnatA");
@@ -89,7 +89,7 @@
       for Required_Switches     ("Ada") use
           Binder'Required_Switches ("Ada")  &amp; ("-I-");
       for Driver         ("Ada") use
-          "${GPRCONFIG_PREFIX}libexec/gprbuild/gprbind";
+          "${GPRCONFIG_PREFIX}lib/gprbind";
    end Binder;
 
    for Toolchain_Version     ("Ada") use "GNAT ${VERSION(ada)}";
Index: b/share/gprconfig/linker.xml
===================================================================
--- a/share/gprconfig/linker.xml
+++ b/share/gprconfig/linker.xml
@@ -242,7 +242,7 @@
     </targets>
     <config>
    for Library_Support  use "static_only";
-   for Library_Builder  use "${GPRCONFIG_PREFIX}libexec/gprbuild/gprlib";
+   for Library_Builder  use "${GPRCONFIG_PREFIX}lib/gprlib";
     </config>
   </configuration>
 
@@ -280,13 +280,13 @@
        <target name="^.*darwin.*$" />
     </targets>
     <config>
-   for Library_Builder use "${GPRCONFIG_PREFIX}libexec/gprbuild/gprlib";
+   for Library_Builder use "${GPRCONFIG_PREFIX}lib/gprlib";
    for Library_Support use "full";
    for Shared_Library_Prefix use "lib";
    for Symbolic_Link_Supported use "true";
    for Library_Major_Minor_Id_Supported use "true";
 
-   for Run_Path_Option  use ("-Wl,-rpath,");
+   for Run_Path_Option  use ();
    for Separate_Run_Path_Options use "true";
    for Run_Path_Origin use "@executable_path";
    for Library_Install_Name_Option use "-Wl,-install_name,@rpath";
@@ -309,7 +309,7 @@
        <target name="^.*hpux.*$" />
     </targets>
     <config>
-   for Library_Builder  use "${GPRCONFIG_PREFIX}libexec/gprbuild/gprlib";
+   for Library_Builder  use "${GPRCONFIG_PREFIX}lib/gprlib";
    for Library_Support  use "full";
    for Shared_Library_Prefix use "lib";
    for Symbolic_Link_Supported use "true";
@@ -348,7 +348,7 @@
        <target name="^.*irix.*$" />
     </targets>
     <config>
-   for Library_Builder  use "${GPRCONFIG_PREFIX}libexec/gprbuild/gprlib";
+   for Library_Builder  use "${GPRCONFIG_PREFIX}lib/gprlib";
    for Library_Support  use "full";
    for Shared_Library_Prefix use "lib";
    for Symbolic_Link_Supported use "true";
@@ -411,7 +411,7 @@
        <target name="^.*solaris.*$"/>
     </targets>
     <config>
-   for Library_Builder  use "${GPRCONFIG_PREFIX}libexec/gprbuild/gprlib";
+   for Library_Builder  use "${GPRCONFIG_PREFIX}lib/gprlib";
    for Library_Support  use "full";
    for Shared_Library_Prefix use "lib";
    for Symbolic_Link_Supported use "true";
@@ -434,7 +434,7 @@
       <target name="^.*mingw.*$" />
     </targets>
     <config>
-   for Library_Builder  use "${GPRCONFIG_PREFIX}libexec/gprbuild/gprlib";
+   for Library_Builder  use "${GPRCONFIG_PREFIX}lib/gprlib";
    for Library_Support  use "full";
    for Shared_Library_Prefix use "lib";
    for Symbolic_Link_Supported use "false";
@@ -457,7 +457,7 @@
        <target name="^.*osf.*$" />
     </targets>
     <config>
-   for Library_Builder  use "${GPRCONFIG_PREFIX}libexec/gprbuild/gprlib";
+   for Library_Builder  use "${GPRCONFIG_PREFIX}lib/gprlib";
    for Library_Support  use "full";
    for Shared_Library_Prefix use "lib";
    for Symbolic_Link_Supported use "true";
@@ -485,7 +485,7 @@
     </targets>
     <compilers><compiler name="GNAT" /></compilers>
     <config>
-   for Library_Builder  use "${GPRCONFIG_PREFIX}libexec/gprbuild/gprlib";
+   for Library_Builder  use "${GPRCONFIG_PREFIX}lib/gprlib";
    for Library_Support  use "full";
    for Shared_Library_Prefix use "lib";
    for Shared_Library_Suffix use ".exe";