~ubuntu-branches/ubuntu/trusty/gcc-snapshot/trusty

« back to all changes in this revision

Viewing changes to debian/patches/gcc-d-lang.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-05-12 14:56:42 UTC
  • mfrom: (1.20.14) (135.1.29 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130512145642-jkg0131tyv5io67o
Tags: 20130512-0ubuntu1
Snapshot, taken from the trunk (20130512)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
===================================================================
5
5
--- /dev/null
6
6
+++ b/src/gcc/d/lang-specs.h
7
 
@@ -0,0 +1,53 @@
8
 
+/* GDC -- D front-end for GCC
9
 
+   Copyright (C) 2004 David Friedman
10
 
+
11
 
+   This program is free software; you can redistribute it and/or modify
12
 
+   it under the terms of the GNU General Public License as published by
13
 
+   the Free Software Foundation; either version 2 of the License, or
14
 
+   (at your option) any later version.
15
 
+
16
 
+   This program is distributed in the hope that it will be useful,
17
 
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 
+   GNU General Public License for more details.
 
7
@@ -0,0 +1,31 @@
 
8
+/* lang-specs.h -- D frontend for GCC.
 
9
+   Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 
10
+
 
11
+   GCC is free software; you can redistribute it and/or modify it under
 
12
+   the terms of the GNU General Public License as published by the Free
 
13
+   Software Foundation; either version 3, or (at your option) any later
 
14
+   version.
 
15
+
 
16
+   GCC is distributed in the hope that it will be useful, but WITHOUT ANY
 
17
+   WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
18
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
19
+   for more details.
20
20
+
21
21
+   You should have received a copy of the GNU General Public License
22
 
+   along with this program; if not, write to the Free Software
23
 
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
22
+   along with GCC; see the file COPYING3.  If not see
 
23
+   <http://www.gnu.org/licenses/>.
24
24
+*/
25
25
+
26
 
+#ifndef D_D_SPEC
27
 
+#define D_D_SPEC 0
28
 
+#endif
29
 
+
30
26
+/* %{!M} probably doesn't make sense because we would need
31
27
+   to do that -- -MD and -MMD doesn't sound like a plan for D.... */
32
28
+
33
 
+/* %(d_options) ? */
34
 
+
35
 
+#if D_DRIVER_ONLY
36
 
+{".html", "@d", 0, 1, 0 },
37
 
+{".HTML", "@d", 0, 1, 0 },
38
 
+{".htm", "@d", 0, 1, 0 },
39
 
+{".HTM", "@d", 0, 1, 0 },
40
 
+{".xhtml", "@d", 0, 1, 0 },
41
 
+{".XHTML", "@d", 0, 1, 0 },
42
29
+{".d", "@d", 0, 1, 0 },
43
30
+{".D", "@d", 0, 1, 0 },
44
31
+{".dd", "@d", 0, 1, 0 },
46
33
+{".di", "@d", 0, 1, 0 },
47
34
+{".DI", "@d", 0, 1, 0 },
48
35
+{"@d",
49
 
+     "%{!E:cc1d %i %(cc1_options) %(cc1d) %I %N %{nostdinc*} %{+e*} %{I*} %{J*}\
50
 
+      %{M} %{MM} %{!fsyntax-only:%(invoke_as)}}", D_D_SPEC, 1, 0 },
51
 
+#else
52
 
+{".d", "@d", 0, 1, 0 },
53
 
+{".D", "@d", 0, 1, 0 },
54
 
+{".di", "@d", 0, 1, 0 },
55
 
+{".DI", "@d", 0, 1, 0 },
56
 
+{"@d",
57
 
+     "%{!E:cc1d %i %(cc1_options) %(cc1d) %I %N %{nostdinc*} %{+e*} %{I*} %{J*}\
58
 
+      %{M} %{MM} %{!fsyntax-only:%(invoke_as)}}", D_D_SPEC, 1, 0 },
59
 
+#endif
 
36
+  "%{!E:cc1d %i %(cc1_options) %(cc1d) %I %{nostdinc*} %{+e*} %{I*} %{J*}\
 
37
+    %{M} %{MM} %{!fsyntax-only:%(invoke_as)}}", 0, 1, 0 },
60
38
+
61
39
Index: b/src/gcc/d/lang.opt
62
40
===================================================================
63
41
--- /dev/null
64
42
+++ b/src/gcc/d/lang.opt
65
 
