]>
Commit | Line | Data |
---|---|---|
336b436a JL |
1 | This is Info file gcc.info, produced by Makeinfo version 1.68 from the |
2 | input file gcc.texi. | |
3 | ||
4 | This file documents the use and the internals of the GNU compiler. | |
5 | ||
6 | Published by the Free Software Foundation 59 Temple Place - Suite 330 | |
7 | Boston, MA 02111-1307 USA | |
8 | ||
9 | Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997 Free | |
10 | Software Foundation, Inc. | |
11 | ||
12 | Permission is granted to make and distribute verbatim copies of this | |
13 | manual provided the copyright notice and this permission notice are | |
14 | preserved on all copies. | |
15 | ||
16 | Permission is granted to copy and distribute modified versions of | |
17 | this manual under the conditions for verbatim copying, provided also | |
18 | that the sections entitled "GNU General Public License," "Funding for | |
19 | Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are | |
20 | included exactly as in the original, and provided that the entire | |
21 | resulting derived work is distributed under the terms of a permission | |
22 | notice identical to this one. | |
23 | ||
24 | Permission is granted to copy and distribute translations of this | |
25 | manual into another language, under the above conditions for modified | |
26 | versions, except that the sections entitled "GNU General Public | |
27 | License," "Funding for Free Software," and "Protect Your Freedom--Fight | |
28 | `Look And Feel'", and this permission notice, may be included in | |
29 | translations approved by the Free Software Foundation instead of in the | |
30 | original English. | |
31 | ||
32 | \1f | |
33 | File: gcc.info, Node: Preprocessor Options, Next: Assembler Options, Prev: Optimize Options, Up: Invoking GCC | |
34 | ||
35 | Options Controlling the Preprocessor | |
36 | ==================================== | |
37 | ||
38 | These options control the C preprocessor, which is run on each C | |
39 | source file before actual compilation. | |
40 | ||
41 | If you use the `-E' option, nothing is done except preprocessing. | |
42 | Some of these options make sense only together with `-E' because they | |
43 | cause the preprocessor output to be unsuitable for actual compilation. | |
44 | ||
45 | `-include FILE' | |
46 | Process FILE as input before processing the regular input file. | |
47 | In effect, the contents of FILE are compiled first. Any `-D' and | |
48 | `-U' options on the command line are always processed before | |
49 | `-include FILE', regardless of the order in which they are | |
50 | written. All the `-include' and `-imacros' options are processed | |
51 | in the order in which they are written. | |
52 | ||
53 | `-imacros FILE' | |
54 | Process FILE as input, discarding the resulting output, before | |
55 | processing the regular input file. Because the output generated | |
56 | from FILE is discarded, the only effect of `-imacros FILE' is to | |
57 | make the macros defined in FILE available for use in the main | |
58 | input. | |
59 | ||
60 | Any `-D' and `-U' options on the command line are always processed | |
61 | before `-imacros FILE', regardless of the order in which they are | |
62 | written. All the `-include' and `-imacros' options are processed | |
63 | in the order in which they are written. | |
64 | ||
65 | `-idirafter DIR' | |
66 | Add the directory DIR to the second include path. The directories | |
67 | on the second include path are searched when a header file is not | |
68 | found in any of the directories in the main include path (the one | |
69 | that `-I' adds to). | |
70 | ||
71 | `-iprefix PREFIX' | |
72 | Specify PREFIX as the prefix for subsequent `-iwithprefix' options. | |
73 | ||
74 | `-iwithprefix DIR' | |
75 | Add a directory to the second include path. The directory's name | |
76 | is made by concatenating PREFIX and DIR, where PREFIX was | |
77 | specified previously with `-iprefix'. If you have not specified a | |
78 | prefix yet, the directory containing the installed passes of the | |
79 | compiler is used as the default. | |
80 | ||
81 | `-iwithprefixbefore DIR' | |
82 | Add a directory to the main include path. The directory's name is | |
83 | made by concatenating PREFIX and DIR, as in the case of | |
84 | `-iwithprefix'. | |
85 | ||
86 | `-isystem DIR' | |
87 | Add a directory to the beginning of the second include path, | |
88 | marking it as a system directory, so that it gets the same special | |
89 | treatment as is applied to the standard system directories. | |
90 | ||
91 | `-nostdinc' | |
92 | Do not search the standard system directories for header files. | |
93 | Only the directories you have specified with `-I' options (and the | |
94 | current directory, if appropriate) are searched. *Note Directory | |
95 | Options::, for information on `-I'. | |
96 | ||
97 | By using both `-nostdinc' and `-I-', you can limit the include-file | |
98 | search path to only those directories you specify explicitly. | |
99 | ||
100 | `-undef' | |
101 | Do not predefine any nonstandard macros. (Including architecture | |
102 | flags). | |
103 | ||
104 | `-E' | |
105 | Run only the C preprocessor. Preprocess all the C source files | |
106 | specified and output the results to standard output or to the | |
107 | specified output file. | |
108 | ||
109 | `-C' | |
110 | Tell the preprocessor not to discard comments. Used with the `-E' | |
111 | option. | |
112 | ||
113 | `-P' | |
114 | Tell the preprocessor not to generate `#line' directives. Used | |
115 | with the `-E' option. | |
116 | ||
117 | `-M' | |
118 | Tell the preprocessor to output a rule suitable for `make' | |
119 | describing the dependencies of each object file. For each source | |
120 | file, the preprocessor outputs one `make'-rule whose target is the | |
121 | object file name for that source file and whose dependencies are | |
122 | all the `#include' header files it uses. This rule may be a | |
123 | single line or may be continued with `\'-newline if it is long. | |
124 | The list of rules is printed on standard output instead of the | |
125 | preprocessed C program. | |
126 | ||
127 | `-M' implies `-E'. | |
128 | ||
129 | Another way to specify output of a `make' rule is by setting the | |
130 | environment variable `DEPENDENCIES_OUTPUT' (*note Environment | |
131 | Variables::.). | |
132 | ||
133 | `-MM' | |
134 | Like `-M' but the output mentions only the user header files | |
135 | included with `#include "FILE"'. System header files included | |
136 | with `#include <FILE>' are omitted. | |
137 | ||
138 | `-MD' | |
139 | Like `-M' but the dependency information is written to a file made | |
140 | by replacing ".c" with ".d" at the end of the input file names. | |
141 | This is in addition to compiling the file as specified--`-MD' does | |
142 | not inhibit ordinary compilation the way `-M' does. | |
143 | ||
144 | In Mach, you can use the utility `md' to merge multiple dependency | |
145 | files into a single dependency file suitable for using with the | |
146 | `make' command. | |
147 | ||
148 | `-MMD' | |
149 | Like `-MD' except mention only user header files, not system | |
150 | header files. | |
151 | ||
152 | `-MG' | |
153 | Treat missing header files as generated files and assume they live | |
154 | in the same directory as the source file. If you specify `-MG', | |
155 | you must also specify either `-M' or `-MM'. `-MG' is not | |
156 | supported with `-MD' or `-MMD'. | |
157 | ||
158 | `-H' | |
159 | Print the name of each header file used, in addition to other | |
160 | normal activities. | |
161 | ||
162 | `-AQUESTION(ANSWER)' | |
163 | Assert the answer ANSWER for QUESTION, in case it is tested with a | |
164 | preprocessing conditional such as `#if #QUESTION(ANSWER)'. `-A-' | |
165 | disables the standard assertions that normally describe the target | |
166 | machine. | |
167 | ||
168 | `-DMACRO' | |
169 | Define macro MACRO with the string `1' as its definition. | |
170 | ||
171 | `-DMACRO=DEFN' | |
172 | Define macro MACRO as DEFN. All instances of `-D' on the command | |
173 | line are processed before any `-U' options. | |
174 | ||
175 | `-UMACRO' | |
176 | Undefine macro MACRO. `-U' options are evaluated after all `-D' | |
177 | options, but before any `-include' and `-imacros' options. | |
178 | ||
179 | `-dM' | |
180 | Tell the preprocessor to output only a list of the macro | |
181 | definitions that are in effect at the end of preprocessing. Used | |
182 | with the `-E' option. | |
183 | ||
184 | `-dD' | |
185 | Tell the preprocessing to pass all macro definitions into the | |
186 | output, in their proper sequence in the rest of the output. | |
187 | ||
188 | `-dN' | |
189 | Like `-dD' except that the macro arguments and contents are | |
190 | omitted. Only `#define NAME' is included in the output. | |
191 | ||
192 | `-trigraphs' | |
193 | Support ANSI C trigraphs. The `-ansi' option also has this effect. | |
194 | ||
195 | `-Wp,OPTION' | |
196 | Pass OPTION as an option to the preprocessor. If OPTION contains | |
197 | commas, it is split into multiple options at the commas. | |
198 | ||
199 | \1f | |
200 | File: gcc.info, Node: Assembler Options, Next: Link Options, Prev: Preprocessor Options, Up: Invoking GCC | |
201 | ||
202 | Passing Options to the Assembler | |
203 | ================================ | |
204 | ||
205 | You can pass options to the assembler. | |
206 | ||
207 | `-Wa,OPTION' | |
208 | Pass OPTION as an option to the assembler. If OPTION contains | |
209 | commas, it is split into multiple options at the commas. | |
210 | ||
211 | \1f | |
212 | File: gcc.info, Node: Link Options, Next: Directory Options, Prev: Assembler Options, Up: Invoking GCC | |
213 | ||
214 | Options for Linking | |
215 | =================== | |
216 | ||
217 | These options come into play when the compiler links object files | |
218 | into an executable output file. They are meaningless if the compiler is | |
219 | not doing a link step. | |
220 | ||
221 | `OBJECT-FILE-NAME' | |
222 | A file name that does not end in a special recognized suffix is | |
223 | considered to name an object file or library. (Object files are | |
224 | distinguished from libraries by the linker according to the file | |
225 | contents.) If linking is done, these object files are used as | |
226 | input to the linker. | |
227 | ||
228 | `-c' | |
229 | `-S' | |
230 | `-E' | |
231 | If any of these options is used, then the linker is not run, and | |
232 | object file names should not be used as arguments. *Note Overall | |
233 | Options::. | |
234 | ||
235 | `-lLIBRARY' | |
236 | Search the library named LIBRARY when linking. | |
237 | ||
238 | It makes a difference where in the command you write this option; | |
239 | the linker searches processes libraries and object files in the | |
240 | order they are specified. Thus, `foo.o -lz bar.o' searches | |
241 | library `z' after file `foo.o' but before `bar.o'. If `bar.o' | |
242 | refers to functions in `z', those functions may not be loaded. | |
243 | ||
244 | The linker searches a standard list of directories for the library, | |
245 | which is actually a file named `libLIBRARY.a'. The linker then | |
246 | uses this file as if it had been specified precisely by name. | |
247 | ||
248 | The directories searched include several standard system | |
249 | directories plus any that you specify with `-L'. | |
250 | ||
251 | Normally the files found this way are library files--archive files | |
252 | whose members are object files. The linker handles an archive | |
253 | file by scanning through it for members which define symbols that | |
254 | have so far been referenced but not defined. But if the file that | |
255 | is found is an ordinary object file, it is linked in the usual | |
256 | fashion. The only difference between using an `-l' option and | |
257 | specifying a file name is that `-l' surrounds LIBRARY with `lib' | |
258 | and `.a' and searches several directories. | |
259 | ||
260 | `-lobjc' | |
261 | You need this special case of the `-l' option in order to link an | |
262 | Objective C program. | |
263 | ||
264 | `-nostartfiles' | |
265 | Do not use the standard system startup files when linking. The | |
266 | standard system libraries are used normally, unless `-nostdlib' or | |
267 | `-nodefaultlibs' is used. | |
268 | ||
269 | `-nodefaultlibs' | |
270 | Do not use the standard system libraries when linking. Only the | |
271 | libraries you specify will be passed to the linker. The standard | |
272 | startup files are used normally, unless `-nostartfiles' is used. | |
273 | ||
274 | `-nostdlib' | |
275 | Do not use the standard system startup files or libraries when | |
276 | linking. No startup files and only the libraries you specify will | |
277 | be passed to the linker. | |
278 | ||
279 | One of the standard libraries bypassed by `-nostdlib' and | |
280 | `-nodefaultlibs' is `libgcc.a', a library of internal subroutines | |
281 | that GNU CC uses to overcome shortcomings of particular machines, | |
282 | or special needs for some languages. (*Note Interfacing to GNU CC | |
283 | Output: Interface, for more discussion of `libgcc.a'.) In most | |
284 | cases, you need `libgcc.a' even when you want to avoid other | |
285 | standard libraries. In other words, when you specify `-nostdlib' | |
286 | or `-nodefaultlibs' you should usually specify `-lgcc' as well. | |
287 | This ensures that you have no unresolved references to internal | |
288 | GNU CC library subroutines. (For example, `__main', used to | |
289 | ensure C++ constructors will be called; *note `collect2': | |
290 | Collect2..) | |
291 | ||
292 | `-s' | |
293 | Remove all symbol table and relocation information from the | |
294 | executable. | |
295 | ||
296 | `-static' | |
297 | On systems that support dynamic linking, this prevents linking | |
298 | with the shared libraries. On other systems, this option has no | |
299 | effect. | |
300 | ||
301 | `-shared' | |
302 | Produce a shared object which can then be linked with other | |
303 | objects to form an executable. Not all systems support this | |
304 | option. You must also specify `-fpic' or `-fPIC' on some systems | |
305 | when you specify this option. | |
306 | ||
307 | `-symbolic' | |
308 | Bind references to global symbols when building a shared object. | |
309 | Warn about any unresolved references (unless overridden by the | |
310 | link editor option `-Xlinker -z -Xlinker defs'). Only a few | |
311 | systems support this option. | |
312 | ||
313 | `-Xlinker OPTION' | |
314 | Pass OPTION as an option to the linker. You can use this to | |
315 | supply system-specific linker options which GNU CC does not know | |
316 | how to recognize. | |
317 | ||
318 | If you want to pass an option that takes an argument, you must use | |
319 | `-Xlinker' twice, once for the option and once for the argument. | |
320 | For example, to pass `-assert definitions', you must write | |
321 | `-Xlinker -assert -Xlinker definitions'. It does not work to write | |
322 | `-Xlinker "-assert definitions"', because this passes the entire | |
323 | string as a single argument, which is not what the linker expects. | |
324 | ||
325 | `-Wl,OPTION' | |
326 | Pass OPTION as an option to the linker. If OPTION contains | |
327 | commas, it is split into multiple options at the commas. | |
328 | ||
329 | `-u SYMBOL' | |
330 | Pretend the symbol SYMBOL is undefined, to force linking of | |
331 | library modules to define it. You can use `-u' multiple times with | |
332 | different symbols to force loading of additional library modules. | |
333 | ||
334 | \1f | |
335 | File: gcc.info, Node: Directory Options, Next: Target Options, Prev: Link Options, Up: Invoking GCC | |
336 | ||
337 | Options for Directory Search | |
338 | ============================ | |
339 | ||
340 | These options specify directories to search for header files, for | |
341 | libraries and for parts of the compiler: | |
342 | ||
343 | `-IDIR' | |
344 | Add the directory DIR to the head of the list of directories to be | |
345 | searched for header files. This can be used to override a system | |
346 | header file, substituting your own version, since these | |
347 | directories are searched before the system header file | |
348 | directories. If you use more than one `-I' option, the | |
349 | directories are scanned in left-to-right order; the standard | |
350 | system directories come after. | |
351 | ||
352 | `-I-' | |
353 | Any directories you specify with `-I' options before the `-I-' | |
354 | option are searched only for the case of `#include "FILE"'; they | |
355 | are not searched for `#include <FILE>'. | |
356 | ||
357 | If additional directories are specified with `-I' options after | |
358 | the `-I-', these directories are searched for all `#include' | |
359 | directives. (Ordinarily *all* `-I' directories are used this way.) | |
360 | ||
361 | In addition, the `-I-' option inhibits the use of the current | |
362 | directory (where the current input file came from) as the first | |
363 | search directory for `#include "FILE"'. There is no way to | |
364 | override this effect of `-I-'. With `-I.' you can specify | |
365 | searching the directory which was current when the compiler was | |
366 | invoked. That is not exactly the same as what the preprocessor | |
367 | does by default, but it is often satisfactory. | |
368 | ||
369 | `-I-' does not inhibit the use of the standard system directories | |
370 | for header files. Thus, `-I-' and `-nostdinc' are independent. | |
371 | ||
372 | `-LDIR' | |
373 | Add directory DIR to the list of directories to be searched for | |
374 | `-l'. | |
375 | ||
376 | `-BPREFIX' | |
377 | This option specifies where to find the executables, libraries, | |
378 | include files, and data files of the compiler itself. | |
379 | ||
380 | The compiler driver program runs one or more of the subprograms | |
381 | `cpp', `cc1', `as' and `ld'. It tries PREFIX as a prefix for each | |
382 | program it tries to run, both with and without `MACHINE/VERSION/' | |
383 | (*note Target Options::.). | |
384 | ||
385 | For each subprogram to be run, the compiler driver first tries the | |
386 | `-B' prefix, if any. If that name is not found, or if `-B' was | |
387 | not specified, the driver tries two standard prefixes, which are | |
388 | `/usr/lib/gcc/' and `/usr/local/lib/gcc-lib/'. If neither of | |
389 | those results in a file name that is found, the unmodified program | |
390 | name is searched for using the directories specified in your | |
391 | `PATH' environment variable. | |
392 | ||
393 | `-B' prefixes that effectively specify directory names also apply | |
394 | to libraries in the linker, because the compiler translates these | |
395 | options into `-L' options for the linker. They also apply to | |
396 | includes files in the preprocessor, because the compiler | |
397 | translates these options into `-isystem' options for the | |
398 | preprocessor. In this case, the compiler appends `include' to the | |
399 | prefix. | |
400 | ||
401 | The run-time support file `libgcc.a' can also be searched for using | |
402 | the `-B' prefix, if needed. If it is not found there, the two | |
403 | standard prefixes above are tried, and that is all. The file is | |
404 | left out of the link if it is not found by those means. | |
405 | ||
406 | Another way to specify a prefix much like the `-B' prefix is to use | |
407 | the environment variable `GCC_EXEC_PREFIX'. *Note Environment | |
408 | Variables::. | |
409 | ||
410 | `-specs=FILE' | |
411 | Process FILE after the compiler reads in the standard `specs' | |
412 | file, in order to override the defaults that the `gcc' driver | |
413 | program uses when determining what switches to pass to `cc1', | |
414 | `cc1plus', `as', `ld', etc. More than one `-specs='FILE can be | |
415 | specified on the command line, and they are processed in order, | |
416 | from left to right. | |
417 | ||
418 | \1f | |
419 | File: gcc.info, Node: Target Options, Next: Submodel Options, Prev: Directory Options, Up: Invoking GCC | |
420 | ||
421 | Specifying Target Machine and Compiler Version | |
422 | ============================================== | |
423 | ||
424 | By default, GNU CC compiles code for the same type of machine that | |
425 | you are using. However, it can also be installed as a cross-compiler, | |
426 | to compile for some other type of machine. In fact, several different | |
427 | configurations of GNU CC, for different target machines, can be | |
428 | installed side by side. Then you specify which one to use with the | |
429 | `-b' option. | |
430 | ||
431 | In addition, older and newer versions of GNU CC can be installed side | |
432 | by side. One of them (probably the newest) will be the default, but | |
433 | you may sometimes wish to use another. | |
434 | ||
435 | `-b MACHINE' | |
436 | The argument MACHINE specifies the target machine for compilation. | |
437 | This is useful when you have installed GNU CC as a cross-compiler. | |
438 | ||
439 | The value to use for MACHINE is the same as was specified as the | |
440 | machine type when configuring GNU CC as a cross-compiler. For | |
441 | example, if a cross-compiler was configured with `configure | |
442 | i386v', meaning to compile for an 80386 running System V, then you | |
443 | would specify `-b i386v' to run that cross compiler. | |
444 | ||
445 | When you do not specify `-b', it normally means to compile for the | |
446 | same type of machine that you are using. | |
447 | ||
448 | `-V VERSION' | |
449 | The argument VERSION specifies which version of GNU CC to run. | |
450 | This is useful when multiple versions are installed. For example, | |
451 | VERSION might be `2.0', meaning to run GNU CC version 2.0. | |
452 | ||
453 | The default version, when you do not specify `-V', is the last | |
454 | version of GNU CC that you installed. | |
455 | ||
456 | The `-b' and `-V' options actually work by controlling part of the | |
457 | file name used for the executable files and libraries used for | |
458 | compilation. A given version of GNU CC, for a given target machine, is | |
459 | normally kept in the directory `/usr/local/lib/gcc-lib/MACHINE/VERSION'. | |
460 | ||
461 | Thus, sites can customize the effect of `-b' or `-V' either by | |
462 | changing the names of these directories or adding alternate names (or | |
463 | symbolic links). If in directory `/usr/local/lib/gcc-lib/' the file | |
464 | `80386' is a link to the file `i386v', then `-b 80386' becomes an alias | |
465 | for `-b i386v'. | |
466 | ||
467 | In one respect, the `-b' or `-V' do not completely change to a | |
468 | different compiler: the top-level driver program `gcc' that you | |
469 | originally invoked continues to run and invoke the other executables | |
470 | (preprocessor, compiler per se, assembler and linker) that do the real | |
471 | work. However, since no real work is done in the driver program, it | |
472 | usually does not matter that the driver program in use is not the one | |
473 | for the specified target and version. | |
474 | ||
475 | The only way that the driver program depends on the target machine is | |
476 | in the parsing and handling of special machine-specific options. | |
477 | However, this is controlled by a file which is found, along with the | |
478 | other executables, in the directory for the specified version and | |
479 | target machine. As a result, a single installed driver program adapts | |
480 | to any specified target machine and compiler version. | |
481 | ||
482 | The driver program executable does control one significant thing, | |
483 | however: the default version and target machine. Therefore, you can | |
484 | install different instances of the driver program, compiled for | |
485 | different targets or versions, under different names. | |
486 | ||
487 | For example, if the driver for version 2.0 is installed as `ogcc' | |
488 | and that for version 2.1 is installed as `gcc', then the command `gcc' | |
489 | will use version 2.1 by default, while `ogcc' will use 2.0 by default. | |
490 | However, you can choose either version with either command with the | |
491 | `-V' option. | |
492 | ||
493 | \1f | |
494 | File: gcc.info, Node: Submodel Options, Next: Code Gen Options, Prev: Target Options, Up: Invoking GCC | |
495 | ||
496 | Hardware Models and Configurations | |
497 | ================================== | |
498 | ||
499 | Earlier we discussed the standard option `-b' which chooses among | |
500 | different installed compilers for completely different target machines, | |
501 | such as Vax vs. 68000 vs. 80386. | |
502 | ||
503 | In addition, each of these target machine types can have its own | |
504 | special options, starting with `-m', to choose among various hardware | |
505 | models or configurations--for example, 68010 vs 68020, floating | |
506 | coprocessor or none. A single installed version of the compiler can | |
507 | compile for any model or configuration, according to the options | |
508 | specified. | |
509 | ||
510 | Some configurations of the compiler also support additional special | |
511 | options, usually for compatibility with other compilers on the same | |
512 | platform. | |
513 | ||
514 | These options are defined by the macro `TARGET_SWITCHES' in the | |
515 | machine description. The default for the options is also defined by | |
516 | that macro, which enables you to change the defaults. | |
517 | ||
518 | * Menu: | |
519 | ||
520 | * M680x0 Options:: | |
521 | * VAX Options:: | |
522 | * SPARC Options:: | |
523 | * Convex Options:: | |
524 | * AMD29K Options:: | |
525 | * ARM Options:: | |
526 | * M32R/D Options:: | |
527 | * M88K Options:: | |
528 | * RS/6000 and PowerPC Options:: | |
529 | * RT Options:: | |
530 | * MIPS Options:: | |
531 | * i386 Options:: | |
532 | * HPPA Options:: | |
533 | * Intel 960 Options:: | |
534 | * DEC Alpha Options:: | |
535 | * Clipper Options:: | |
536 | * H8/300 Options:: | |
537 | * SH Options:: | |
538 | * System V Options:: | |
539 | * V850 Options:: | |
540 | ||
541 | \1f | |
542 | File: gcc.info, Node: M680x0 Options, Next: VAX Options, Up: Submodel Options | |
543 | ||
544 | M680x0 Options | |
545 | -------------- | |
546 | ||
547 | These are the `-m' options defined for the 68000 series. The default | |
548 | values for these options depends on which style of 68000 was selected | |
549 | when the compiler was configured; the defaults for the most common | |
550 | choices are given below. | |
551 | ||
552 | `-m68000' | |
553 | `-mc68000' | |
554 | Generate output for a 68000. This is the default when the | |
555 | compiler is configured for 68000-based systems. | |
556 | ||
557 | `-m68020' | |
558 | `-mc68020' | |
559 | Generate output for a 68020. This is the default when the | |
560 | compiler is configured for 68020-based systems. | |
561 | ||
562 | `-m68881' | |
563 | Generate output containing 68881 instructions for floating point. | |
564 | This is the default for most 68020 systems unless `-nfp' was | |
565 | specified when the compiler was configured. | |
566 | ||
567 | `-m68030' | |
568 | Generate output for a 68030. This is the default when the | |
569 | compiler is configured for 68030-based systems. | |
570 | ||
571 | `-m68040' | |
572 | Generate output for a 68040. This is the default when the | |
573 | compiler is configured for 68040-based systems. | |
574 | ||
575 | This option inhibits the use of 68881/68882 instructions that have | |
576 | to be emulated by software on the 68040. If your 68040 does not | |
577 | have code to emulate those instructions, use `-m68040'. | |
578 | ||
579 | `-m68060' | |
580 | Generate output for a 68060. This is the default when the | |
581 | compiler is configured for 68060-based systems. | |
582 | ||
583 | This option inhibits the use of 68020 and 68881/68882 instructions | |
584 | that have to be emulated by software on the 68060. If your 68060 | |
585 | does not have code to emulate those instructions, use `-m68060'. | |
586 | ||
587 | `-m5200' | |
588 | Generate output for a 520X "coldfire" family cpu. This is the | |
589 | default when the compiler is configured for 520X-based systems. | |
590 | ||
591 | `-m68020-40' | |
592 | Generate output for a 68040, without using any of the new | |
593 | instructions. This results in code which can run relatively | |
594 | efficiently on either a 68020/68881 or a 68030 or a 68040. The | |
595 | generated code does use the 68881 instructions that are emulated | |
596 | on the 68040. | |
597 | ||
598 | `-m68020-60' | |
599 | Generate output for a 68060, without using any of the new | |
600 | instructions. This results in code which can run relatively | |
601 | efficiently on either a 68020/68881 or a 68030 or a 68040. The | |
602 | generated code does use the 68881 instructions that are emulated | |
603 | on the 68060. | |
604 | ||
605 | `-mfpa' | |
606 | Generate output containing Sun FPA instructions for floating point. | |
607 | ||
608 | `-msoft-float' | |
609 | Generate output containing library calls for floating point. | |
610 | *Warning:* the requisite libraries are not available for all m68k | |
611 | targets. Normally the facilities of the machine's usual C | |
612 | compiler are used, but this can't be done directly in | |
613 | cross-compilation. You must make your own arrangements to provide | |
614 | suitable library functions for cross-compilation. The embedded | |
615 | targets `m68k-*-aout' and `m68k-*-coff' do provide software | |
616 | floating point support. | |
617 | ||
618 | `-mshort' | |
619 | Consider type `int' to be 16 bits wide, like `short int'. | |
620 | ||
621 | `-mnobitfield' | |
622 | Do not use the bit-field instructions. The `-m68000' option | |
623 | implies `-mnobitfield'. | |
624 | ||
625 | `-mbitfield' | |
626 | Do use the bit-field instructions. The `-m68020' option implies | |
627 | `-mbitfield'. This is the default if you use a configuration | |
628 | designed for a 68020. | |
629 | ||
630 | `-mrtd' | |
631 | Use a different function-calling convention, in which functions | |
632 | that take a fixed number of arguments return with the `rtd' | |
633 | instruction, which pops their arguments while returning. This | |
634 | saves one instruction in the caller since there is no need to pop | |
635 | the arguments there. | |
636 | ||
637 | This calling convention is incompatible with the one normally used | |
638 | on Unix, so you cannot use it if you need to call libraries | |
639 | compiled with the Unix compiler. | |
640 | ||
641 | Also, you must provide function prototypes for all functions that | |
642 | take variable numbers of arguments (including `printf'); otherwise | |
643 | incorrect code will be generated for calls to those functions. | |
644 | ||
645 | In addition, seriously incorrect code will result if you call a | |
646 | function with too many arguments. (Normally, extra arguments are | |
647 | harmlessly ignored.) | |
648 | ||
649 | The `rtd' instruction is supported by the 68010, 68020, 68030, | |
650 | 68040, and 68060 processors, but not by the 68000 or 5200. | |
651 | ||
652 | `-malign-int' | |
653 | `-mno-align-int' | |
654 | Control whether GNU CC aligns `int', `long', `long long', `float', | |
655 | `double', and `long double' variables on a 32-bit boundary | |
656 | (`-malign-int') or a 16-bit boundary (`-mno-align-int'). Aligning | |
657 | variables on 32-bit boundaries produces code that runs somewhat | |
658 | faster on processors with 32-bit busses at the expense of more | |
659 | memory. | |
660 | ||
661 | *Warning:* if you use the `-malign-int' switch, GNU CC will align | |
662 | structures containing the above types differently than most | |
663 | published application binary interface specifications for the m68k. | |
664 | ||
665 | \1f | |
666 | File: gcc.info, Node: VAX Options, Next: SPARC Options, Prev: M680x0 Options, Up: Submodel Options | |
667 | ||
668 | VAX Options | |
669 | ----------- | |
670 | ||
671 | These `-m' options are defined for the Vax: | |
672 | ||
673 | `-munix' | |
674 | Do not output certain jump instructions (`aobleq' and so on) that | |
675 | the Unix assembler for the Vax cannot handle across long ranges. | |
676 | ||
677 | `-mgnu' | |
678 | Do output those jump instructions, on the assumption that you will | |
679 | assemble with the GNU assembler. | |
680 | ||
681 | `-mg' | |
682 | Output code for g-format floating point numbers instead of | |
683 | d-format. | |
684 | ||
685 | \1f | |
686 | File: gcc.info, Node: SPARC Options, Next: Convex Options, Prev: VAX Options, Up: Submodel Options | |
687 | ||
688 | SPARC Options | |
689 | ------------- | |
690 | ||
691 | These `-m' switches are supported on the SPARC: | |
692 | ||
693 | `-mno-app-regs' | |
694 | `-mapp-regs' | |
695 | Specify `-mapp-regs' to generate output using the global registers | |
696 | 2 through 4, which the SPARC SVR4 ABI reserves for applications. | |
697 | This is the default. | |
698 | ||
699 | To be fully SVR4 ABI compliant at the cost of some performance | |
700 | loss, specify `-mno-app-regs'. You should compile libraries and | |
701 | system software with this option. | |
702 | ||
703 | `-mfpu' | |
704 | `-mhard-float' | |
705 | Generate output containing floating point instructions. This is | |
706 | the default. | |
707 | ||
708 | `-mno-fpu' | |
709 | `-msoft-float' | |
710 | Generate output containing library calls for floating point. | |
711 | *Warning:* the requisite libraries are not available for all SPARC | |
712 | targets. Normally the facilities of the machine's usual C | |
713 | compiler are used, but this cannot be done directly in | |
714 | cross-compilation. You must make your own arrangements to provide | |
715 | suitable library functions for cross-compilation. The embedded | |
716 | targets `sparc-*-aout' and `sparclite-*-*' do provide software | |
717 | floating point support. | |
718 | ||
719 | `-msoft-float' changes the calling convention in the output file; | |
720 | therefore, it is only useful if you compile *all* of a program with | |
721 | this option. In particular, you need to compile `libgcc.a', the | |
722 | library that comes with GNU CC, with `-msoft-float' in order for | |
723 | this to work. | |
724 | ||
725 | `-mhard-quad-float' | |
726 | Generate output containing quad-word (long double) floating point | |
727 | instructions. | |
728 | ||
729 | `-msoft-quad-float' | |
730 | Generate output containing library calls for quad-word (long | |
731 | double) floating point instructions. The functions called are | |
732 | those specified in the SPARC ABI. This is the default. | |
733 | ||
734 | As of this writing, there are no sparc implementations that have | |
735 | hardware support for the quad-word floating point instructions. | |
736 | They all invoke a trap handler for one of these instructions, and | |
737 | then the trap handler emulates the effect of the instruction. | |
738 | Because of the trap handler overhead, this is much slower than | |
739 | calling the ABI library routines. Thus the `-msoft-quad-float' | |
740 | option is the default. | |
741 | ||
742 | `-mno-epilogue' | |
743 | `-mepilogue' | |
744 | With `-mepilogue' (the default), the compiler always emits code for | |
745 | function exit at the end of each function. Any function exit in | |
746 | the middle of the function (such as a return statement in C) will | |
747 | generate a jump to the exit code at the end of the function. | |
748 | ||
749 | With `-mno-epilogue', the compiler tries to emit exit code inline | |
750 | at every function exit. | |
751 | ||
752 | `-mno-flat' | |
753 | `-mflat' | |
754 | With `-mflat', the compiler does not generate save/restore | |
755 | instructions and will use a "flat" or single register window | |
756 | calling convention. This model uses %i7 as the frame pointer and | |
757 | is compatible with the normal register window model. Code from | |
758 | either may be intermixed. The local registers and the input | |
759 | registers (0-5) are still treated as "call saved" registers and | |
760 | will be saved on the stack as necessary. | |
761 | ||
762 | With `-mno-flat' (the default), the compiler emits save/restore | |
763 | instructions (except for leaf functions) and is the normal mode of | |
764 | operation. | |
765 | ||
766 | `-mno-unaligned-doubles' | |
767 | `-munaligned-doubles' | |
768 | Assume that doubles have 8 byte alignment. This is the default. | |
769 | ||
770 | With `-munaligned-doubles', GNU CC assumes that doubles have 8 byte | |
771 | alignment only if they are contained in another type, or if they | |
772 | have an absolute address. Otherwise, it assumes they have 4 byte | |
773 | alignment. Specifying this option avoids some rare compatibility | |
774 | problems with code generated by other compilers. It is not the | |
775 | default because it results in a performance loss, especially for | |
776 | floating point code. | |
777 | ||
778 | `-mv8' | |
779 | `-msparclite' | |
780 | These two options select variations on the SPARC architecture. | |
781 | ||
782 | By default (unless specifically configured for the Fujitsu | |
783 | SPARClite), GCC generates code for the v7 variant of the SPARC | |
784 | architecture. | |
785 | ||
786 | `-mv8' will give you SPARC v8 code. The only difference from v7 | |
787 | code is that the compiler emits the integer multiply and integer | |
788 | divide instructions which exist in SPARC v8 but not in SPARC v7. | |
789 | ||
790 | `-msparclite' will give you SPARClite code. This adds the integer | |
791 | multiply, integer divide step and scan (`ffs') instructions which | |
792 | exist in SPARClite but not in SPARC v7. | |
793 | ||
794 | These options are deprecated and will be deleted in GNU CC 2.9. | |
795 | They have been replaced with `-mcpu=xxx'. | |
796 | ||
797 | `-mcypress' | |
798 | `-msupersparc' | |
799 | These two options select the processor for which the code is | |
800 | optimised. | |
801 | ||
802 | With `-mcypress' (the default), the compiler optimizes code for the | |
803 | Cypress CY7C602 chip, as used in the SparcStation/SparcServer 3xx | |
804 | series. This is also appropriate for the older SparcStation 1, 2, | |
805 | IPX etc. | |
806 | ||
807 | With `-msupersparc' the compiler optimizes code for the SuperSparc | |
808 | cpu, as used in the SparcStation 10, 1000 and 2000 series. This | |
809 | flag also enables use of the full SPARC v8 instruction set. | |
810 | ||
811 | These options are deprecated and will be deleted in GNU CC 2.9. | |
812 | They have been replaced with `-mcpu=xxx'. | |
813 | ||
814 | `-mcpu=CPU_TYPE' | |
815 | Set architecture type and instruction scheduling parameters for | |
816 | machine type CPU_TYPE. Supported values for CPU_TYPE are `v7', | |
817 | `cypress', `v8', `supersparc', `sparclite', `f930', `f934', | |
818 | `sparclet', `tsc701', `v8plus', `v9', and `ultrasparc'. | |
819 | ||
820 | `-mtune=CPU_TYPE' | |
821 | Set the instruction scheduling parameters for machine type | |
822 | CPU_TYPE, but do not set the architecture type as the option | |
823 | `-mcpu='CPU_TYPE would. The same values for `-mcpu='CPU_TYPE are | |
824 | used for `-mtune='CPU_TYPE. | |
825 | ||
826 | `-malign-loops=NUM' | |
827 | Align loops to a 2 raised to a NUM byte boundary. If | |
828 | `-malign-loops' is not specified, the default is 2. | |
829 | ||
830 | `-malign-jumps=NUM' | |
831 | Align instructions that are only jumped to to a 2 raised to a NUM | |
832 | byte boundary. If `-malign-jumps' is not specified, the default | |
833 | is 2. | |
834 | ||
835 | `-malign-functions=NUM' | |
836 | Align the start of functions to a 2 raised to NUM byte boundary. | |
837 | If `-malign-functions' is not specified, the default is 2 if | |
838 | compiling for 32 bit sparc, and 5 if compiling for 64 bit sparc. | |
839 | ||
840 | These `-m' switches are supported in addition to the above on the | |
841 | SPARCLET processor. | |
842 | ||
843 | `-mlittle-endian' | |
844 | Generate code for a processor running in little-endian mode. | |
845 | ||
846 | `-mlive-g0' | |
847 | Treat register `%g0' as a normal register. GCC will continue to | |
848 | clobber it as necessary but will not assume it always reads as 0. | |
849 | ||
850 | `-mbroken-saverestore' | |
851 | Generate code that does not use non-trivial forms of the `save' and | |
852 | `restore' instructions. Early versions of the SPARCLET processor | |
853 | do not correctly handle `save' and `restore' instructions used with | |
854 | arguments. They correctly handle them used without arguments. A | |
855 | `save' instruction used without arguments increments the current | |
856 | window pointer but does not allocate a new stack frame. It is | |
857 | assumed that the window overflow trap handler will properly handle | |
858 | this case as will interrupt handlers. | |
859 | ||
860 | These `-m' switches are supported in addition to the above on SPARC | |
861 | V9 processors in 64 bit environments. | |
862 | ||
863 | `-mlittle-endian' | |
864 | Generate code for a processor running in little-endian mode. | |
865 | ||
866 | `-m32' | |
867 | `-m64' | |
868 | Generate code for a 32 bit or 64 bit environment. The 32 bit | |
869 | environment sets int, long and pointer to 32 bits. The 64 bit | |
870 | environment sets int to 32 bits and long and pointer to 64 bits. | |
871 | ||
872 | `-mcmodel=medlow' | |
873 | Generate code for the Medium/Low code model: the program must be | |
874 | linked in the low 32 bits of the address space. Pointers are 64 | |
875 | bits. Programs can be statically or dynamically linked. | |
876 | ||
877 | `-mcmodel=medmid' | |
878 | Generate code for the Medium/Middle code model: the program must | |
879 | be linked in the low 44 bits of the address space, the text | |
880 | segment must be less than 2G bytes, and data segment must be | |
881 | within 2G of the text segment. Pointers are 64 bits. | |
882 | ||
883 | `-mcmodel=medany' | |
884 | Generate code for the Medium/Anywhere code model: the program may | |
885 | be linked anywhere in the address space, the text segment must be | |
886 | less than 2G bytes, and data segment must be within 2G of the text | |
887 | segment. Pointers are 64 bits. | |
888 | ||
889 | `-mcmodel=embmedany' | |
890 | Generate code for the Medium/Anywhere code model for embedded | |
891 | systems: assume a 32 bit text and a 32 bit data segment, both | |
892 | starting anywhere (determined at link time). Register %g4 points | |
893 | to the base of the data segment. Pointers still 64 bits. | |
894 | Programs are statically linked, PIC is not supported. | |
895 | ||
896 | `-mstack-bias' | |
897 | `-mno-stack-bias' | |
898 | With `-mstack-bias', GNU CC assumes that the stack pointer, and | |
899 | frame pointer if present, are offset by -2047 which must be added | |
900 | back when making stack frame references. Otherwise, assume no | |
901 | such offset is present. | |
902 | ||
903 | \1f | |
904 | File: gcc.info, Node: Convex Options, Next: AMD29K Options, Prev: SPARC Options, Up: Submodel Options | |
905 | ||
906 | Convex Options | |
907 | -------------- | |
908 | ||
909 | These `-m' options are defined for Convex: | |
910 | ||
911 | `-mc1' | |
912 | Generate output for C1. The code will run on any Convex machine. | |
913 | The preprocessor symbol `__convex__c1__' is defined. | |
914 | ||
915 | `-mc2' | |
916 | Generate output for C2. Uses instructions not available on C1. | |
917 | Scheduling and other optimizations are chosen for max performance | |
918 | on C2. The preprocessor symbol `__convex_c2__' is defined. | |
919 | ||
920 | `-mc32' | |
921 | Generate output for C32xx. Uses instructions not available on C1. | |
922 | Scheduling and other optimizations are chosen for max performance | |
923 | on C32. The preprocessor symbol `__convex_c32__' is defined. | |
924 | ||
925 | `-mc34' | |
926 | Generate output for C34xx. Uses instructions not available on C1. | |
927 | Scheduling and other optimizations are chosen for max performance | |
928 | on C34. The preprocessor symbol `__convex_c34__' is defined. | |
929 | ||
930 | `-mc38' | |
931 | Generate output for C38xx. Uses instructions not available on C1. | |
932 | Scheduling and other optimizations are chosen for max performance | |
933 | on C38. The preprocessor symbol `__convex_c38__' is defined. | |
934 | ||
935 | `-margcount' | |
936 | Generate code which puts an argument count in the word preceding | |
937 | each argument list. This is compatible with regular CC, and a few | |
938 | programs may need the argument count word. GDB and other | |
939 | source-level debuggers do not need it; this info is in the symbol | |
940 | table. | |
941 | ||
942 | `-mnoargcount' | |
943 | Omit the argument count word. This is the default. | |
944 | ||
945 | `-mvolatile-cache' | |
946 | Allow volatile references to be cached. This is the default. | |
947 | ||
948 | `-mvolatile-nocache' | |
949 | Volatile references bypass the data cache, going all the way to | |
950 | memory. This is only needed for multi-processor code that does | |
951 | not use standard synchronization instructions. Making | |
952 | non-volatile references to volatile locations will not necessarily | |
953 | work. | |
954 | ||
955 | `-mlong32' | |
956 | Type long is 32 bits, the same as type int. This is the default. | |
957 | ||
958 | `-mlong64' | |
959 | Type long is 64 bits, the same as type long long. This option is | |
960 | useless, because no library support exists for it. | |
961 | ||
962 | \1f | |
963 | File: gcc.info, Node: AMD29K Options, Next: ARM Options, Prev: Convex Options, Up: Submodel Options | |
964 | ||
965 | AMD29K Options | |
966 | -------------- | |
967 | ||
968 | These `-m' options are defined for the AMD Am29000: | |
969 | ||
970 | `-mdw' | |
971 | Generate code that assumes the `DW' bit is set, i.e., that byte and | |
972 | halfword operations are directly supported by the hardware. This | |
973 | is the default. | |
974 | ||
975 | `-mndw' | |
976 | Generate code that assumes the `DW' bit is not set. | |
977 | ||
978 | `-mbw' | |
979 | Generate code that assumes the system supports byte and halfword | |
980 | write operations. This is the default. | |
981 | ||
982 | `-mnbw' | |
983 | Generate code that assumes the systems does not support byte and | |
984 | halfword write operations. `-mnbw' implies `-mndw'. | |
985 | ||
986 | `-msmall' | |
987 | Use a small memory model that assumes that all function addresses | |
988 | are either within a single 256 KB segment or at an absolute | |
989 | address of less than 256k. This allows the `call' instruction to | |
990 | be used instead of a `const', `consth', `calli' sequence. | |
991 | ||
992 | `-mnormal' | |
993 | Use the normal memory model: Generate `call' instructions only when | |
994 | calling functions in the same file and `calli' instructions | |
995 | otherwise. This works if each file occupies less than 256 KB but | |
996 | allows the entire executable to be larger than 256 KB. This is | |
997 | the default. | |
998 | ||
999 | `-mlarge' | |
1000 | Always use `calli' instructions. Specify this option if you expect | |
1001 | a single file to compile into more than 256 KB of code. | |
1002 | ||
1003 | `-m29050' | |
1004 | Generate code for the Am29050. | |
1005 | ||
1006 | `-m29000' | |
1007 | Generate code for the Am29000. This is the default. | |
1008 | ||
1009 | `-mkernel-registers' | |
1010 | Generate references to registers `gr64-gr95' instead of to | |
1011 | registers `gr96-gr127'. This option can be used when compiling | |
1012 | kernel code that wants a set of global registers disjoint from | |
1013 | that used by user-mode code. | |
1014 | ||
1015 | Note that when this option is used, register names in `-f' flags | |
1016 | must use the normal, user-mode, names. | |
1017 | ||
1018 | `-muser-registers' | |
1019 | Use the normal set of global registers, `gr96-gr127'. This is the | |
1020 | default. | |
1021 | ||
1022 | `-mstack-check' | |
1023 | `-mno-stack-check' | |
1024 | Insert (or do not insert) a call to `__msp_check' after each stack | |
1025 | adjustment. This is often used for kernel code. | |
1026 | ||
1027 | `-mstorem-bug' | |
1028 | `-mno-storem-bug' | |
1029 | `-mstorem-bug' handles 29k processors which cannot handle the | |
1030 | separation of a mtsrim insn and a storem instruction (most 29000 | |
1031 | chips to date, but not the 29050). | |
1032 | ||
1033 | `-mno-reuse-arg-regs' | |
1034 | `-mreuse-arg-regs' | |
1035 | `-mno-reuse-arg-regs' tells the compiler to only use incoming | |
1036 | argument registers for copying out arguments. This helps detect | |
1037 | calling a function with fewer arguments than it was declared with. | |
1038 | ||
1039 | `-mno-impure-text' | |
1040 | `-mimpure-text' | |
1041 | `-mimpure-text', used in addition to `-shared', tells the compiler | |
1042 | to not pass `-assert pure-text' to the linker when linking a | |
1043 | shared object. | |
1044 | ||
1045 | `-msoft-float' | |
1046 | Generate output containing library calls for floating point. | |
1047 | *Warning:* the requisite libraries are not part of GNU CC. | |
1048 | Normally the facilities of the machine's usual C compiler are | |
1049 | used, but this can't be done directly in cross-compilation. You | |
1050 | must make your own arrangements to provide suitable library | |
1051 | functions for cross-compilation. | |
1052 | ||
1053 | \1f | |
1054 | File: gcc.info, Node: ARM Options, Next: M32R/D Options, Prev: AMD29K Options, Up: Submodel Options | |
1055 | ||
1056 | ARM Options | |
1057 | ----------- | |
1058 | ||
1059 | These `-m' options are defined for Advanced RISC Machines (ARM) | |
1060 | architectures: | |
1061 | ||
1062 | `-mapcs-frame' | |
1063 | Generate a stack frame that is compliant with the ARM Procedure | |
1064 | Call Standard for all functions, even if this is not strictly | |
1065 | necessary for correct execution of the code. | |
1066 | ||
1067 | `-mapcs-26' | |
1068 | Generate code for a processor running with a 26-bit program | |
1069 | counter, and conforming to the function calling standards for the | |
1070 | APCS 26-bit option. This option replaces the `-m2' and `-m3' | |
1071 | options of previous releases of the compiler. | |
1072 | ||
1073 | `-mapcs-32' | |
1074 | Generate code for a processor running with a 32-bit program | |
1075 | counter, and conforming to the function calling standards for the | |
1076 | APCS 32-bit option. This option replaces the `-m6' option of | |
1077 | previous releases of the compiler. | |
1078 | ||
1079 | `-mhard-float' | |
1080 | Generate output containing floating point instructions. This is | |
1081 | the default. | |
1082 | ||
1083 | `-msoft-float' | |
1084 | Generate output containing library calls for floating point. | |
1085 | *Warning:* the requisite libraries are not available for all ARM | |
1086 | targets. Normally the facilities of the machine's usual C | |
1087 | compiler are used, but this cannot be done directly in | |
1088 | cross-compilation. You must make your own arrangements to provide | |
1089 | suitable library functions for cross-compilation. | |
1090 | ||
1091 | `-msoft-float' changes the calling convention in the output file; | |
1092 | therefore, it is only useful if you compile *all* of a program with | |
1093 | this option. In particular, you need to compile `libgcc.a', the | |
1094 | library that comes with GNU CC, with `-msoft-float' in order for | |
1095 | this to work. | |
1096 | ||
1097 | `-mlittle-endian' | |
1098 | Generate code for a processor running in little-endian mode. This | |
1099 | is the default for all standard configurations. | |
1100 | ||
1101 | `-mbig-endian' | |
1102 | Generate code for a processor running in big-endian mode; the | |
1103 | default is to compile code for a little-endian processor. | |
1104 | ||
1105 | `-mwords-little-endian' | |
1106 | This option only applies when generating code for big-endian | |
1107 | processors. Generate code for a little-endian word order but a | |
1108 | big-endian byte order. That is, a byte order of the form | |
1109 | `32107654'. Note: this option should only be used if you require | |
1110 | compatibility with code for big-endian ARM processors generated by | |
1111 | versions of the compiler prior to 2.8. | |
1112 | ||
1113 | `-mshort-load-bytes' | |
1114 | Do not try to load half-words (eg `short's) by loading a word from | |
1115 | an unaligned address. For some targets the MMU is configured to | |
1116 | trap unaligned loads; use this option to generate code that is | |
1117 | safe in these environments. | |
1118 | ||
1119 | `-mno-short-load-bytes' | |
1120 | Use unaligned word loads to load half-words (eg `short's). This | |
1121 | option produces more efficient code, but the MMU is sometimes | |
1122 | configured to trap these instructions. | |
1123 | ||
1124 | `-mbsd' | |
1125 | This option only applies to RISC iX. Emulate the native BSD-mode | |
1126 | compiler. This is the default if `-ansi' is not specified. | |
1127 | ||
1128 | `-mxopen' | |
1129 | This option only applies to RISC iX. Emulate the native | |
1130 | X/Open-mode compiler. | |
1131 | ||
1132 | `-mno-symrename' | |
1133 | This option only applies to RISC iX. Do not run the assembler | |
1134 | post-processor, `symrename', after code has been assembled. | |
1135 | Normally it is necessary to modify some of the standard symbols in | |
1136 | preparation for linking with the RISC iX C library; this option | |
1137 | suppresses this pass. The post-processor is never run when the | |
1138 | compiler is built for cross-compilation. | |
1139 | ||
1140 | \1f | |
1141 | File: gcc.info, Node: M32R/D Options, Next: M88K Options, Prev: ARM Options, Up: Submodel Options | |
1142 | ||
1143 | M32R/D Options | |
1144 | -------------- | |
1145 | ||
1146 | These `-m' options are defined for Mitsubishi M32R/D architectures: | |
1147 | ||
1148 | `-mcode-model=small' | |
1149 | Assume all objects live in the lower 16MB of memory (so that their | |
1150 | addresses can be loaded with the `ld24' instruction), and assume | |
1151 | all subroutines are reachable with the `bl' instruction. This is | |
1152 | the default. | |
1153 | ||
1154 | The addressability of a particular object can be set with the | |
1155 | `model' attribute. | |
1156 | ||
1157 | `-mcode-model=medium' | |
1158 | Assume objects may be anywhere in the 32 bit address space (the | |
1159 | compiler will generate `seth/add3' instructions to load their | |
1160 | addresses), and assume all subroutines are reachable with the `bl' | |
1161 | instruction. | |
1162 | ||
1163 | `-mcode-model=large' | |
1164 | Assume objects may be anywhere in the 32 bit address space (the | |
1165 | compiler will generate `seth/add3' instructions to load their | |
1166 | addresses), and assume subroutines may not be reachable with the | |
1167 | `bl' instruction (the compiler will generate the much slower | |
1168 | `seth/add3/jl' instruction sequence). | |
1169 | ||
1170 | `-msdata=none' | |
1171 | Disable use of the small data area. Variables will be put into | |
1172 | one of `.data', `bss', or `.rodata' (unless the `section' | |
1173 | attribute has been specified). This is the default. | |
1174 | ||
1175 | The small data area consists of sections `.sdata' and `.sbss'. | |
1176 | Objects may be explicitly put in the small data area with the | |
1177 | `section' attribute using one of these sections. | |
1178 | ||
1179 | `-msdata=sdata' | |
1180 | Put small global and static data in the small data area, but do not | |
1181 | generate special code to reference them. | |
1182 | ||
1183 | `-msdata=use' | |
1184 | Put small global and static data in the small data area, and | |
1185 | generate special instructions to reference them. | |
1186 | ||
1187 | `-G NUM' | |
1188 | Put global and static objects less than or equal to NUM bytes into | |
1189 | the small data or bss sections instead of the normal data or bss | |
1190 | sections. The default value of NUM is 8. The `-msdata' option | |
1191 | must be set to one of `sdata' or `use' for this option to have any | |
1192 | effect. | |
1193 | ||
1194 | All modules should be compiled with the same `-G NUM' value. | |
1195 | Compiling with different values of NUM may or may not work; if it | |
1196 | doesn't the linker will give an error message - incorrect code | |
1197 | will not be generated. | |
1198 |