4
4
===================================================================
6
6
+++ b/src/gcc/d/lang-specs.h
8
+/* GDC -- D front-end for GCC
9
+ Copyright (C) 2004 David Friedman
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.
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.
8
+/* lang-specs.h -- D frontend for GCC.
9
+ Copyright (C) 2011, 2012 Free Software Foundation, Inc.
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
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
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/>.
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.... */
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 },
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 },
52
+{".d", "@d", 0, 1, 0 },
53
+{".D", "@d", 0, 1, 0 },
54
+{".di", "@d", 0, 1, 0 },
55
+{".DI", "@d", 0, 1, 0 },
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 },
36
+ "%{!E:cc1d %i %(cc1_options) %(cc1d) %I %{nostdinc*} %{+e*} %{I*} %{J*}\
37
+ %{M} %{MM} %{!fsyntax-only:%(invoke_as)}}", 0, 1, 0 },
61
39
Index: b/src/gcc/d/lang.opt
62
40
===================================================================
64
42
+++ b/src/gcc/d/lang.opt
66
44
+; GDC -- D front-end for GCC
67
+; Copyright (C) 2004 David Friedman
45
+; Copyright (C) 2011, 2012 Free Software Foundation, Inc.
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.
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
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/>.
91
+-I <dir> Add <dir> to the end of the main include path.
95
+-J <dir> Add <dir> to the end of the string import path.
99
+Allow use of deprecated features
66
+Debug library to use instead of phobos
70
+Default library to use instead of phobos
103
+Generate runtime code for assert()'s
107
+Compile release version
74
+Permit the use of the assert keyword
109
76
+; For D: defaults to on
112
79
+Generate code to check bounds before indexing arrays
82
+D Var(flag_no_builtin, 0)
83
+Recognize built-in functions
116
+Compile in unittest code
119
+D Joined RejectNegative
120
+-fversion=<level|ident> Compile in version code >= <level> or identified by <ident>
87
+Compile in debug code
123
90
+D Joined RejectNegative
124
91
+-fdebug,-fdebug=<level>,-fdebug=<ident> Compile in debug code, code <= level, or code identified by ident
128
+Compile in debug code
132
+With -g, generate C debug information for debugger compatibility
135
94
+D Joined RejectNegative
136
95
+-fdeps=<filename> Write module dependencies to filename
99
+Generate documentation
102
+D Joined RejectNegative
103
+-fdoc-dir=<docdir> Write documentation file to docdir directory
106
+D Joined RejectNegative
107
+-fdoc-file=<filename> Write documentation file to filename
110
+D Joined RejectNegative
111
+-fdoc-inc=<filename> Include a Ddoc macro file
115
+Dump decoded UTF-8 text and source from HTML
140
119
+Print information about D language processing to stdout
144
123
+List all variables going into thread local storage
148
+Compile as D language version 1
151
+D Joined RejectNegative
152
+-femit-templates=[normal|private|all|none|auto] Control template emission
156
127
+-femit-templates Emit templates code and data even if the linker cannot merge multiple copies
160
+Do not search standard system include directories
163
+D Joined RejectNegative
164
+Process all modules specified on the command line, but only generate code for the module specified by the argument.
166
129
+fignore-unknown-pragmas
168
131
+Ignore unsupported pragmas
172
+Enforce property syntax
135
+Generate runtime code for in() contracts
175
138
+Generate D interface files
182
145
+D Joined RejectNegative
183
146
+-fintfc-file=<filename> Write D interface file to <filename>
187
+Generate documentation
190
+D Joined RejectNegative
191
+-fdoc-dir=<docdir> Write documentation file to docdir directory
194
+D Joined RejectNegative
195
+-fdoc-file=<filename> Write documentation file to filename
198
+D Joined RejectNegative
199
+-fdoc-inc=<filename> Include a Ddoc macro file
202
+D Joined RejectNegative
203
+-fmultilib-dir=<dir> Select header multilib subdirectory
207
+Warn about signed-unsigned comparisons
211
+Dump decoded UTF-8 text and source from HTML
215
+Recognize the \"asm\" keyword
219
+Recognize built-in functions
223
+Make \"char\" unsigned by default (silently ignored in D)
227
+Make \"char\" signed by default (silently ignored in D)
150
+Generate runtime code for invariant()'s
153
+D Joined RejectNegative
154
+-fmake-deps=<file> Write dependency output to the given file
157
+D Joined RejectNegative
158
+Like -fmake-deps=<file> but ignore system modules
162
+Generate ModuleInfo struct for output module
165
+D Joined RejectNegative
166
+Process all modules specified on the command line, but only generate code for the module specified by the argument
170
+Generate runtime code for out() contracts
174
+Enforce property syntax
178
+Compile release version
180
+fsplit-dynamic-arrays
181
+D Var(flag_split_darrays)
182
+Split dynamic arrays into length and pointer when passing to functions
186
+Compile in unittest code
189
+D Joined RejectNegative
190
+-fversion=<level|ident> Compile in version code >= <level> or identified by <ident>
193
+D Joined RejectNegative
194
+-fXf=<filename> Write JSON file to <filename>
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
234
201
+D Joined Separate
242
209
+D Joined Separate
243
210
+-isystem <dir> Add <dir> to the start of the system include path
214
+-I <dir> Add <dir> to the end of the main include path
218
+-J<directory> Put MODULE files in 'directory'
222
+Do not link the standard D library in the compilation
226
+Do not search standard system include directories (those specified with -isystem will still be used)
230
+Link the standard D library statically in the compilation
247
+Enable most warning messages
234
+; Documented in c.opt
237
+D Warning Var(warn_cast_result)
238
+Warn about casts that will produce a null or nil result
242
+; Documented in c.opt
251
+Error out the compiler on warnings
254
+D Joined RejectNegative
255
+-fXf=<filename> Write JSON file to <filename>
258
+; Everything below this line is used in 4.6+
262
+Debug library to use instead of phobos
266
+Default library to use instead of phobos
270
+-fod=<directory> Specify the object output directory.
274
+Specify that the source file's parent directories should be appended to the object output directory.
281
Index: b/src/gcc/gcc.c
282
===================================================================
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 @@
301
+ obstack_grow (&obstack, "-fmultilib-dir=",
302
+ strlen ("-fmultilib-dir="));
303
+ obstack_grow (&obstack, multilib_dir,
304
+ strlen (multilib_dir));
308
/* Here we define characters other than letters and digits. */
246
+; Documented in common.opt
250
+; Documented in c.opt