@@ -0,0 +1,215 @@
 
43
@@ -0,0 +1,208 @@
66
44
+; GDC -- D front-end for GCC
67
 
+; Copyright (C) 2004 David Friedman
 
45
+; Copyright (C) 2011, 2012 Free Software Foundation, Inc.
68
46
+;
69
47
+; This program is free software; you can redistribute it and/or modify
70
48
+; it under the terms of the GNU General Public License as published by
77
55
+; GNU General Public License for more details.
78
56
+;
79
57
+; You should have received a copy of the GNU General Public License
80
 
+; along with this program; if not, write to the Free Software
81
 
+; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
82
 
+
83
 
+; This is used in GCC 3.4+
84
 
+; %% TODO cleanup in ASCII collating order.
 
58
+; along with GCC; see the file COPYING3.  If not see
 
59
+; <http://www.gnu.org/licenses/>.
85
60
+
86
61
+Language
87
62
+D
88
63
+
89
 
+I
90
 
+D Joined Separate
91
 
+-I <dir>       Add <dir> to the end of the main include path.
92
 
+
93
 
+J
94
 
+D Joined Separate
95
 
+-J <dir>       Add <dir> to the end of the string import path.
96
 
+
97
 
+fdeprecated
98
 
+D
99
 
+Allow use of deprecated features
 
64
+debuglib=
 
65
+Driver Joined
 
66
+Debug library to use instead of phobos
 
67
+
 
68
+defaultlib=
 
69
+Driver Joined
 
70
+Default library to use instead of phobos
100
71
+
101
72
+fassert
102
73
+D
103
 
+Generate runtime code for assert()'s
104
 
+
105
 
+frelease
106
 
+D
107
 
+Compile release version
 
74
+Permit the use of the assert keyword
108
75
+
109
76
+; For D: defaults to on
110
77
+fbounds-check
111
78
+D
112
79
+Generate code to check bounds before indexing arrays
113
80
+
114
 
+funittest
 
81
+fbuiltin
 
82
+D Var(flag_no_builtin, 0)
 
83
+Recognize built-in functions
 
84
+
 
85
+fdebug
115
86
+D
116
 
+Compile in unittest code
117
 
+
118
 
+fversion=
119
 
+D Joined RejectNegative
120
 
+-fversion=<level|ident> Compile in version code >= <level> or identified by <ident>
 
87
+Compile in debug code
121
88
+
122
89
+fdebug=
123
90
+D Joined RejectNegative
124
91
+-fdebug,-fdebug=<level>,-fdebug=<ident> Compile in debug code, code <= level, or code identified by ident
125
92
+
126
 
+fdebug
127
 
+D
128
 
+Compile in debug code
129
 
+
130
 
+fdebug-c
131
 
+D
132
 
+With -g, generate C debug information for debugger compatibility
133
 
+
134
93
+fdeps=
135
94
+D Joined RejectNegative
136
95
+-fdeps=<filename> Write module dependencies to filename
137
96
+
 
97
+fdoc
 
98
+D
 
99
+Generate documentation
 
100
+
 
101
+fdoc-dir=
 
102
+D Joined RejectNegative
 
103
+-fdoc-dir=<docdir> Write documentation file to docdir directory
 
104
+
 
105
+fdoc-file=
 
106
+D Joined RejectNegative
 
107
+-fdoc-file=<filename> Write documentation file to filename
 
108
+
 
109
+fdoc-inc=
 
110
+D Joined RejectNegative
 
111
+-fdoc-inc=<filename> Include a Ddoc macro file
 
112
+
 
113
+fdump-source
 
114
+D RejectNegative
 
115
+Dump decoded UTF-8 text and source from HTML
 
116
+
138
117
+fd-verbose
139
118
+D
140
119
+Print information about D language processing to stdout
143
122
+D
144
123
+List all variables going into thread local storage
145
124
+
146
 
+fd-version=1
147
 
+D RejectNegative
148
 
+Compile as D language version 1
149
 
+
150
 
+femit-templates=
151
 
+D Joined RejectNegative
152
 
+-femit-templates=[normal|private|all|none|auto]        Control template emission
153
 
+
154
125
+femit-templates
155
126
+D
156
127
+-femit-templates Emit templates code and data even if the linker cannot merge multiple copies
157
128
+
158
 
+nostdinc
159
 
+D
160
 
+Do not search standard system include directories
161
 
+
162
 
+fonly=
163
 
+D Joined RejectNegative
164
 
+Process all modules specified on the command line, but only generate code for the module specified by the argument.
165
 
+
166
129
+fignore-unknown-pragmas
167
130
+D
168
131
+Ignore unsupported pragmas
169
132
+
170
 
+fproperty
 
133
+fin
171
134
+D
172
 
+Enforce property syntax
 
135
+Generate runtime code for in() contracts
173
136
+
174
137
+fintfc
175
138
+Generate D interface files
182
145
+D Joined RejectNegative
183
146
+-fintfc-file=<filename> Write D interface file to <filename>
184
147
+
185
 
+fdoc
186
 
+D
187
 
+Generate documentation
188
 
+
189
 
+fdoc-dir=
190
 
+D Joined RejectNegative
191
 
+-fdoc-dir=<docdir> Write documentation file to docdir directory
192
 
+
193
 
+fdoc-file=
194
 
+D Joined RejectNegative
195
 
+-fdoc-file=<filename> Write documentation file to filename
196
 
+
197
 
+fdoc-inc=
198
 
+D Joined RejectNegative
199
 
+-fdoc-inc=<filename> Include a Ddoc macro file
200
 
+
201
 
+fmultilib-dir=
202
 
+D Joined RejectNegative
203
 
+-fmultilib-dir=<dir> Select header multilib subdirectory
204
 
+
205
 
+Wsign-compare
206
 
+D
207
 
+Warn about signed-unsigned comparisons
208
 
+
209
 
+fdump-source
210
 
+D RejectNegative
211
 
+Dump decoded UTF-8 text and source from HTML
212
 
+
213
 
+fasm
214
 
+D
215
 
+Recognize the \"asm\" keyword
216
 
+
217
 
+fbuiltin
218
 
+D
219
 
+Recognize built-in functions
220
 
+
221
 
+funsigned-char
222
 
+D
223
 
+Make \"char\" unsigned by default (silently ignored in D)
224
 
+
225
 
+fsigned-char
226
 
+D
227
 
+Make \"char\" signed by default (silently ignored in D)
 
148
+finvariants
 
149
+D
 
150
+Generate runtime code for invariant()'s
 
151
+
 
152
+fmake-deps=
 
153
+D Joined RejectNegative
 
154
+-fmake-deps=<file> Write dependency output to the given file
 
155
+
 
156
+fmake-mdeps=
 
157
+D Joined RejectNegative
 
158
+Like -fmake-deps=<file> but ignore system modules
 
159
+
 
160
+femit-moduleinfo
 
161
+D
 
162
+Generate ModuleInfo struct for output module
 
163
+
 
164
+fonly=
 
165
+D Joined RejectNegative
 
166
+Process all modules specified on the command line, but only generate code for the module specified by the argument
 
167
+
 
168
+fout
 
169
+D
 
170
+Generate runtime code for out() contracts
 
171
+
 
172
+fproperty
 
173
+D
 
174
+Enforce property syntax
 
175
+
 
176
+frelease
 
177
+D
 
178
+Compile release version
 
179
+
 
180
+fsplit-dynamic-arrays
 
181
+D Var(flag_split_darrays)
 
182
+Split dynamic arrays into length and pointer when passing to functions
 
183
+
 
184
+funittest
 
185
+D
 
186
+Compile in unittest code
 
187
+
 
188
+fversion=
 
189
+D Joined RejectNegative
 
190
+-fversion=<level|ident> Compile in version code >= <level> or identified by <ident>
 
191
+
 
192
+fXf=
 
193
+D Joined RejectNegative
 
194
+-fXf=<filename> Write JSON file to <filename>
228
195
+
229
196
+imultilib
230
197
+D Joined Separate
231
 
+-imultilib <dir> Set <dir> to be the multilib include subdirectory
 
198
+-imultilib <dir>       Set <dir> to be the multilib include subdirectory
232
199
+
233
200
+iprefix
234
201
+D Joined Separate
242
209
+D Joined Separate
243
210
+-isystem <dir> Add <dir> to the start of the system include path
244
211
+
 
212
+I
 
213
+D Joined Separate
 
214
+-I <dir>       Add <dir> to the end of the main include path
 
215
+
 
216
+J
 
217
+D Joined Separate
 
218
+-J<directory>  Put MODULE files in 'directory'
 
219
+
 
220
+nophoboslib
 
221
+Driver
 
222
+Do not link the standard D library in the compilation
 
223
+
 
224
+nostdinc
 
225
+D
 
226
+Do not search standard system include directories (those specified with -isystem will still be used)
 
227
+
 
228
+static-libphobos
 
229
+Driver
 
230
+Link the standard D library statically in the compilation
 
231
+
245
232
+Wall
246
233
+D
247
 
+Enable most warning messages
 
234
+; Documented in c.opt
 
235
+
 
236
+Wcast-result
 
237
+D Warning Var(warn_cast_result)
 
238
+Warn about casts that will produce a null or nil result
 
239
+
 
240
+Wdeprecated
 
241
+D
 
242
+; Documented in c.opt
248
243
+
249
244
+Werror
250
245
+D
251
 
+Error out the compiler on warnings
252
 
+
253
 
+fXf=
254
 
+D Joined RejectNegative
255
 
+-fXf=<filename> Write JSON file to <filename>
256
 
+
257
 
+
258
 
+; Everything below this line is used in 4.6+
259
 
+
260
 
+debuglib=
261
 
+Driver Joined
262
 
+Debug library to use instead of phobos
263
 
+
264
 
+defaultlib=
265
 
+Driver Joined
266
 
+Default library to use instead of phobos
267
 
+
268
 
+fod=
269
 
+Driver Joined
270
 
+-fod=<directory> Specify the object output directory.
271
 
+
272
 
+fop
273
 
+Driver
274
 
+Specify that the source file's parent directories should be appended to the object output directory.
275
 
+
276
 
+nophoboslib
277
 
+Driver
278
 
+
279
 
+static_libphobos
280
 
+Driver
281
 
Index: b/src/gcc/gcc.c
282
 
===================================================================
283
 
--- a/src/gcc/gcc.c
284
 
+++ b/src/gcc/gcc.c
285
 
@@ -376,6 +376,7 @@
286
 
        assembler has done its job.
287
 
  %D    Dump out a -L option for each directory in startfile_prefixes.
288
 
        If multilib_dir is set, extra entries are generated with it affixed.
289
 
+ %N    Output the currently selected multilib directory name.
290
 
  %l     process LINK_SPEC as a spec.
291
 
  %L     process LIB_SPEC as a spec.
292
 
  %M     Output multilib_os_dir.
293
 
@@ -5217,6 +5218,17 @@
294
 
              return value;
295
 
            break;
296
 
 
297
 
+          case 'N':
298
 
+           if (multilib_dir)
299
 
+             {
300
 
+               arg_going = 1;
301
 
+               obstack_grow (&obstack, "-fmultilib-dir=",
302
 
+                             strlen ("-fmultilib-dir="));
303
 
+               obstack_grow (&obstack, multilib_dir,
304
 
+                             strlen (multilib_dir));
305
 
+             }
306
 
+           break;
307
 
+
308
 
            /* Here we define characters other than letters and digits.  */
309
 
 
310
 
          case '{':
 
246
+; Documented in common.opt
 
247
+
 
248
+Wunknown-pragmas
 
249
+D
 
250
+; Documented in c.opt
 
251
+