|
|
1.1.1.7 ! root 1: .\" Copyright (c) 1991, 1992, 1993, 1994 Free Software Foundation -*-Text-*- 1.1 root 2: .\" See section COPYING for conditions for redistribution 1.1.1.6 root 3: .\" 4: .\" Set up \*(lq, \*(rq if -man hasn't already set it up. 5: .if @@\*(lq@ \{\ 6: . ds lq " 7: . if t .ds lq `` 8: . if !@@\(lq@ .ds lq "\(lq 9: .\} 10: .if @@\*(rq@ \{\ 11: . ds rq " 12: . if t .ds rq '' 13: . if !@@\(rq@ .ds rq "\(rq 14: .\} 15: .de Id 16: .ds Rv \\$3 17: .ds Dt \\$4 1.1 root 18: .. 1.1.1.6 root 19: .de Sp 20: .if n .sp 21: .if t .sp 0.4 22: .. 23: .Id $Id: gcc.1,v 1.4 1993/10/13 23:19:12 pesch Exp $ 24: .TH GCC 1 "\*(Dt" "GNU Tools" "GNU Tools" 1.1 root 25: .SH NAME 1.1.1.7 ! root 26: gcc, g++ \- GNU project C and C++ Compiler (v2.6) 1.1 root 27: .SH SYNOPSIS 1.1.1.6 root 28: .B gcc 29: .RI "[ " option " | " filename " ].\|.\|." 1.1 root 30: .br 1.1.1.6 root 31: .B g++ 32: .RI "[ " option " | " filename " ].\|.\|." 1.1 root 33: .SH WARNING 34: The information in this man page is an extract from the full 35: documentation of the GNU C compiler, and is limited to the meaning of 1.1.1.6 root 36: the options. 37: .PP 38: This man page is not kept up to date except when volunteers want to 39: maintain it. If you find a discrepancy between the man page and the 40: software, please check the Info file, which is the authoritative 41: documentation. 42: .PP 43: If we find that the things in this man page that are out of date cause 44: significant confusion or complaints, we will stop distributing the man 45: page. The alternative, updating the man page when we update the Info 46: file, is impossible because the rest of the work of maintaining GNU CC 47: leaves us no time for that. The GNU project regards man pages as 48: obsolete and should not let them take time away from other things. 49: .PP 1.1.1.4 root 50: For complete and current documentation, refer to the Info file `\|\c 1.1 root 51: .B gcc\c 52: \&\|' or the manual 1.1.1.6 root 53: .I 1.1 root 54: Using and Porting GNU CC (for version 2.0)\c 55: \&. Both are made from the Texinfo source file 56: .BR gcc.texinfo . 57: .SH DESCRIPTION 58: The C and C++ compilers are integrated. Both process input files 59: through one or more of four stages: preprocessing, compilation, 60: assembly, and linking. Source filename suffixes identify the source 61: language, but which name you use for the compiler governs default 62: assumptions: 63: .TP 64: .B gcc 65: assumes preprocessed (\c 66: .B .i\c 67: \&) files are C and assumes C style linking. 68: .TP 69: .B g++ 70: assumes preprocessed (\c 71: .B .i\c 72: \&) files are C++ and assumes C++ style linking. 1.1.1.6 root 73: .PP 1.1 root 74: Suffixes of source file names indicate the language and kind of 75: processing to be done: 1.1.1.6 root 76: .Sp 77: .nf 78: .ta \w'\fB.cxx\fP 'u 79: \&\fB.c\fP C source; preprocess, compile, assemble 80: \&\fB.C\fP C++ source; preprocess, compile, assemble 81: \&\fB.cc\fP C++ source; preprocess, compile, assemble 82: \&\fB.cxx\fP C++ source; preprocess, compile, assemble 83: \&\fB.m\fP Objective-C source; preprocess, compile, assemble 84: \&\fB.i\fP preprocessed C; compile, assemble 85: \&\fB.ii\fP preprocessed C++; compile, assemble 86: \&\fB.s\fP Assembler source; assemble 87: \&\fB.S\fP Assembler source; preprocess, assemble 88: \&\fB.h\fP Preprocessor file; not usually named on command line 89: .Sp 90: .fi 91: Files with other suffixes are passed to the linker. Common cases include: 92: .Sp 93: .nf 94: \&\fB.o\fP Object file 95: \&\fB.a\fP Archive file 96: .br 97: .fi 98: .Sp 99: Linking is always the last stage unless you use one of the 1.1 root 100: .BR \-c , 101: .BR \-S , 1.1.1.6 root 102: or 103: .B \-E 1.1 root 104: options to avoid it (or unless compilation errors stop the whole 1.1.1.6 root 105: process). For the link stage, all 1.1 root 106: .B .o 107: files corresponding to source files, 1.1.1.6 root 108: .B \-l 109: libraries, unrecognized filenames (including named 1.1 root 110: .B .o 1.1.1.6 root 111: object files and 112: .B .a 1.1 root 113: archives) 114: are passed to the linker in command-line order. 115: .SH OPTIONS 116: Options must be separate: `\|\c 117: .B \-dr\c 118: \&\|' is quite different from `\|\c 119: .B \-d \-r 1.1.1.6 root 120: \&\|'. 121: .PP 1.1 root 122: Most `\|\c 123: .B \-f\c 124: \&\|' and `\|\c 125: .B \-W\c 1.1.1.6 root 126: \&\|' options have two contrary forms: 1.1 root 127: .BI \-f name 128: and 129: .BI \-fno\- name\c 1.1.1.6 root 130: \& (or 1.1 root 131: .BI \-W name 132: and 133: .BI \-Wno\- name\c 1.1.1.6 root 134: \&). Only the non-default forms are shown here. 135: .PP 1.1 root 136: Here is a summary of all the options, grouped by type. Explanations are 137: in the following sections. 138: .hy 0 139: .na 140: .TP 141: .B Overall Options 142: .br 143: \-c 144: \-S 145: \-E 146: .RI "\-o " file 147: \-pipe 148: \-v 149: .RI "\-x " language 150: .TP 151: .B Language Options 152: \-ansi 153: \-fall\-virtual 154: \-fcond\-mismatch 155: \-fdollars\-in\-identifiers 156: \-fenum\-int\-equiv 1.1.1.6 root 157: \-fexternal\-templates 1.1 root 158: \-fno\-asm 159: \-fno\-builtin 160: \-fno\-strict\-prototype 161: \-fsigned\-bitfields 162: \-fsigned\-char 163: \-fthis\-is\-variable 164: \-funsigned\-bitfields 165: \-funsigned\-char 166: \-fwritable\-strings 167: \-traditional 168: \-traditional\-cpp 169: \-trigraphs 170: .TP 171: .B Warning Options 172: \-fsyntax\-only 173: \-pedantic 174: \-pedantic\-errors 175: \-w 176: \-W 177: \-Wall 178: \-Waggregate\-return 179: \-Wcast\-align 180: \-Wcast\-qual 1.1.1.5 root 181: \-Wchar\-subscript 1.1 root 182: \-Wcomment 183: \-Wconversion 184: \-Wenum\-clash 185: \-Werror 186: \-Wformat 187: .RI \-Wid\-clash\- len 188: \-Wimplicit 1.1.1.2 root 189: \-Winline 1.1 root 190: \-Wmissing\-prototypes 1.1.1.7 ! root 191: \-Wmissing\-declarations 1.1.1.5 root 192: \-Wnested\-externs 193: \-Wno\-import 1.1.1.2 root 194: \-Wparentheses 1.1 root 195: \-Wpointer\-arith 1.1.1.5 root 196: \-Wredundant\-decls 1.1 root 197: \-Wreturn\-type 198: \-Wshadow 199: \-Wstrict\-prototypes 200: \-Wswitch 1.1.1.5 root 201: \-Wtemplate\-debugging 1.1 root 202: \-Wtraditional 203: \-Wtrigraphs 204: \-Wuninitialized 205: \-Wunused 206: \-Wwrite\-strings 207: .TP 208: .B Debugging Options 209: \-a 210: .RI \-d letters 211: \-fpretend\-float 212: \-g 1.1.1.5 root 213: .RI \-g level 214: \-gcoff 215: \-gxcoff 216: \-gxcoff+ 1.1 root 217: \-gdwarf 1.1.1.5 root 218: \-gdwarf+ 219: \-gstabs 220: \-gstabs+ 1.1 root 221: \-ggdb 222: \-p 223: \-pg 224: \-save\-temps 1.1.1.7 ! root 225: .RI \-print\-file\-name= library 1.1.1.5 root 226: \-print\-libgcc\-file\-name 1.1.1.7 ! root 227: .RI \-print\-prog\-name= program 1.1 root 228: .TP 229: .B Optimization Options 230: \-fcaller\-saves 231: \-fcse\-follow\-jumps 1.1.1.5 root 232: \-fcse\-skip\-blocks 1.1 root 233: \-fdelayed\-branch 234: \-felide\-constructors 235: \-fexpensive\-optimizations 1.1.1.6 root 236: \-ffast\-math 1.1 root 237: \-ffloat\-store 238: \-fforce\-addr 239: \-fforce\-mem 240: \-finline\-functions 241: \-fkeep\-inline\-functions 242: \-fmemoize\-lookups 243: \-fno\-default\-inline 244: \-fno\-defer\-pop 245: \-fno\-function\-cse 1.1.1.5 root 246: \-fno\-inline 247: \-fno\-peephole 1.1 root 248: \-fomit\-frame\-pointer 249: \-frerun\-cse\-after\-loop 250: \-fschedule\-insns 251: \-fschedule\-insns2 252: \-fstrength\-reduce 253: \-fthread\-jumps 254: \-funroll\-all\-loops 255: \-funroll\-loops 256: \-O 257: \-O2 258: .TP 259: .B Preprocessor Options 1.1.1.5 root 260: .RI \-A assertion 1.1 root 261: \-C 262: \-dD 263: \-dM 264: \-dN 265: .RI \-D macro [\|= defn \|] 266: \-E 267: \-H 1.1.1.5 root 268: .RI "\-idirafter " dir 269: .RI "\-include " file 270: .RI "\-imacros " file 271: .RI "\-iprefix " file 272: .RI "\-iwithprefix " dir 1.1 root 273: \-M 274: \-MD 275: \-MM 276: \-MMD 277: \-nostdinc 278: \-P 279: .RI \-U macro 280: \-undef 281: .TP 1.1.1.5 root 282: .B Assembler Option 283: .RI \-Wa, option 284: .TP 1.1 root 285: .B Linker Options 286: .RI \-l library 1.1.1.5 root 287: \-nostartfiles 1.1 root 288: \-nostdlib 289: \-static 1.1.1.5 root 290: \-shared 291: \-symbolic 292: .RI "\-Xlinker\ " option 293: .RI \-Wl, option 294: .RI "\-u " symbol 1.1 root 295: .TP 296: .B Directory Options 297: .RI \-B prefix 298: .RI \-I dir 299: \-I\- 300: .RI \-L dir 301: .TP 302: .B Target Options 303: .RI "\-b " machine 304: .RI "\-V " version 305: .TP 1.1.1.5 root 306: .B Configuration Dependent Options 1.1 root 307: .I M680x0\ Options 308: .br 309: \-m68000 310: \-m68020 1.1.1.5 root 311: \-m68020\-40 312: \-m68030 313: \-m68040 1.1 root 314: \-m68881 315: \-mbitfield 316: \-mc68000 317: \-mc68020 318: \-mfpa 319: \-mnobitfield 320: \-mrtd 321: \-mshort 322: \-msoft\-float 1.1.1.6 root 323: .Sp 1.1 root 324: .I VAX Options 325: .br 326: \-mg 327: \-mgnu 328: \-munix 1.1.1.6 root 329: .Sp 1.1 root 330: .I SPARC Options 331: .br 1.1.1.5 root 332: \-mepilogue 1.1 root 333: \-mfpu 1.1.1.5 root 334: \-mhard\-float 335: \-mno\-fpu 1.1 root 336: \-mno\-epilogue 1.1.1.5 root 337: \-msoft\-float 338: \-msparclite 339: \-mv8 1.1.1.7 ! root 340: \-msupersparc ! 341: \-mcypress 1.1.1.6 root 342: .Sp 1.1 root 343: .I Convex Options 344: .br 345: \-margcount 346: \-mc1 347: \-mc2 348: \-mnoargcount 1.1.1.6 root 349: .Sp 1.1 root 350: .I AMD29K Options 351: .br 352: \-m29000 353: \-m29050 354: \-mbw 355: \-mdw 356: \-mkernel\-registers 357: \-mlarge 358: \-mnbw 359: \-mnodw 360: \-msmall 361: \-mstack\-check 362: \-muser\-registers 1.1.1.6 root 363: .Sp 1.1 root 364: .I M88K Options 365: .br 1.1.1.5 root 366: \-m88000 367: \-m88100 368: \-m88110 1.1 root 369: \-mbig\-pic 370: \-mcheck\-zero\-division 371: \-mhandle\-large\-shift 372: \-midentify\-revision 373: \-mno\-check\-zero\-division 374: \-mno\-ocs\-debug\-info 375: \-mno\-ocs\-frame\-position 376: \-mno\-optimize\-arg\-area 1.1.1.5 root 377: \-mno\-seriazlize\-volatile 1.1 root 378: \-mno\-underscores 379: \-mocs\-debug\-info 380: \-mocs\-frame\-position 381: \-moptimize\-arg\-area 1.1.1.5 root 382: \-mserialize\-volatile 1.1 root 383: .RI \-mshort\-data\- num 384: \-msvr3 385: \-msvr4 386: \-mtrap\-large\-shift 387: \-muse\-div\-instruction 388: \-mversion\-03.00 389: \-mwarn\-passed\-structs 1.1.1.6 root 390: .Sp 1.1 root 391: .I RS6000 Options 392: .br 393: \-mfp\-in\-toc 394: \-mno\-fop\-in\-toc 1.1.1.6 root 395: .Sp 1.1 root 396: .I RT Options 397: .br 398: \-mcall\-lib\-mul 399: \-mfp\-arg\-in\-fpregs 400: \-mfp\-arg\-in\-gregs 401: \-mfull\-fp\-blocks 402: \-mhc\-struct\-return 403: \-min\-line\-mul 404: \-mminimum\-fp\-blocks 405: \-mnohc\-struct\-return 1.1.1.6 root 406: .Sp 1.1 root 407: .I MIPS Options 408: .br 409: \-mcpu=\fIcpu type\fP 410: \-mips2 411: \-mips3 412: \-mint64 413: \-mlong64 414: \-mlonglong128 415: \-mmips\-as 416: \-mgas 417: \-mrnames 418: \-mno\-rnames 419: \-mgpopt 420: \-mno\-gpopt 421: \-mstats 422: \-mno\-stats 423: \-mmemcpy 424: \-mno\-memcpy 425: \-mno\-mips\-tfile 426: \-mmips\-tfile 427: \-msoft\-float 428: \-mhard\-float 429: \-mabicalls 430: \-mno\-abicalls 431: \-mhalf\-pic 432: \-mno\-half\-pic 433: \-G \fInum\fP 1.1.1.5 root 434: \-nocpp 1.1.1.6 root 435: .Sp 1.1.1.2 root 436: .I i386 Options 437: .br 438: \-m486 1.1.1.5 root 439: \-mno\-486 440: \-msoft\-float 441: \-mno\-fp\-ret\-in\-387 1.1.1.6 root 442: .Sp 1.1.1.5 root 443: .I HPPA Options 444: .br 445: \-mpa\-risc\-1\-0 446: \-mpa\-risc\-1\-1 447: \-mkernel 448: \-mshared\-libs 449: \-mno\-shared\-libs 450: \-mlong\-calls 451: \-mdisable\-fpregs 452: \-mdisable\-indexing 453: \-mtrailing\-colon 1.1.1.6 root 454: .Sp 1.1.1.5 root 455: .I i960 Options 456: .br 457: \-m\fIcpu-type\fP 458: \-mnumerics 1.1.1.2 root 459: \-msoft\-float 1.1.1.5 root 460: \-mleaf\-procedures 461: \-mno\-leaf\-procedures 462: \-mtail\-call 463: \-mno\-tail\-call 464: \-mcomplex\-addr 465: \-mno\-complex\-addr 466: \-mcode\-align 467: \-mno\-code\-align 468: \-mic\-compat 469: \-mic2.0\-compat 470: \-mic3.0\-compat 471: \-masm\-compat 472: \-mintel\-asm 473: \-mstrict\-align 474: \-mno\-strict\-align 475: \-mold\-align 476: \-mno\-old\-align 1.1.1.6 root 477: .Sp 1.1.1.5 root 478: .I DEC Alpha Options 479: .br 480: \-mfp\-regs 481: \-mno\-fp\-regs 482: \-mno\-soft\-float 483: \-msoft\-float 1.1.1.6 root 484: .Sp 1.1.1.5 root 485: .I System V Options 486: .br 487: \-G 488: \-Qy 489: \-Qn 490: .RI \-YP, paths 491: .RI \-Ym, dir 1.1 root 492: .TP 493: .B Code Generation Options 494: .RI \-fcall\-saved\- reg 495: .RI \-fcall\-used\- reg 496: .RI \-ffixed\- reg 1.1.1.5 root 497: \-finhibit\-size\-directive 1.1 root 498: \-fnonnull\-objects 1.1.1.5 root 499: \-fno\-common 500: \-fno\-ident 501: \-fno\-gnu\-linker 1.1 root 502: \-fpcc\-struct\-return 503: \-fpic 504: \-fPIC 1.1.1.5 root 505: \-freg\-struct\-returno 1.1 root 506: \-fshared\-data 507: \-fshort\-enums 508: \-fshort\-double 509: \-fvolatile 1.1.1.5 root 510: \-fvolatile\-global 511: \-fverbose\-asm 1.1 root 512: .ad b 513: .hy 1 514: .SH OVERALL OPTIONS 515: .TP 516: .BI "\-x " "language" 1.1.1.6 root 517: Specify explicitly the 1.1 root 518: .I language\c 519: \& for the following input files (rather than choosing a default based 520: on the file name suffix) . This option applies to all following input 521: files until the next `\|\c 522: .B \-x\c 523: \&\|' option. Possible values of \c 524: .I language\c 525: \& are 526: `\|\c 527: .B c\c 528: \&\|', `\|\c 529: .B objective\-c\c 530: \&\|', `\|\c 531: .B c\-header\c 532: \&\|', `\|\c 533: .B c++\c 534: \&\|', 535: `\|\c 536: .B cpp\-output\c 537: \&\|', `\|\c 538: .B assembler\c 539: \&\|', and `\|\c 540: .B assembler\-with\-cpp\c 541: \&\|'. 542: .TP 543: .B \-x none 544: Turn off any specification of a language, so that subsequent files are 545: handled according to their file name suffixes (as they are if `\|\c 546: .B \-x\c 547: \&\|' 548: has not been used at all). 549: .PP 550: If you want only some of the four stages (preprocess, compile, 551: assemble, link), you can use 552: `\|\c 553: .B \-x\c 554: \&\|' (or filename suffixes) to tell \c 555: .B gcc\c 556: \& where to start, and 557: one of the options `\|\c 558: .B \-c\c 559: \&\|', `\|\c 560: .B \-S\c 561: \&\|', or `\|\c 562: .B \-E\c 563: \&\|' to say where 564: .B gcc\c 565: \& is to stop. Note that some combinations (for example, 566: `\|\c 567: .B \-x cpp\-output \-E\c 568: \&\|') instruct \c 569: .B gcc\c 570: \& to do nothing at all. 571: .TP 572: .B \-c 573: Compile or assemble the source files, but do not link. The compiler 574: output is an object file corresponding to each source file. 1.1.1.6 root 575: .Sp 1.1 root 576: By default, GCC makes the object file name for a source file by replacing 577: the suffix `\|\c 578: .B .c\c 579: \&\|', `\|\c 580: .B .i\c 581: \&\|', `\|\c 582: .B .s\c 583: \&\|', etc., with `\|\c 584: .B .o\c 585: \&\|'. Use 586: .B \-o\c 587: \& to select another name. 1.1.1.6 root 588: .Sp 1.1 root 589: GCC ignores any unrecognized input files (those that do not require 590: compilation or assembly) with the 591: .B \-c 592: option. 593: .TP 594: .B \-S 595: Stop after the stage of compilation proper; do not assemble. The output 596: is an assembler code file for each non-assembler input 597: file specified. 1.1.1.6 root 598: .Sp 1.1 root 599: By default, GCC makes the assembler file name for a source file by 600: replacing the suffix `\|\c 601: .B .c\c 602: \&\|', `\|\c 603: .B .i\c 604: \&\|', etc., with `\|\c 605: .B .s\c 606: \&\|'. Use 607: .B \-o\c 608: \& to select another name. 1.1.1.6 root 609: .Sp 1.1 root 610: GCC ignores any input files that don't require compilation. 611: .TP 612: .B \-E 613: Stop after the preprocessing stage; do not run the compiler proper. The 614: output is preprocessed source code, which is sent to the 615: standard output. 1.1.1.6 root 616: .Sp 1.1 root 617: GCC ignores input files which don't require preprocessing. 618: .TP 1.1.1.6 root 619: .BI "\-o " file 1.1 root 620: Place output in file \c 621: .I file\c 622: \&. This applies regardless to whatever 623: sort of output GCC is producing, whether it be an executable file, 624: an object file, an assembler file or preprocessed C code. 1.1.1.6 root 625: .Sp 1.1 root 626: Since only one output file can be specified, it does not make sense to 627: use `\|\c 628: .B \-o\c 629: \&\|' when compiling more than one input file, unless you are 630: producing an executable file as output. 1.1.1.6 root 631: .Sp 1.1 root 632: If you do not specify `\|\c 633: .B \-o\c 634: \&\|', the default is to put an executable file 635: in `\|\c 636: .B a.out\c 637: \&\|', the object file for `\|\c 638: .I source\c 1.1.1.6 root 639: .B \&.\c 1.1 root 640: .I suffix\c 641: \&\c 642: \&\|' in 643: `\|\c 644: .I source\c 1.1.1.6 root 645: .B \&.o\c 1.1 root 646: \&\|', its assembler file in `\|\c 647: .I source\c 1.1.1.6 root 648: .B \&.s\c 1.1 root 649: \&\|', and 650: all preprocessed C source on standard output. 651: .TP 652: .B \-v 653: Print (on standard error output) the commands executed to run the stages 654: of compilation. Also print the version number of the compiler driver 655: program and of the preprocessor and the compiler proper. 656: .TP 657: .B \-pipe 658: Use pipes rather than temporary files for communication between the 659: various stages of compilation. This fails to work on some systems where 660: the assembler cannot read from a pipe; but the GNU assembler has 661: no trouble. 662: .PP 663: .SH LANGUAGE OPTIONS 664: The following options control the dialect of C that the compiler 665: accepts: 666: .TP 667: .B \-ansi 1.1.1.6 root 668: Support all ANSI standard C programs. 669: .Sp 1.1 root 670: This turns off certain features of GNU C that are incompatible with 671: ANSI C, such as the \c 672: .B asm\c 673: \&, \c 674: .B inline\c 675: \& and \c 1.1.1.6 root 676: .B typeof 1.1 root 677: keywords, and predefined macros such as \c 678: .B unix\c 679: \& and \c 1.1.1.6 root 680: .B vax 1.1 root 681: that identify the type of system you are using. It also enables the 1.1.1.5 root 682: undesirable and rarely used ANSI trigraph feature, and disallows `\|\c 1.1 root 683: .B $\c 684: \&\|' as part of identifiers. 1.1.1.6 root 685: .Sp 1.1 root 686: The alternate keywords \c 1.1.1.6 root 687: .B _\|_asm_\|_\c 1.1 root 688: \&, \c 1.1.1.6 root 689: .B _\|_extension_\|_\c 1.1 root 690: \&, 1.1.1.6 root 691: .B _\|_inline_\|_\c 1.1 root 692: \& and \c 1.1.1.6 root 693: .B _\|_typeof_\|_\c 1.1 root 694: \& continue to work despite 695: `\|\c 696: .B \-ansi\c 697: \&\|'. You would not want to use them in an ANSI C program, of 698: course, but it is useful to put them in header files that might be included 699: in compilations done with `\|\c 700: .B \-ansi\c 701: \&\|'. Alternate predefined macros 702: such as \c 1.1.1.6 root 703: .B _\|_unix_\|_\c 1.1 root 704: \& and \c 1.1.1.6 root 705: .B _\|_vax_\|_\c 1.1 root 706: \& are also available, with or 707: without `\|\c 708: .B \-ansi\c 709: \&\|'. 1.1.1.6 root 710: .Sp 1.1 root 711: The `\|\c 712: .B \-ansi\c 713: \&\|' option does not cause non-ANSI programs to be 714: rejected gratuitously. For that, `\|\c 715: .B \-pedantic\c 716: \&\|' is required in 717: addition to `\|\c 718: .B \-ansi\c 1.1.1.6 root 719: \&\|'. 720: .Sp 1.1 root 721: The preprocessor predefines a macro \c 1.1.1.6 root 722: .B _\|_STRICT_ANSI_\|_\c 1.1 root 723: \& when you use the `\|\c 724: .B \-ansi\c 725: \&\|' 726: option. Some header files may notice this macro and refrain 727: from declaring certain functions or defining certain macros that the 728: ANSI standard doesn't call for; this is to avoid interfering with any 729: programs that might use these names for other things. 730: .TP 731: .B \-fno\-asm 732: Do not recognize \c 733: .B asm\c 734: \&, \c 735: .B inline\c 736: \& or \c 737: .B typeof\c 738: \& as a 739: keyword. These words may then be used as identifiers. You can 740: use \c 1.1.1.6 root 741: .B _\|_asm_\|_\c 1.1 root 742: \&, \c 1.1.1.6 root 743: .B _\|_inline_\|_\c 1.1 root 744: \& and \c 1.1.1.6 root 745: .B _\|_typeof_\|_\c 1.1 root 746: \& instead. 747: `\|\c 748: .B \-ansi\c 749: \&\|' implies `\|\c 750: .B \-fno\-asm\c 751: \&\|'. 752: .TP 753: .B \-fno\-builtin 1.1.1.5 root 754: Don't recognize built-in functions that do not begin with two leading 1.1.1.6 root 755: underscores. Currently, the functions affected include \c 1.1.1.5 root 756: .B _exit\c 757: \&, 758: .B abort\c 759: \&, \c 760: .B abs\c 761: \&, \c 1.1 root 762: .B alloca\c 1.1.1.5 root 763: \&, \c 764: .B cos\c 765: \&, \c 766: .B exit\c 767: \&, 768: .B fabs\c 769: \&, \c 770: .B labs\c 771: \&, \c 772: .B memcmp\c 773: \&, \c 774: .B memcpy\c 775: \&, \c 776: .B sin\c 777: \&, 778: .B sqrt\c 779: \&, \c 780: .B strcmp\c 781: \&, \c 782: .B strcpy\c 783: \&, and \c 784: .B strlen\c 1.1 root 785: \&. 1.1.1.6 root 786: .Sp 1.1.1.5 root 787: The `\|\c 788: .B \-ansi\c 789: \&\|' option prevents \c 790: .B alloca\c 791: \& and \c 792: .B _exit\c 793: \& from 794: being builtin functions. 1.1 root 795: .TP 796: .B \-fno\-strict\-prototype 1.1.1.5 root 797: Treat a function declaration with no arguments, such as `\|\c 798: .B int foo 799: ();\c 800: \&\|', as C would treat it\(em\&as saying nothing about the number of 801: arguments or their types (C++ only). Normally, such a declaration in 802: C++ means that the function \c 1.1 root 803: .B foo\c 1.1.1.5 root 804: \& takes no arguments. 1.1 root 805: .TP 806: .B \-trigraphs 807: Support ANSI C trigraphs. The `\|\c 808: .B \-ansi\c 809: \&\|' option implies `\|\c 810: .B \-trigraphs\c 811: \&\|'. 812: .TP 813: .B \-traditional 814: Attempt to support some aspects of traditional C compilers. 1.1.1.3 root 815: For details, see the GNU C Manual; the duplicate list here 816: has been deleted so that we won't get complaints when it 817: is out of date. 1.1.1.6 root 818: .Sp 1.1.1.3 root 819: But one note about C++ programs only (not C). `\|\c 1.1 root 820: .B \-traditional\c 1.1.1.6 root 821: \&\|' has one additional effect for C++: assignment to 1.1 root 822: .B this 823: is permitted. This is the same as the effect of `\|\c 824: .B \-fthis\-is\-variable\c 825: \&\|'. 826: .TP 827: .B \-traditional\-cpp 828: Attempt to support some aspects of traditional C preprocessors. 829: This includes the items that specifically mention the preprocessor above, 830: but none of the other effects of `\|\c 831: .B \-traditional\c 832: \&\|'. 833: .TP 834: .B \-fdollars\-in\-identifiers 835: Permit the use of `\|\c 836: .B $\c 1.1.1.5 root 837: \&\|' in identifiers (C++ only). You can also use 838: `\|\c 839: .B \-fno\-dollars\-in\-identifiers\c 840: \&\|' to explicitly prohibit use of 841: `\|\c 1.1 root 842: .B $\c 1.1.1.5 root 843: \&\|'. (GNU C++ allows `\|\c 1.1 root 844: .B $\c 1.1.1.5 root 845: \&\|' by default on some target systems 846: but not others.) 1.1 root 847: .TP 848: .B \-fenum\-int\-equiv 1.1.1.5 root 849: Permit implicit conversion of \c 1.1 root 850: .B int\c 1.1.1.5 root 851: \& to enumeration types (C++ 852: only). Normally GNU C++ allows conversion of \c 853: .B enum\c 854: \& to \c 855: .B int\c 856: \&, 857: but not the other way around. 1.1 root 858: .TP 1.1.1.6 root 859: .B \-fexternal\-templates 860: Produce smaller code for template declarations, by generating only a 861: single copy of each template function where it is defined (C++ only). 862: To use this option successfully, you must also mark all files that 863: use templates with either `\|\c 864: .B #pragma implementation\c 865: \&\|' (the definition) or 866: `\|\c 867: .B #pragma interface\c 868: \&\|' (declarations). 869: 870: When your code is compiled with `\|\c 871: .B \-fexternal\-templates\c 872: \&\|', all 873: template instantiations are external. You must arrange for all 874: necessary instantiations to appear in the implementation file; you can 875: do this with a \c 876: .B typedef\c 877: \& that references each instantiation needed. 878: Conversely, when you compile using the default option 879: `\|\c 880: .B \-fno\-external\-templates\c 881: \&\|', all template instantiations are 882: explicitly internal. 883: .TP 1.1 root 884: .B \-fall\-virtual 1.1.1.5 root 885: Treat all possible member functions as virtual, implicitly. All 886: member functions (except for constructor functions and 887: .B new 888: or 889: .B delete 890: member operators) are treated as virtual functions of the class where 891: they appear. 1.1.1.6 root 892: .Sp 1.1.1.5 root 893: This does not mean that all calls to these member functions will be 894: made through the internal table of virtual functions. Under some 895: circumstances, the compiler can determine that a call to a given 896: virtual function can be made directly; in these cases the calls are 897: direct in any case. 1.1 root 898: .TP 899: .B \-fcond\-mismatch 900: Allow conditional expressions with mismatched types in the second and 901: third arguments. The value of such an expression is void. 902: .TP 903: .B \-fthis\-is\-variable 1.1.1.5 root 904: Permit assignment to \c 1.1 root 905: .B this\c 1.1.1.5 root 906: \& (C++ only). The incorporation of 907: user-defined free store management into C++ has made assignment to 908: `\|\c 1.1 root 909: .B this\c 1.1.1.5 root 910: \&\|' an anachronism. Therefore, by default it is invalid to 911: assign to \c 1.1 root 912: .B this\c 1.1.1.5 root 913: \& within a class member function. However, for 914: backwards compatibility, you can make it valid with 915: `\|\c 916: .B \-fthis-is-variable\c 1.1 root 917: \&\|'. 918: .TP 919: .B \-funsigned\-char 920: Let the type \c 921: .B char\c 922: \& be unsigned, like \c 923: .B unsigned char\c 924: \&. 1.1.1.6 root 925: .Sp 1.1 root 926: Each kind of machine has a default for what \c 927: .B char\c 928: \& should 929: be. It is either like \c 930: .B unsigned char\c 931: \& by default or like 932: .B signed char\c 933: \& by default. 1.1.1.6 root 934: .Sp 1.1 root 935: Ideally, a portable program should always use \c 936: .B signed char\c 937: \& or 938: .B unsigned char\c 939: \& when it depends on the signedness of an object. 940: But many programs have been written to use plain \c 941: .B char\c 942: \& and 943: expect it to be signed, or expect it to be unsigned, depending on the 944: machines they were written for. This option, and its inverse, let you 945: make such a program work with the opposite default. 1.1.1.6 root 946: .Sp 1.1 root 947: The type \c 948: .B char\c 949: \& is always a distinct type from each of 950: .B signed char\c 951: \& and \c 952: .B unsigned char\c 953: \&, even though its behavior 954: is always just like one of those two. 955: .TP 956: .B \-fsigned\-char 957: Let the type \c 958: .B char\c 959: \& be signed, like \c 960: .B signed char\c 961: \&. 1.1.1.6 root 962: .Sp 1.1 root 963: Note that this is equivalent to `\|\c 964: .B \-fno\-unsigned\-char\c 965: \&\|', which is 966: the negative form of `\|\c 967: .B \-funsigned\-char\c 968: \&\|'. Likewise, 969: `\|\c 970: .B \-fno\-signed\-char\c 971: \&\|' is equivalent to `\|\c 972: .B \-funsigned\-char\c 973: \&\|'. 974: .TP 975: .B \-fsigned\-bitfields 976: .TP 977: .B \-funsigned\-bitfields 978: .TP 979: .B \-fno\-signed\-bitfields 980: .TP 981: .B \-fno\-unsigned\-bitfields 982: These options control whether a bitfield is 983: signed or unsigned, when declared with no explicit `\|\c 984: .B signed\c 985: \&\|' or `\|\c 986: .B unsigned\c 987: \&\|' qualifier. By default, such a bitfield is 988: signed, because this is consistent: the basic integer types such as 989: .B int\c 990: \& are signed types. 1.1.1.6 root 991: .Sp 1.1 root 992: However, when you specify `\|\c 993: .B \-traditional\c 994: \&\|', bitfields are all unsigned 995: no matter what. 996: .TP 997: .B \-fwritable\-strings 998: Store string constants in the writable data segment and don't uniquize 999: them. This is for compatibility with old programs which assume they 1000: can write into string constants. `\|\c 1001: .B \-traditional\c 1002: \&\|' also has this 1003: effect. 1.1.1.6 root 1004: .Sp 1005: Writing into string constants is a very bad idea; \*(lqconstants\*(rq should 1.1 root 1006: be constant. 1007: .SH PREPROCESSOR OPTIONS 1008: These options control the C preprocessor, which is run on each C source 1009: file before actual compilation. 1.1.1.6 root 1010: .PP 1.1 root 1011: If you use the `\|\c 1012: .B \-E\c 1013: \&\|' option, GCC does nothing except preprocessing. 1014: Some of these options make sense only together with `\|\c 1015: .B \-E\c 1016: \&\|' because 1017: they cause the preprocessor output to be unsuitable for actual 1018: compilation. 1019: .TP 1.1.1.5 root 1020: .BI "\-include " "file" 1021: Process \c 1022: .I file\c 1023: \& as input before processing the regular input file. 1024: In effect, the contents of \c 1025: .I file\c 1026: \& are compiled first. Any `\|\c 1027: .B \-D\c 1028: \&\|' 1029: and `\|\c 1030: .B \-U\c 1031: \&\|' options on the command line are always processed before 1032: `\|\c 1033: .B \-include \c 1034: .I file\c 1035: \&\c 1036: \&\|', regardless of the order in which they are 1037: written. All the `\|\c 1038: .B \-include\c 1039: \&\|' and `\|\c 1040: .B \-imacros\c 1041: \&\|' options are 1042: processed in the order in which they are written. 1043: .TP 1044: .BI "\-imacros " file 1.1 root 1045: Process \c 1046: .I file\c 1047: \& as input, discarding the resulting output, before 1048: processing the regular input file. Because the output generated from 1049: .I file\c 1050: \& is discarded, the only effect of `\|\c 1.1.1.5 root 1051: .B \-imacros \c 1.1 root 1052: .I file\c 1053: \&\c 1054: \&\|' is to 1055: make the macros defined in \c 1056: .I file\c 1057: \& available for use in the main 1058: input. The preprocessor evaluates any `\|\c 1059: .B \-D\c 1060: \&\|' and `\|\c 1061: .B \-U\c 1062: \&\|' options 1063: on the command line before processing `\|\c 1.1.1.5 root 1064: .B \-imacros\c 1.1 root 1065: .I file\c 1.1.1.5 root 1066: \&\|', regardless of the order in 1067: which they are written. All the `\|\c 1068: .B \-include\c 1069: \&\|' and `\|\c 1070: .B \-imacros\c 1071: \&\|' 1072: options are processed in the order in which they are written. 1073: .TP 1.1.1.6 root 1074: .BI "\-idirafter " "dir" 1.1.1.5 root 1075: Add the directory \c 1076: .I dir\c 1077: \& to the second include path. The directories 1078: on the second include path are searched when a header file is not found 1079: in any of the directories in the main include path (the one that 1080: `\|\c 1081: .B \-I\c 1082: \&\|' adds to). 1083: .TP 1.1.1.6 root 1084: .BI "\-iprefix " "prefix" 1.1.1.5 root 1085: Specify \c 1086: .I prefix\c 1087: \& as the prefix for subsequent `\|\c 1088: .B \-iwithprefix\c 1089: \&\|' 1090: options. 1091: .TP 1.1.1.6 root 1092: .BI "\-iwithprefix " "dir" 1.1.1.5 root 1093: Add a directory to the second include path. The directory's name is 1094: made by concatenating \c 1095: .I prefix\c 1096: \& and \c 1097: .I dir\c 1098: \&, where \c 1.1.1.6 root 1099: .I prefix 1.1.1.5 root 1100: was specified previously with `\|\c 1101: .B \-iprefix\c 1102: \&\|'. 1.1 root 1103: .TP 1104: .B \-nostdinc 1105: Do not search the standard system directories for header files. Only 1106: the directories you have specified with `\|\c 1107: .B \-I\c 1108: \&\|' options (and the 1.1.1.6 root 1109: current directory, if appropriate) are searched. 1110: .Sp 1.1 root 1111: By using both `\|\c 1112: .B \-nostdinc\c 1113: \&\|' and `\|\c 1114: .B \-I\-\c 1115: \&\|', you can limit the include-file search file to only those 1116: directories you specify explicitly. 1117: .TP 1.1.1.5 root 1118: .B \-nostdinc++ 1.1.1.6 root 1119: Do not search for header files in the C++\-specific standard directories, 1.1.1.5 root 1120: but do still search the other standard directories. 1121: (This option is used when building `\|\c 1122: .B libg++\c 1123: \&\|'.) 1124: .TP 1.1 root 1125: .B \-undef 1126: Do not predefine any nonstandard macros. (Including architecture flags). 1127: .TP 1128: .B \-E 1129: Run only the C preprocessor. Preprocess all the C source files 1130: specified and output the results to standard output or to the 1131: specified output file. 1132: .TP 1133: .B \-C 1134: Tell the preprocessor not to discard comments. Used with the 1135: `\|\c 1136: .B \-E\c 1137: \&\|' option. 1138: .TP 1139: .B \-P 1140: Tell the preprocessor not to generate `\|\c 1141: .B #line\c 1142: \&\|' commands. 1143: Used with the `\|\c 1144: .B \-E\c 1145: \&\|' option. 1146: .TP 1.1.1.7 ! root 1147: .B \-M\ [ \-MG ] 1.1 root 1148: Tell the preprocessor to output a rule suitable for \c 1.1.1.6 root 1149: .B make 1.1 root 1150: describing the dependencies of each object file. For each source file, 1151: the preprocessor outputs one \c 1152: .B make\c 1153: \&-rule whose target is the object 1154: file name for that source file and whose dependencies are all the files 1155: `\|\c 1156: .B #include\c 1157: \&\|'d in it. This rule may be a single line or may be 1158: continued with `\|\c 1159: .B \e\c 1160: \&\|'-newline if it is long. The list of rules is 1161: printed on standard output instead of the preprocessed C program. 1.1.1.6 root 1162: .Sp 1.1 root 1163: `\|\c 1164: .B \-M\c 1165: \&\|' implies `\|\c 1166: .B \-E\c 1167: \&\|'. 1.1.1.7 ! root 1168: .Sp ! 1169: `\|\c ! 1170: .B \-MG\c ! 1171: \&\|' says to treat missing header files as generated files and assume \c ! 1172: they live in the same directory as the source file. It must be specified \c ! 1173: in addition to `\|\c ! 1174: .B \-M\c ! 1175: \&\|'. 1.1 root 1176: .TP 1.1.1.7 ! root 1177: .B \-MM\ [ \-MG ] 1.1 root 1178: Like `\|\c 1179: .B \-M\c 1180: \&\|' but the output mentions only the user header files 1181: included with `\|\c 1182: .B #include "\c 1183: .I file\c 1184: \&"\c 1185: \&\|'. System header files 1186: included with `\|\c 1187: .B #include <\c 1188: .I file\c 1189: \&>\c 1190: \&\|' are omitted. 1191: .TP 1192: .B \-MD 1193: Like `\|\c 1194: .B \-M\c 1195: \&\|' but the dependency information is written to files with 1196: names made by replacing `\|\c 1.1.1.5 root 1197: .B .o\c 1.1 root 1198: \&\|' with `\|\c 1199: .B .d\c 1200: \&\|' at the end of the 1.1.1.5 root 1201: output file names. This is in addition to compiling the file as 1.1 root 1202: specified\(em\&`\|\c 1203: .B \-MD\c 1204: \&\|' does not inhibit ordinary compilation the way 1205: `\|\c 1206: .B \-M\c 1207: \&\|' does. 1.1.1.6 root 1208: .Sp 1.1 root 1209: The Mach utility `\|\c 1210: .B md\c 1211: \&\|' can be used to merge the `\|\c 1212: .B .d\c 1213: \&\|' files 1214: into a single dependency file suitable for using with the `\|\c 1215: .B make\c 1216: \&\|' 1217: command. 1218: .TP 1219: .B \-MMD 1220: Like `\|\c 1221: .B \-MD\c 1222: \&\|' except mention only user header files, not system 1223: header files. 1224: .TP 1225: .B \-H 1226: Print the name of each header file used, in addition to other normal 1227: activities. 1228: .TP 1.1.1.6 root 1229: .BI "\-A" "question" ( answer ) 1.1.1.5 root 1230: Assert the answer 1231: .I answer 1232: for 1233: .I question\c 1234: \&, in case it is tested 1235: with a preprocessor conditional such as `\|\c 1236: .BI "#if #" question ( answer )\c 1237: \&\|'. `\|\c 1238: .B \-A\-\c 1239: \&\|' disables the standard 1240: assertions that normally describe the target machine. 1241: .TP 1.1.1.6 root 1242: .BI "\-A" "question"\c 1.1.1.5 root 1243: \&(\c 1244: .I answer\c 1245: \&) 1246: Assert the answer \c 1247: .I answer\c 1248: \& for \c 1249: .I question\c 1250: \&, in case it is tested 1251: with a preprocessor conditional such as `\|\c 1252: .B #if 1253: #\c 1254: .I question\c 1255: \&(\c 1256: .I answer\c 1257: \&)\c 1258: \&\|'. `\|\c 1259: .B \-A-\c 1260: \&\|' disables the standard 1261: assertions that normally describe the target machine. 1262: .TP 1.1 root 1263: .BI \-D macro 1264: Define macro \c 1265: .I macro\c 1266: \& with the string `\|\c 1267: .B 1\c 1268: \&\|' as its definition. 1269: .TP 1270: .BI \-D macro = defn 1271: Define macro \c 1272: .I macro\c 1273: \& as \c 1274: .I defn\c 1275: \&. All instances of `\|\c 1276: .B \-D\c 1277: \&\|' on 1278: the command line are processed before any `\|\c 1279: .B \-U\c 1280: \&\|' options. 1281: .TP 1282: .BI \-U macro 1283: Undefine macro \c 1284: .I macro\c 1285: \&. `\|\c 1286: .B \-U\c 1287: \&\|' options are evaluated after all `\|\c 1288: .B \-D\c 1289: \&\|' options, but before any `\|\c 1.1.1.5 root 1290: .B \-include\c 1291: \&\|' and `\|\c 1292: .B \-imacros\c 1.1 root 1293: \&\|' options. 1294: .TP 1295: .B \-dM 1296: Tell the preprocessor to output only a list of the macro definitions 1297: that are in effect at the end of preprocessing. Used with the `\|\c 1298: .B \-E\c 1299: \&\|' 1300: option. 1301: .TP 1302: .B \-dD 1.1.1.5 root 1303: Tell the preprocessor to pass all macro definitions into the output, in 1.1 root 1304: their proper sequence in the rest of the output. 1305: .TP 1306: .B \-dN 1307: Like `\|\c 1308: .B \-dD\c 1309: \&\|' except that the macro arguments and contents are omitted. 1310: Only `\|\c 1311: .B #define \c 1312: .I name\c 1313: \&\c 1314: \&\|' is included in the output. 1.1.1.5 root 1315: .SH ASSEMBLER OPTION 1316: .TP 1.1.1.6 root 1317: .BI "\-Wa," "option" 1.1.1.5 root 1318: Pass \c 1319: .I option\c 1320: \& as an option to the assembler. If \c 1.1.1.6 root 1321: .I option 1.1.1.5 root 1322: contains commas, it is split into multiple options at the commas. 1.1 root 1323: .SH LINKER OPTIONS 1324: These options come into play when the compiler links object files into 1325: an executable output file. They are meaningless if the compiler is 1326: not doing a link step. 1327: .TP 1328: .I object-file-name 1329: A file name that does not end in a special recognized suffix is 1330: considered to name an object file or library. (Object files are 1331: distinguished from libraries by the linker according to the file 1332: contents.) If GCC does a link step, these object files are used as input 1333: to the linker. 1334: .TP 1.1.1.6 root 1335: .BI \-l library 1.1 root 1336: Use the library named \c 1337: .I library\c 1338: \& when linking. 1.1.1.6 root 1339: .Sp 1.1 root 1340: The linker searches a standard list of directories for the library, 1341: which is actually a file named `\|\c 1342: .B lib\c 1343: .I library\c 1344: \&.a\c 1345: \&\|'. The linker 1346: then uses this file as if it had been specified precisely by name. 1.1.1.6 root 1347: .Sp 1.1 root 1348: The directories searched include several standard system directories 1349: plus any that you specify with `\|\c 1350: .B \-L\c 1351: \&\|'. 1.1.1.6 root 1352: .Sp 1.1 root 1353: Normally the files found this way are library files\(em\&archive files 1354: whose members are object files. The linker handles an archive file by 1355: scanning through it for members which define symbols that have so far 1356: been referenced but not defined. However, if the linker finds an 1357: ordinary object file rather than a library, the object file is linked 1358: in the usual fashion. The only difference between using an `\|\c 1359: .B \-l\c 1360: \&\|' option and specifying a file 1361: name is that `\|\c 1362: .B \-l\c 1.1.1.6 root 1363: \&\|' surrounds 1.1 root 1364: .I library 1365: with `\|\c 1366: .B lib\c 1367: \&\|' and `\|\c 1368: .B .a\c 1369: \&\|' and searches several directories. 1370: .TP 1.1.1.5 root 1371: .B \-lobjc 1372: You need this special case of the 1373: .B \-l 1374: option in order to link an Objective C program. 1375: .TP 1376: .B \-nostartfiles 1377: Do not use the standard system startup files when linking. 1378: The standard libraries are used normally. 1379: .TP 1.1 root 1380: .B \-nostdlib 1381: Don't use the standard system libraries and startup files when linking. 1382: Only the files you specify will be passed to the linker. 1383: .TP 1384: .B \-static 1385: On systems that support dynamic linking, this prevents linking with the shared 1.1.1.4 root 1386: libraries. On other systems, this option has no effect. 1.1.1.5 root 1387: .TP 1388: .B \-shared 1389: Produce a shared object which can then be linked with other objects to 1390: form an executable. Only a few systems support this option. 1391: .TP 1392: .B \-symbolic 1393: Bind references to global symbols when building a shared object. Warn 1394: about any unresolved references (unless overridden by the link editor 1395: option `\|\c 1396: .B 1397: \-Xlinker \-z \-Xlinker defs\c 1398: \&\|'). Only a few systems support 1399: this option. 1400: .TP 1.1.1.6 root 1401: .BI "\-Xlinker " "option" 1.1.1.5 root 1402: Pass \c 1403: .I option 1404: as an option to the linker. You can use this to 1405: supply system-specific linker options which GNU CC does not know how to 1406: recognize. 1.1.1.6 root 1407: .Sp 1.1.1.5 root 1408: If you want to pass an option that takes an argument, you must use 1409: `\|\c 1410: .B \-Xlinker\c 1411: \&\|' twice, once for the option and once for the argument. 1412: For example, to pass `\|\c 1413: .B 1414: \-assert definitions\c 1415: \&\|', you must write 1416: `\|\c 1417: .B 1418: \-Xlinker \-assert \-Xlinker definitions\c 1419: \&\|'. It does not work to write 1420: `\|\c 1421: .B 1.1.1.6 root 1422: \-Xlinker "\-assert definitions"\c 1.1.1.5 root 1423: \&\|', because this passes the entire 1424: string as a single argument, which is not what the linker expects. 1425: .TP 1.1.1.6 root 1426: .BI "\-Wl," "option" 1.1.1.5 root 1427: Pass \c 1428: .I option\c 1429: \& as an option to the linker. If \c 1430: .I option\c 1431: \& contains 1432: commas, it is split into multiple options at the commas. 1433: .TP 1.1.1.6 root 1434: .BI "\-u " "symbol" 1.1.1.5 root 1435: Pretend the symbol 1436: .I symbol 1437: is undefined, to force linking of 1438: library modules to define it. You can use `\|\c 1439: .B \-u\c 1440: \&\|' multiple times with 1441: different symbols to force loading of additional library modules. 1.1 root 1442: .SH DIRECTORY OPTIONS 1443: These options specify directories to search for header files, for 1444: libraries and for parts of the compiler: 1445: .TP 1.1.1.6 root 1446: .BI "\-I" "dir" 1.1 root 1447: Append directory \c 1448: .I dir\c 1449: \& to the list of directories searched for include files. 1450: .TP 1451: .B \-I\- 1452: Any directories you specify with `\|\c 1453: .B \-I\c 1454: \&\|' options before the `\|\c 1455: .B \-I\-\c 1456: \&\|' 1457: option are searched only for the case of `\|\c 1.1.1.6 root 1458: .B 1.1 root 1459: #include "\c 1460: .I file\c 1461: .B 1462: \&"\c 1463: \&\|'; 1464: they are not searched for `\|\c 1465: .B #include <\c 1466: .I file\c 1467: \&>\c 1468: \&\|'. 1.1.1.6 root 1469: .Sp 1.1 root 1470: If additional directories are specified with `\|\c 1471: .B \-I\c 1472: \&\|' options after 1473: the `\|\c 1474: .B \-I\-\c 1475: \&\|', these directories are searched for all `\|\c 1476: .B #include\c 1477: \&\|' 1478: directives. (Ordinarily \c 1479: .I all\c 1480: \& `\|\c 1481: .B \-I\c 1482: \&\|' directories are used 1483: this way.) 1.1.1.6 root 1484: .Sp 1.1 root 1485: In addition, the `\|\c 1486: .B \-I\-\c 1487: \&\|' option inhibits the use of the current 1488: directory (where the current input file came from) as the first search 1489: directory for `\|\c 1.1.1.6 root 1490: .B 1.1 root 1491: #include "\c 1492: .I file\c 1493: .B 1494: \&"\c 1495: \&\|'. There is no way to 1496: override this effect of `\|\c 1497: .B \-I\-\c 1498: \&\|'. With `\|\c 1499: .B \-I.\c 1500: \&\|' you can specify 1501: searching the directory which was current when the compiler was 1502: invoked. That is not exactly the same as what the preprocessor does 1503: by default, but it is often satisfactory. 1.1.1.6 root 1504: .Sp 1.1 root 1505: `\|\c 1506: .B \-I\-\c 1507: \&\|' does not inhibit the use of the standard system directories 1508: for header files. Thus, `\|\c 1509: .B \-I\-\c 1510: \&\|' and `\|\c 1511: .B \-nostdinc\c 1512: \&\|' are 1513: independent. 1514: .TP 1.1.1.6 root 1515: .BI "\-L" "dir" 1.1 root 1516: Add directory \c 1517: .I dir\c 1518: \& to the list of directories to be searched 1519: for `\|\c 1520: .B \-l\c 1521: \&\|'. 1522: .TP 1.1.1.6 root 1523: .BI "\-B" "prefix" 1.1 root 1524: This option specifies where to find the executables, libraries and 1525: data files of the compiler itself. 1.1.1.6 root 1526: .Sp 1.1 root 1527: The compiler driver program runs one or more of the subprograms 1528: `\|\c 1529: .B cpp\c 1530: \&\|', `\|\c 1531: .B cc1\c 1532: \&\|' (or, for C++, `\|\c 1533: .B cc1plus\c 1534: \&\|'), `\|\c 1535: .B as\c 1536: \&\|' and `\|\c 1537: .B ld\c 1538: \&\|'. It tries 1539: .I prefix\c 1540: \& as a prefix for each program it tries to run, both with and 1541: without `\|\c 1542: .I machine\c 1.1.1.6 root 1543: .B /\c 1.1 root 1544: .I version\c 1.1.1.6 root 1545: .B /\c 1.1 root 1546: \&\|'. 1.1.1.6 root 1547: .Sp 1.1 root 1548: For each subprogram to be run, the compiler driver first tries the 1549: `\|\c 1550: .B \-B\c 1551: \&\|' prefix, if any. If that name is not found, or if `\|\c 1552: .B \-B\c 1553: \&\|' 1554: was not specified, the driver tries two standard prefixes, which are 1555: `\|\c 1556: .B /usr/lib/gcc/\c 1557: \&\|' and `\|\c 1.1.1.2 root 1558: .B /usr/local/lib/gcc-lib/\c 1.1 root 1559: \&\|'. If neither of 1560: those results in a file name that is found, the compiler driver 1561: searches for the unmodified program 1562: name, using the directories specified in your 1563: `\|\c 1564: .B PATH\c 1565: \&\|' environment variable. 1.1.1.6 root 1566: .Sp 1.1 root 1567: The run-time support file `\|\c 1568: .B libgcc.a\c 1569: \&\|' is also searched for using the 1570: `\|\c 1571: .B \-B\c 1572: \&\|' prefix, if needed. If it is not found there, the two 1573: standard prefixes above are tried, and that is all. The file is left 1574: out of the link if it is not found by those means. Most of the time, 1575: on most machines, `\|\c 1576: .B libgcc.a\c 1577: \&\|' is not actually necessary. 1.1.1.6 root 1578: .Sp 1.1 root 1579: You can get a similar result from the environment variable 1580: .B GCC_EXEC_PREFIX\c 1581: \&; if it is defined, its value is used as a prefix 1582: in the same way. If both the `\|\c 1583: .B \-B\c 1584: \&\|' option and the 1585: .B GCC_EXEC_PREFIX\c 1586: \& variable are present, the `\|\c 1587: .B \-B\c 1588: \&\|' option is 1589: used first and the environment variable value second. 1590: .SH WARNING OPTIONS 1591: Warnings are diagnostic messages that report constructions which 1592: are not inherently erroneous but which are risky or suggest there 1593: may have been an error. 1.1.1.6 root 1594: .Sp 1.1 root 1595: These options control the amount and kinds of warnings produced by GNU 1596: CC: 1597: .TP 1598: .B \-fsyntax\-only 1599: Check the code for syntax errors, but don't emit any output. 1600: .TP 1601: .B \-w 1602: Inhibit all warning messages. 1603: .TP 1.1.1.5 root 1604: .B \-Wno\-import 1605: Inhibit warning messages about the use of 1606: .BR #import . 1607: .TP 1.1 root 1608: .B \-pedantic 1609: Issue all the warnings demanded by strict ANSI standard C; reject 1610: all programs that use forbidden extensions. 1.1.1.6 root 1611: .Sp 1.1 root 1612: Valid ANSI standard C programs should compile properly with or without 1613: this option (though a rare few will require `\|\c 1614: .B \-ansi\c 1615: \&\|'). However, 1616: without this option, certain GNU extensions and traditional C features 1617: are supported as well. With this option, they are rejected. There is 1618: no reason to \c 1619: .I use\c 1620: \& this option; it exists only to satisfy pedants. 1.1.1.6 root 1621: .Sp 1.1 root 1622: `\|\c 1623: .B \-pedantic\c 1624: \&\|' does not cause warning messages for use of the 1625: alternate keywords whose names begin and end with `\|\c 1.1.1.6 root 1626: .B _\|_\c 1.1 root 1627: \&\|'. Pedantic 1628: warnings are also disabled in the expression that follows 1.1.1.6 root 1629: .B _\|_extension_\|_\c 1.1 root 1630: \&. However, only system header files should use 1631: these escape routes; application programs should avoid them. 1632: .TP 1633: .B \-pedantic\-errors 1634: Like `\|\c 1635: .B \-pedantic\c 1636: \&\|', except that errors are produced rather than 1637: warnings. 1638: .TP 1639: .B \-W 1640: Print extra warning messages for these events: 1641: .TP 1642: \ \ \ \(bu 1643: A nonvolatile automatic variable might be changed by a call to 1644: .B longjmp\c 1645: \&. These warnings are possible only in 1646: optimizing compilation. 1.1.1.6 root 1647: .Sp 1.1 root 1648: The compiler sees only the calls to \c 1649: .B setjmp\c 1650: \&. It cannot know 1651: where \c 1652: .B longjmp\c 1653: \& will be called; in fact, a signal handler could 1654: call it at any point in the code. As a result, you may get a warning 1655: even when there is in fact no problem because \c 1656: .B longjmp\c 1657: \& cannot 1658: in fact be called at the place which would cause a problem. 1659: .TP 1660: \ \ \ \(bu 1661: A function can return either with or without a value. (Falling 1662: off the end of the function body is considered returning without 1663: a value.) For example, this function would evoke such a 1664: warning: 1.1.1.6 root 1665: .Sp 1666: .nf 1667: foo (a) 1.1 root 1668: { 1.1.1.6 root 1669: if (a > 0) 1670: return a; 1.1 root 1671: } 1.1.1.6 root 1672: .Sp 1673: .fi 1.1 root 1674: Spurious warnings can occur because GNU CC does not realize that 1675: certain functions (including \c 1676: .B abort\c 1677: \& and \c 1678: .B longjmp\c 1679: \&) 1680: will never return. 1681: .TP 1682: \ \ \ \(bu 1683: An expression-statement contains no side effects. 1684: .TP 1685: \ \ \ \(bu 1686: An unsigned value is compared against zero with `\|\c 1687: .B >\c 1688: \&\|' or `\|\c 1689: .B <=\c 1690: \&\|'. 1691: .PP 1692: .TP 1693: .B \-Wimplicit 1694: Warn whenever a function or parameter is implicitly declared. 1695: .TP 1696: .B \-Wreturn\-type 1697: Warn whenever a function is defined with a return-type that defaults 1698: to \c 1699: .B int\c 1700: \&. Also warn about any \c 1701: .B return\c 1702: \& statement with no 1703: return-value in a function whose return-type is not \c 1704: .B void\c 1705: \&. 1706: .TP 1707: .B \-Wunused 1708: Warn whenever a local variable is unused aside from its declaration, 1709: whenever a function is declared static but never defined, and whenever 1710: a statement computes a result that is explicitly not used. 1711: .TP 1712: .B \-Wswitch 1713: Warn whenever a \c 1714: .B switch\c 1715: \& statement has an index of enumeral type 1716: and lacks a \c 1717: .B case\c 1718: \& for one or more of the named codes of that 1719: enumeration. (The presence of a \c 1720: .B default\c 1721: \& label prevents this 1722: warning.) \c 1723: .B case\c 1724: \& labels outside the enumeration range also 1725: provoke warnings when this option is used. 1726: .TP 1727: .B \-Wcomment 1728: Warn whenever a comment-start sequence `\|\c 1.1.1.6 root 1729: .B /\(**\c 1.1 root 1730: \&\|' appears in a comment. 1731: .TP 1732: .B \-Wtrigraphs 1733: Warn if any trigraphs are encountered (assuming they are enabled). 1734: .TP 1735: .B \-Wformat 1736: Check calls to \c 1737: .B printf\c 1738: \& and \c 1739: .B scanf\c 1740: \&, etc., to make sure that 1741: the arguments supplied have types appropriate to the format string 1742: specified. 1743: .TP 1.1.1.5 root 1744: .B \-Wchar\-subscripts 1745: Warn if an array subscript has type 1746: .BR char . 1747: This is a common cause of error, as programmers often forget that this 1748: type is signed on some machines. 1749: .TP 1.1 root 1750: .B \-Wuninitialized 1751: An automatic variable is used without first being initialized. 1.1.1.6 root 1752: .Sp 1.1 root 1753: These warnings are possible only in optimizing compilation, 1754: because they require data flow information that is computed only 1755: when optimizing. If you don't specify `\|\c 1756: .B \-O\c 1757: \&\|', you simply won't 1758: get these warnings. 1.1.1.6 root 1759: .Sp 1.1 root 1760: These warnings occur only for variables that are candidates for 1761: register allocation. Therefore, they do not occur for a variable that 1762: is declared \c 1763: .B volatile\c 1764: \&, or whose address is taken, or whose size 1765: is other than 1, 2, 4 or 8 bytes. Also, they do not occur for 1766: structures, unions or arrays, even when they are in registers. 1.1.1.6 root 1767: .Sp 1.1 root 1768: Note that there may be no warning about a variable that is used only 1769: to compute a value that itself is never used, because such 1770: computations may be deleted by data flow analysis before the warnings 1771: are printed. 1.1.1.6 root 1772: .Sp 1.1 root 1773: These warnings are made optional because GNU CC is not smart 1774: enough to see all the reasons why the code might be correct 1775: despite appearing to have an error. Here is one example of how 1776: this can happen: 1.1.1.6 root 1777: .Sp 1778: .nf 1.1 root 1779: { 1.1.1.6 root 1780: int x; 1781: switch (y) 1782: { 1783: case 1: x = 1; 1784: break; 1785: case 2: x = 4; 1786: break; 1787: case 3: x = 5; 1788: } 1789: foo (x); 1.1 root 1790: } 1.1.1.6 root 1791: .Sp 1792: .fi 1.1 root 1793: If the value of \c 1794: .B y\c 1795: \& is always 1, 2 or 3, then \c 1796: .B x\c 1797: \& is 1798: always initialized, but GNU CC doesn't know this. Here is 1799: another common case: 1.1.1.6 root 1800: .Sp 1801: .nf 1.1 root 1802: { 1.1.1.6 root 1803: int save_y; 1804: if (change_y) save_y = y, y = new_y; 1805: .\|.\|. 1806: if (change_y) y = save_y; 1.1 root 1807: } 1.1.1.6 root 1808: .Sp 1809: .fi 1.1 root 1810: This has no bug because \c 1811: .B save_y\c 1812: \& is used only if it is set. 1.1.1.6 root 1813: .Sp 1.1 root 1814: Some spurious warnings can be avoided if you declare as 1815: .B volatile\c 1816: \& all the functions you use that never return. 1817: .TP 1.1.1.2 root 1818: .B \-Wparentheses 1819: Warn if parentheses are omitted in certain contexts. 1.1 root 1820: .TP 1.1.1.5 root 1821: .B \-Wtemplate\-debugging 1822: When using templates in a C++ program, warn if debugging is not yet 1823: fully available (C++ only). 1824: .TP 1.1 root 1825: .B \-Wall 1826: All of the above `\|\c 1827: .B \-W\c 1828: \&\|' options combined. These are all the 1829: options which pertain to usage that we recommend avoiding and that we 1830: believe is easy to avoid, even in conjunction with macros. 1831: .PP 1832: The remaining `\|\c 1833: .B \-W.\|.\|.\c 1834: \&\|' options are not implied by `\|\c 1835: .B \-Wall\c 1836: \&\|' 1837: because they warn about constructions that we consider reasonable to 1838: use, on occasion, in clean programs. 1839: .TP 1840: .B \-Wtraditional 1841: Warn about certain constructs that behave differently in traditional and 1842: ANSI C. 1843: .TP 1844: \ \ \ \(bu 1845: Macro arguments occurring within string constants in the macro body. 1846: These would substitute the argument in traditional C, but are part of 1847: the constant in ANSI C. 1848: .TP 1849: \ \ \ \(bu 1850: A function declared external in one block and then used after the end of 1851: the block. 1852: .TP 1853: \ \ \ \(bu 1854: A \c 1855: .B switch\c 1856: \& statement has an operand of type \c 1857: .B long\c 1858: \&. 1859: .PP 1860: .TP 1861: .B \-Wshadow 1862: Warn whenever a local variable shadows another local variable. 1863: .TP 1.1.1.6 root 1864: .BI "\-Wid\-clash\-" "len" 1.1 root 1865: Warn whenever two distinct identifiers match in the first \c 1.1.1.6 root 1866: .I len 1.1 root 1867: characters. This may help you prepare a program that will compile 1868: with certain obsolete, brain-damaged compilers. 1869: .TP 1870: .B \-Wpointer\-arith 1.1.1.6 root 1871: Warn about anything that depends on the \*(lqsize of\*(rq a function type or 1.1 root 1872: of \c 1873: .B void\c 1874: \&. GNU C assigns these types a size of 1, for 1875: convenience in calculations with \c 1.1.1.6 root 1876: .B void \(**\c 1.1 root 1877: \& pointers and pointers 1878: to functions. 1879: .TP 1880: .B \-Wcast\-qual 1881: Warn whenever a pointer is cast so as to remove a type qualifier from 1882: the target type. For example, warn if a \c 1.1.1.6 root 1883: .B const char \(**\c 1.1 root 1884: \& is cast 1885: to an ordinary \c 1.1.1.6 root 1886: .B char \(**\c 1.1 root 1887: \&. 1888: .TP 1889: .B \-Wcast\-align 1890: Warn whenever a pointer is cast such that the required alignment of the 1891: target is increased. For example, warn if a \c 1.1.1.6 root 1892: .B char \(**\c 1.1 root 1893: \& is cast to 1894: an \c 1.1.1.6 root 1895: .B int \(**\c 1.1 root 1896: \& on machines where integers can only be accessed at 1897: two- or four-byte boundaries. 1898: .TP 1899: .B \-Wwrite\-strings 1900: Give string constants the type \c 1901: .B const char[\c 1902: .I length\c 1.1.1.6 root 1903: .B ]\c 1.1 root 1904: \& so that 1905: copying the address of one into a non-\c 1906: .B const\c 1907: \& \c 1.1.1.6 root 1908: .B char \(** 1.1 root 1909: pointer will get a warning. These warnings will help you find at 1910: compile time code that can try to write into a string constant, but 1911: only if you have been very careful about using \c 1912: .B const\c 1913: \& in 1914: declarations and prototypes. Otherwise, it will just be a nuisance; 1915: this is why we did not make `\|\c 1916: .B \-Wall\c 1917: \&\|' request these warnings. 1918: .TP 1919: .B \-Wconversion 1920: Warn if a prototype causes a type conversion that is different from what 1921: would happen to the same argument in the absence of a prototype. This 1922: includes conversions of fixed point to floating and vice versa, and 1923: conversions changing the width or signedness of a fixed point argument 1924: except when the same as the default promotion. 1925: .TP 1.1.1.2 root 1926: .B \-Waggregate\-return 1927: Warn if any functions that return structures or unions are defined or 1928: called. (In languages where you can return an array, this also elicits 1929: a warning.) 1930: .TP 1931: .B \-Wstrict\-prototypes 1932: Warn if a function is declared or defined without specifying the 1933: argument types. (An old-style function definition is permitted without 1934: a warning if preceded by a declaration which specifies the argument 1935: types.) 1936: .TP 1937: .B \-Wmissing\-prototypes 1938: Warn if a global function is defined without a previous prototype 1939: declaration. This warning is issued even if the definition itself 1940: provides a prototype. The aim is to detect global functions that fail 1941: to be declared in header files. 1942: .TP 1.1.1.7 ! root 1943: .B \-Wmissing\-declarations ! 1944: Warn if a global function is defined without a previous declaration. ! 1945: Do so even if the definition itself provides a prototype. ! 1946: Use this option to detect global functions that are not declared in ! 1947: header files. ! 1948: .TP 1.1.1.5 root 1949: .B \-Wredundant-decls 1950: Warn if anything is declared more than once in the same scope, even in 1951: cases where multiple declaration is valid and changes nothing. 1952: .TP 1953: .B \-Wnested-externs 1954: Warn if an \c 1955: .B extern\c 1956: \& declaration is encountered within an function. 1957: .TP 1.1 root 1958: .B \-Wenum\-clash 1.1.1.5 root 1959: Warn about conversion between different enumeration types (C++ only). 1.1 root 1960: .TP 1961: .B \-Woverloaded\-virtual 1.1.1.5 root 1962: (C++ only.) 1.1 root 1963: In a derived class, the definitions of virtual functions must match 1964: the type signature of a virtual function declared in the base class. 1965: Use this option to request warnings when a derived class declares a 1966: function that may be an erroneous attempt to define a virtual 1967: function: that is, warn when a function with the same name as a 1968: virtual function in the base class, but with a type signature that 1969: doesn't match any virtual functions from the base class. 1.1.1.2 root 1970: .TP 1971: .B \-Winline 1972: Warn if a function can not be inlined, and either it was declared as inline, 1973: or else the 1974: .B \-finline\-functions 1975: option was given. 1976: .TP 1977: .B \-Werror 1978: Treat warnings as errors; abort compilation after any warning. 1.1 root 1979: .SH DEBUGGING OPTIONS 1980: GNU CC has various special options that are used for debugging 1981: either your program or GCC: 1982: .TP 1983: .B \-g 1984: Produce debugging information in the operating system's native format 1.1.1.5 root 1985: (stabs, COFF, XCOFF, or DWARF). GDB can work with this debugging 1986: information. 1.1.1.6 root 1987: .Sp 1.1.1.5 root 1988: On most systems that use stabs format, `\|\c 1.1 root 1989: .B \-g\c 1.1.1.5 root 1990: \&\|' enables use of extra 1991: debugging information that only GDB can use; this extra information 1992: makes debugging work better in GDB but will probably make other debuggers 1993: crash or 1994: refuse to read the program. If you want to control for certain whether 1995: to generate the extra information, use `\|\c 1996: .B \-gstabs+\c 1997: \&\|', `\|\c 1998: .B \-gstabs\c 1999: \&\|', 1.1 root 2000: `\|\c 1.1.1.5 root 2001: .B \-gxcoff+\c 2002: \&\|', `\|\c 2003: .B \-gxcoff\c 2004: \&\|', `\|\c 2005: .B \-gdwarf+\c 2006: \&\|', or `\|\c 2007: .B \-gdwarf\c 2008: \&\|' 2009: (see below). 1.1.1.6 root 2010: .Sp 1.1 root 2011: Unlike most other C compilers, GNU CC allows you to use `\|\c 2012: .B \-g\c 2013: \&\|' with 2014: `\|\c 2015: .B \-O\c 2016: \&\|'. The shortcuts taken by optimized code may occasionally 2017: produce surprising results: some variables you declared may not exist 2018: at all; flow of control may briefly move where you did not expect it; 2019: some statements may not be executed because they compute constant 2020: results or their values were already at hand; some statements may 2021: execute in different places because they were moved out of loops. 1.1.1.6 root 2022: .Sp 1.1 root 2023: Nevertheless it proves possible to debug optimized output. This makes 2024: it reasonable to use the optimizer for programs that might have bugs. 1.1.1.6 root 2025: .PP 1.1.1.5 root 2026: The following options are useful when GNU CC is generated with the 2027: capability for more than one debugging format. 1.1 root 2028: .TP 2029: .B \-ggdb 1.1.1.5 root 2030: Produce debugging information in the native format (if that is supported), 2031: including GDB extensions if at all possible. 1.1 root 2032: .TP 1.1.1.5 root 2033: .B \-gstabs 2034: Produce debugging information in stabs format (if that is supported), 2035: without GDB extensions. This is the format used by DBX on most BSD 2036: systems. 1.1 root 2037: .TP 1.1.1.5 root 2038: .B \-gstabs+ 2039: Produce debugging information in stabs format (if that is supported), 2040: using GNU extensions understood only by the GNU debugger (GDB). The 2041: use of these extensions is likely to make other debuggers crash or 2042: refuse to read the program. 2043: .TP 2044: .B \-gcoff 2045: Produce debugging information in COFF format (if that is supported). 2046: This is the format used by SDB on most System V systems prior to 2047: System V Release 4. 2048: .TP 2049: .B \-gxcoff 2050: Produce debugging information in XCOFF format (if that is supported). 2051: This is the format used by the DBX debugger on IBM RS/6000 systems. 2052: .TP 2053: .B \-gxcoff+ 2054: Produce debugging information in XCOFF format (if that is supported), 2055: using GNU extensions understood only by the GNU debugger (GDB). The 2056: use of these extensions is likely to make other debuggers crash or 2057: refuse to read the program. 1.1 root 2058: .TP 2059: .B \-gdwarf 2060: Produce debugging information in DWARF format (if that is supported). 1.1.1.5 root 2061: This is the format used by SDB on most System V Release 4 systems. 2062: .TP 2063: .B \-gdwarf+ 2064: Produce debugging information in DWARF format (if that is supported), 2065: using GNU extensions understood only by the GNU debugger (GDB). The 2066: use of these extensions is likely to make other debuggers crash or 2067: refuse to read the program. 1.1 root 2068: .PP 2069: .BI "\-g" "level" 2070: .br 2071: .BI "\-ggdb" "level" 2072: .br 1.1.1.5 root 2073: .BI "\-gstabs" "level" 1.1 root 2074: .br 1.1.1.5 root 2075: .BI "\-gcoff" "level" 2076: .BI "\-gxcoff" "level" 1.1 root 2077: .TP 2078: .BI "\-gdwarf" "level" 2079: Request debugging information and also use \c 2080: .I level\c 2081: \& to specify how 2082: much information. The default level is 2. 1.1.1.6 root 2083: .Sp 1.1 root 2084: Level 1 produces minimal information, enough for making backtraces in 2085: parts of the program that you don't plan to debug. This includes 2086: descriptions of functions and external variables, but no information 2087: about local variables and no line numbers. 1.1.1.6 root 2088: .Sp 1.1.1.5 root 2089: Level 3 includes extra information, such as all the macro definitions 2090: present in the program. Some debuggers support macro expansion when 2091: you use `\|\c 2092: .B \-g3\c 2093: \&\|'. 1.1 root 2094: .TP 2095: .B \-p 2096: Generate extra code to write profile information suitable for the 2097: analysis program \c 2098: .B prof\c 2099: \&. 2100: .TP 2101: .B \-pg 2102: Generate extra code to write profile information suitable for the 2103: analysis program \c 2104: .B gprof\c 2105: \&. 2106: .TP 2107: .B \-a 2108: Generate extra code to write profile information for basic blocks, 2109: which will record the number of times each basic block is executed. 2110: This data could be analyzed by a program like \c 2111: .B tcov\c 2112: \&. Note, 2113: however, that the format of the data is not what \c 2114: .B tcov\c 2115: \& expects. 2116: Eventually GNU \c 2117: .B gprof\c 2118: \& should be extended to process this data. 2119: .TP 1.1.1.6 root 2120: .BI "\-d" "letters" 1.1 root 2121: Says to make debugging dumps during compilation at times specified by 2122: .I letters\c 2123: \&. This is used for debugging the compiler. The file names 2124: for most of the dumps are made by appending a word to the source file 2125: name (e.g. `\|\c 2126: .B foo.c.rtl\c 2127: \&\|' or `\|\c 2128: .B foo.c.jump\c 2129: \&\|'). 2130: .TP 2131: .B \-dM 2132: Dump all macro definitions, at the end of preprocessing, and write no 2133: output. 2134: .TP 2135: .B \-dN 2136: Dump all macro names, at the end of preprocessing. 2137: .TP 2138: .B \-dD 2139: Dump all macro definitions, at the end of preprocessing, in addition to 2140: normal output. 2141: .TP 2142: .B \-dy 2143: Dump debugging information during parsing, to standard error. 2144: .TP 2145: .B \-dr 2146: Dump after RTL generation, to `\|\c 2147: .I file\c 1.1.1.6 root 2148: .B \&.rtl\c 1.1 root 2149: \&\|'. 2150: .TP 2151: .B \-dx 2152: Just generate RTL for a function instead of compiling it. Usually used 2153: with `\|\c 2154: .B r\c 2155: \&\|'. 2156: .TP 2157: .B \-dj 2158: Dump after first jump optimization, to `\|\c 2159: .I file\c 1.1.1.6 root 2160: .B \&.jump\c 1.1 root 2161: \&\|'. 2162: .TP 2163: .B \-ds 2164: Dump after CSE (including the jump optimization that sometimes 2165: follows CSE), to `\|\c 2166: .I file\c 1.1.1.6 root 2167: .B \&.cse\c 1.1 root 2168: \&\|'. 2169: .TP 2170: .B \-dL 2171: Dump after loop optimization, to `\|\c 2172: .I file\c 1.1.1.6 root 2173: .B \&.loop\c 1.1 root 2174: \&\|'. 2175: .TP 2176: .B \-dt 2177: Dump after the second CSE pass (including the jump optimization that 2178: sometimes follows CSE), to `\|\c 2179: .I file\c 1.1.1.6 root 2180: .B \&.cse2\c 1.1 root 2181: \&\|'. 2182: .TP 2183: .B \-df 2184: Dump after flow analysis, to `\|\c 2185: .I file\c 1.1.1.6 root 2186: .B \&.flow\c 1.1 root 2187: \&\|'. 2188: .TP 2189: .B \-dc 2190: Dump after instruction combination, to `\|\c 2191: .I file\c 1.1.1.6 root 2192: .B \&.combine\c 1.1 root 2193: \&\|'. 2194: .TP 2195: .B \-dS 2196: Dump after the first instruction scheduling pass, to 2197: `\|\c 2198: .I file\c 1.1.1.6 root 2199: .B \&.sched\c 1.1 root 2200: \&\|'. 2201: .TP 2202: .B \-dl 2203: Dump after local register allocation, to `\|\c 2204: .I file\c 1.1.1.6 root 2205: .B \&.lreg\c 1.1 root 2206: \&\|'. 2207: .TP 2208: .B \-dg 2209: Dump after global register allocation, to `\|\c 2210: .I file\c 1.1.1.6 root 2211: .B \&.greg\c 1.1 root 2212: \&\|'. 2213: .TP 2214: .B \-dR 2215: Dump after the second instruction scheduling pass, to 2216: `\|\c 2217: .I file\c 1.1.1.6 root 2218: .B \&.sched2\c 1.1 root 2219: \&\|'. 2220: .TP 2221: .B \-dJ 2222: Dump after last jump optimization, to `\|\c 2223: .I file\c 1.1.1.6 root 2224: .B \&.jump2\c 1.1 root 2225: \&\|'. 2226: .TP 2227: .B \-dd 2228: Dump after delayed branch scheduling, to `\|\c 2229: .I file\c 1.1.1.6 root 2230: .B \&.dbr\c 1.1 root 2231: \&\|'. 2232: .TP 2233: .B \-dk 2234: Dump after conversion from registers to stack, to `\|\c 2235: .I file\c 1.1.1.6 root 2236: .B \&.stack\c 1.1 root 2237: \&\|'. 2238: .TP 1.1.1.5 root 2239: .B \-da 2240: Produce all the dumps listed above. 2241: .TP 1.1 root 2242: .B \-dm 2243: Print statistics on memory usage, at the end of the run, to 2244: standard error. 2245: .TP 2246: .B \-dp 2247: Annotate the assembler output with a comment indicating which 2248: pattern and alternative was used. 2249: .TP 2250: .B \-fpretend\-float 2251: When running a cross-compiler, pretend that the target machine uses the 2252: same floating point format as the host machine. This causes incorrect 2253: output of the actual floating constants, but the actual instruction 2254: sequence will probably be the same as GNU CC would make when running on 2255: the target machine. 2256: .TP 2257: .B \-save\-temps 1.1.1.6 root 2258: Store the usual \*(lqtemporary\*(rq intermediate files permanently; place them 1.1 root 2259: in the current directory and name them based on the source file. Thus, 2260: compiling `\|\c 2261: .B foo.c\c 2262: \&\|' with `\|\c 2263: .B \-c \-save\-temps\c 2264: \&\|' would produce files 2265: `\|\c 2266: .B foo.cpp\c 2267: \&\|' and `\|\c 2268: .B foo.s\c 2269: \&\|', as well as `\|\c 2270: .B foo.o\c 2271: \&\|'. 1.1.1.5 root 2272: .TP 1.1.1.7 ! root 2273: .BI "\-print\-file\-name=" "library" ! 2274: Print the full absolute name of the library file \|\c ! 2275: .nh ! 2276: .I library ! 2277: .hy ! 2278: \&\| that 1.1.1.5 root 2279: would be used when linking\(em\&and do not do anything else. With this 2280: option, GNU CC does not compile or link anything; it just prints the 2281: file name. 1.1.1.7 ! root 2282: .TP ! 2283: .B \-print\-libgcc\-file\-name ! 2284: Same as `\|\c ! 2285: .B \-print\-file\-name=libgcc.a\c ! 2286: \&\|'. ! 2287: .TP ! 2288: .BI "\-print\-prog\-name=" "program" ! 2289: Like `\|\c ! 2290: .B \-print\-file\-name\c ! 2291: \&\|', but searches for a program such as `\|\c ! 2292: cpp\c ! 2293: \&\|'. 1.1 root 2294: .SH OPTIMIZATION OPTIONS 2295: These options control various sorts of optimizations: 1.1.1.6 root 2296: .TP 1.1 root 2297: .B \-O 1.1.1.5 root 2298: .TP 2299: .B \-O1 1.1 root 2300: Optimize. Optimizing compilation takes somewhat more time, and a lot 2301: more memory for a large function. 1.1.1.6 root 2302: .Sp 1.1 root 2303: Without `\|\c 2304: .B \-O\c 2305: \&\|', the compiler's goal is to reduce the cost of 2306: compilation and to make debugging produce the expected results. 2307: Statements are independent: if you stop the program with a breakpoint 2308: between statements, you can then assign a new value to any variable or 2309: change the program counter to any other statement in the function and 2310: get exactly the results you would expect from the source code. 1.1.1.6 root 2311: .Sp 1.1 root 2312: Without `\|\c 2313: .B \-O\c 2314: \&\|', only variables declared \c 2315: .B register\c 2316: \& are 2317: allocated in registers. The resulting compiled code is a little worse 2318: than produced by PCC without `\|\c 2319: .B \-O\c 2320: \&\|'. 1.1.1.6 root 2321: .Sp 1.1 root 2322: With `\|\c 2323: .B \-O\c 2324: \&\|', the compiler tries to reduce code size and execution 2325: time. 1.1.1.6 root 2326: .Sp 1.1 root 2327: When you specify `\|\c 2328: .B \-O\c 1.1.1.7 ! root 2329: \&\|', the two options `\|\c 1.1 root 2330: .B \-fthread\-jumps\c 1.1.1.7 ! root 2331: \&\|' and `\|\c ! 2332: .B \-fdefer\-pop\c ! 2333: \&\|' are turned on. On machines that have delay slots, the `\|\c 1.1 root 2334: .B \-fdelayed\-branch\c 1.1.1.7 ! root 2335: \&\|' option is turned on. For those machines that can support debugging even ! 2336: without a frame pointer, the `\|\c ! 2337: .B \-fomit\-frame\-pointer\c ! 2338: \&\|' option is turned on. On some machines other flags may also be turned on. 1.1 root 2339: .TP 2340: .B \-O2 1.1.1.5 root 2341: Optimize even more. Nearly all supported optimizations that do not 1.1.1.7 ! root 2342: involve a space-speed tradeoff are performed. Loop unrolling and function ! 2343: inlining are not done, for example. As compared to 1.1 root 2344: .B \-O\c 1.1.1.5 root 2345: \&, 2346: this option increases both compilation time and the performance of the 1.1 root 2347: generated code. 1.1.1.7 ! root 2348: .TP ! 2349: .B \-O3 ! 2350: Optimize yet more. This turns on everything 1.1.1.5 root 2351: .B \-O2 1.1.1.7 ! root 2352: does, along with also turning on ! 2353: .B \-finline\-functions. 1.1.1.5 root 2354: .TP 2355: .B \-O0 2356: Do not optimize. 1.1.1.6 root 2357: .Sp 1.1.1.5 root 2358: If you use multiple 2359: .B \-O 2360: options, with or without level numbers, the last such option is the 2361: one that is effective. 1.1 root 2362: .PP 2363: Options of the form `\|\c 2364: .B \-f\c 2365: .I flag\c 2366: \&\c 2367: \&\|' specify machine-independent 2368: flags. Most flags have both positive and negative forms; the negative 2369: form of `\|\c 2370: .B \-ffoo\c 2371: \&\|' would be `\|\c 2372: .B \-fno\-foo\c 2373: \&\|'. The following list shows 2374: only one form\(em\&the one which is not the default. 2375: You can figure out the other form by either removing `\|\c 2376: .B no\-\c 2377: \&\|' or 2378: adding it. 2379: .TP 2380: .B \-ffloat\-store 2381: Do not store floating point variables in registers. This 2382: prevents undesirable excess precision on machines such as the 2383: 68000 where the floating registers (of the 68881) keep more 2384: precision than a \c 2385: .B double\c 2386: \& is supposed to have. 1.1.1.6 root 2387: .Sp 1.1 root 2388: For most programs, the excess precision does only good, but a few 2389: programs rely on the precise definition of IEEE floating point. 2390: Use `\|\c 2391: .B \-ffloat\-store\c 2392: \&\|' for such programs. 2393: .TP 2394: .B \-fmemoize\-lookups 2395: .TP 2396: .B \-fsave\-memoized 1.1.1.5 root 2397: Use heuristics to compile faster (C++ only). These heuristics are not 2398: enabled by default, since they are only effective for certain input 2399: files. Other input files compile more slowly. 1.1.1.6 root 2400: .Sp 1.1 root 2401: The first time the compiler must build a call to a member function (or 2402: reference to a data member), it must (1) determine whether the class 2403: implements member functions of that name; (2) resolve which member 2404: function to call (which involves figuring out what sorts of type 2405: conversions need to be made); and (3) check the visibility of the member 2406: function to the caller. All of this adds up to slower compilation. 2407: Normally, the second time a call is made to that member function (or 2408: reference to that data member), it must go through the same lengthy 2409: process again. This means that code like this 1.1.1.6 root 2410: .Sp 2411: \& cout << "This " << p << " has " << n << " legs.\en"; 2412: .Sp 1.1 root 2413: makes six passes through all three steps. By using a software cache, 1.1.1.6 root 2414: a \*(lqhit\*(rq significantly reduces this cost. Unfortunately, using the 1.1 root 2415: cache introduces another layer of mechanisms which must be implemented, 2416: and so incurs its own overhead. `\|\c 2417: .B \-fmemoize\-lookups\c 2418: \&\|' enables 2419: the software cache. 1.1.1.6 root 2420: .Sp 1.1 root 2421: Because access privileges (visibility) to members and member functions 1.1.1.6 root 2422: may differ from one function context to the next, 1.1 root 2423: .B g++ 1.1.1.5 root 2424: may need to flush the cache. With the `\|\c 1.1 root 2425: .B \-fmemoize\-lookups\c 2426: \&\|' flag, the cache is flushed after every 2427: function that is compiled. The `\|\c 2428: \-fsave\-memoized\c 2429: \&\|' flag enables the same software cache, but when the compiler 2430: determines that the context of the last function compiled would yield 2431: the same access privileges of the next function to compile, it 1.1.1.6 root 2432: preserves the cache. 1.1 root 2433: This is most helpful when defining many member functions for the same 2434: class: with the exception of member functions which are friends of 2435: other classes, each member function has exactly the same access 2436: privileges as every other, and the cache need not be flushed. 2437: .TP 2438: .B \-fno\-default\-inline 1.1.1.5 root 2439: Don't make member functions inline by default merely because they are 2440: defined inside the class scope (C++ only). 1.1 root 2441: .TP 2442: .B \-fno\-defer\-pop 2443: Always pop the arguments to each function call as soon as that 2444: function returns. For machines which must pop arguments after a 2445: function call, the compiler normally lets arguments accumulate on the 2446: stack for several function calls and pops them all at once. 2447: .TP 2448: .B \-fforce\-mem 2449: Force memory operands to be copied into registers before doing 2450: arithmetic on them. This may produce better code by making all 2451: memory references potential common subexpressions. When they are 2452: not common subexpressions, instruction combination should 2453: eliminate the separate register-load. I am interested in hearing 2454: about the difference this makes. 2455: .TP 2456: .B \-fforce\-addr 2457: Force memory address constants to be copied into registers before 2458: doing arithmetic on them. This may produce better code just as 2459: `\|\c 2460: .B \-fforce\-mem\c 2461: \&\|' may. I am interested in hearing about the 2462: difference this makes. 2463: .TP 2464: .B \-fomit\-frame\-pointer 2465: Don't keep the frame pointer in a register for functions that 2466: don't need one. This avoids the instructions to save, set up and 2467: restore frame pointers; it also makes an extra register available 2468: in many functions. \c 2469: .I It also makes debugging impossible on 1.1.1.6 root 2470: most machines. 2471: .Sp 1.1 root 2472: On some machines, such as the Vax, this flag has no effect, because 2473: the standard calling sequence automatically handles the frame pointer 2474: and nothing is saved by pretending it doesn't exist. The 2475: machine-description macro \c 2476: .B FRAME_POINTER_REQUIRED\c 2477: \& controls 1.1.1.6 root 2478: whether a target machine supports this flag. 1.1 root 2479: .TP 2480: .B \-finline\-functions 2481: Integrate all simple functions into their callers. The compiler 2482: heuristically decides which functions are simple enough to be worth 2483: integrating in this way. 1.1.1.6 root 2484: .Sp 1.1 root 2485: If all calls to a given function are integrated, and the function is 2486: declared \c 2487: .B static\c 2488: \&, then GCC normally does not output the function as 2489: assembler code in its own right. 2490: .TP 2491: .B \-fcaller\-saves 2492: Enable values to be allocated in registers that will be clobbered by 2493: function calls, by emitting extra instructions to save and restore the 2494: registers around such calls. Such allocation is done only when it 2495: seems to result in better code than would otherwise be produced. 1.1.1.6 root 2496: .Sp 1.1 root 2497: This option is enabled by default on certain machines, usually those 2498: which have no call-preserved registers to use instead. 2499: .TP 2500: .B \-fkeep\-inline\-functions 2501: Even if all calls to a given function are integrated, and the function 2502: is declared \c 2503: .B static\c 2504: \&, nevertheless output a separate run-time 2505: callable version of the function. 2506: .TP 2507: .B \-fno\-function\-cse 2508: Do not put function addresses in registers; make each instruction that 2509: calls a constant function contain the function's address explicitly. 1.1.1.6 root 2510: .Sp 1.1 root 2511: This option results in less efficient code, but some strange hacks 2512: that alter the assembler output may be confused by the optimizations 2513: performed when this option is not used. 1.1.1.5 root 2514: .TP 2515: .B \-fno\-peephole 2516: Disable any machine-specific peephole optimizations. 2517: .TP 2518: .B \-ffast-math 2519: This option allows GCC to violate some ANSI or IEEE rules/specifications 2520: in the interest of optimizing code for speed. For example, it allows 2521: the compiler to assume arguments to the \c 2522: .B sqrt\c 1.1.1.6 root 2523: \& function are 2524: non-negative numbers. 2525: .Sp 1.1.1.5 root 2526: This option should never be turned on by any `\|\c 2527: .B \-O\c 1.1.1.6 root 2528: \&\|' option since 2529: it can result in incorrect output for programs which depend on 1.1.1.5 root 2530: an exact implementation of IEEE or ANSI rules/specifications for 2531: math functions. 1.1 root 2532: .PP 2533: The following options control specific optimizations. The `\|\c 2534: .B \-O2\c 2535: \&\|' 2536: option turns on all of these optimizations except `\|\c 2537: .B \-funroll\-loops\c 2538: \&\|' 2539: and `\|\c 2540: .B \-funroll\-all\-loops\c 1.1.1.6 root 2541: \&\|'. 2542: .PP 1.1 root 2543: The `\|\c 2544: .B \-O\c 2545: \&\|' option usually turns on 2546: the `\|\c 2547: .B \-fthread\-jumps\c 2548: \&\|' and `\|\c 2549: .B \-fdelayed\-branch\c 2550: \&\|' options, but 2551: specific machines may change the default optimizations. 1.1.1.6 root 2552: .PP 2553: You can use the following flags in the rare cases when \*(lqfine-tuning\*(rq 1.1 root 2554: of optimizations to be performed is desired. 2555: .TP 2556: .B \-fstrength\-reduce 2557: Perform the optimizations of loop strength reduction and 2558: elimination of iteration variables. 2559: .TP 2560: .B \-fthread\-jumps 2561: Perform optimizations where we check to see if a jump branches to a 2562: location where another comparison subsumed by the first is found. If 2563: so, the first branch is redirected to either the destination of the 2564: second branch or a point immediately following it, depending on whether 2565: the condition is known to be true or false. 2566: .TP 2567: .B \-funroll\-loops 2568: Perform the optimization of loop unrolling. This is only done for loops 2569: whose number of iterations can be determined at compile time or run time. 2570: .TP 2571: .B \-funroll\-all\-loops 2572: Perform the optimization of loop unrolling. This is done for all loops. 2573: This usually makes programs run more slowly. 2574: .TP 2575: .B \-fcse\-follow\-jumps 1.1.1.5 root 2576: In common subexpression elimination, scan through jump instructions 2577: when the target of the jump is not reached by any other path. For 2578: example, when CSE encounters an \c 2579: .B if\c 2580: \& statement with an 2581: .B else\c 2582: \& clause, CSE will follow the jump when the condition 2583: tested is false. 2584: .TP 2585: .B \-fcse\-skip\-blocks 2586: This is similar to `\|\c 2587: .B \-fcse\-follow\-jumps\c 2588: \&\|', but causes CSE to 2589: follow jumps which conditionally skip over blocks. When CSE 2590: encounters a simple \c 2591: .B if\c 2592: \& statement with no else clause, 2593: `\|\c 2594: .B \-fcse\-skip\-blocks\c 2595: \&\|' causes CSE to follow the jump around the 2596: body of the \c 2597: .B if\c 2598: \&. 1.1 root 2599: .TP 2600: .B \-frerun\-cse\-after\-loop 2601: Re-run common subexpression elimination after loop optimizations has been 1.1.1.6 root 2602: performed. 1.1 root 2603: .TP 2604: .B \-felide\-constructors 1.1.1.5 root 2605: Elide constructors when this seems plausible (C++ only). With this 2606: flag, GNU C++ initializes \c 2607: .B y\c 2608: \& directly from the call to \c 1.1.1.6 root 2609: .B foo 1.1.1.5 root 2610: without going through a temporary in the following code: 1.1.1.6 root 2611: .Sp 2612: A foo (); 2613: A y = foo (); 2614: .Sp 1.1.1.5 root 2615: Without this option, GNU C++ first initializes \c 1.1 root 2616: .B y\c 1.1.1.5 root 2617: \& by calling the 2618: appropriate constructor for type \c 2619: .B A\c 2620: \&; then assigns the result of 2621: .B foo\c 2622: \& to a temporary; and, finally, replaces the initial valyue of 2623: `\|\c 2624: .B y\c 2625: \&\|' with the temporary. 1.1.1.6 root 2626: .Sp 1.1.1.5 root 2627: The default behavior (`\|\c 2628: .B \-fno\-elide\-constructors\c 2629: \&\|') is specified by 2630: the draft ANSI C++ standard. If your program's constructors have side 2631: effects, using `\|\c 2632: .B \-felide-constructors\c 2633: \&\|' can make your program act 2634: differently, since some constructor calls may be omitted. 1.1 root 2635: .TP 2636: .B \-fexpensive\-optimizations 2637: Perform a number of minor optimizations that are relatively expensive. 2638: .TP 2639: .B \-fdelayed\-branch 2640: If supported for the target machine, attempt to reorder instructions 2641: to exploit instruction slots available after delayed branch 2642: instructions. 2643: .TP 2644: .B \-fschedule\-insns 2645: If supported for the target machine, attempt to reorder instructions to 2646: eliminate execution stalls due to required data being unavailable. This 2647: helps machines that have slow floating point or memory load instructions 2648: by allowing other instructions to be issued until the result of the load 2649: or floating point instruction is required. 2650: .TP 2651: .B \-fschedule\-insns2 2652: Similar to `\|\c 2653: .B \-fschedule\-insns\c 2654: \&\|', but requests an additional pass of 2655: instruction scheduling after register allocation has been done. This is 2656: especially useful on machines with a relatively small number of 2657: registers and where memory load instructions take more than one cycle. 2658: .SH TARGET OPTIONS 2659: By default, GNU CC compiles code for the same type of machine that you 2660: are using. However, it can also be installed as a cross-compiler, to 2661: compile for some other type of machine. In fact, several different 2662: configurations of GNU CC, for different target machines, can be 2663: installed side by side. Then you specify which one to use with the 2664: `\|\c 2665: .B \-b\c 2666: \&\|' option. 1.1.1.6 root 2667: .PP 1.1 root 2668: In addition, older and newer versions of GNU CC can be installed side 2669: by side. One of them (probably the newest) will be the default, but 2670: you may sometimes wish to use another. 2671: .TP 1.1.1.6 root 2672: .BI "\-b " "machine" 1.1 root 2673: The argument \c 2674: .I machine\c 2675: \& specifies the target machine for compilation. 2676: This is useful when you have installed GNU CC as a cross-compiler. 1.1.1.6 root 2677: .Sp 1.1 root 2678: The value to use for \c 2679: .I machine\c 2680: \& is the same as was specified as the 2681: machine type when configuring GNU CC as a cross-compiler. For 2682: example, if a cross-compiler was configured with `\|\c 2683: .B configure 2684: i386v\c 2685: \&\|', meaning to compile for an 80386 running System V, then you 2686: would specify `\|\c 2687: .B \-b i386v\c 2688: \&\|' to run that cross compiler. 1.1.1.6 root 2689: .Sp 1.1 root 2690: When you do not specify `\|\c 2691: .B \-b\c 2692: \&\|', it normally means to compile for 2693: the same type of machine that you are using. 2694: .TP 1.1.1.6 root 2695: .BI "\-V " "version" 1.1 root 2696: The argument \c 2697: .I version\c 2698: \& specifies which version of GNU CC to run. 2699: This is useful when multiple versions are installed. For example, 2700: .I version\c 2701: \& might be `\|\c 2702: .B 2.0\c 2703: \&\|', meaning to run GNU CC version 2.0. 1.1.1.6 root 2704: .Sp 1.1 root 2705: The default version, when you do not specify `\|\c 2706: .B \-V\c 2707: \&\|', is controlled 2708: by the way GNU CC is installed. Normally, it will be a version that 2709: is recommended for general use. 2710: .SH MACHINE DEPENDENT OPTIONS 2711: Each of the target machine types can have its own special options, 2712: starting with `\|\c 2713: .B \-m\c 2714: \&\|', to choose among various hardware models or 2715: configurations\(em\&for example, 68010 vs 68020, floating coprocessor or 2716: none. A single installed version of the compiler can compile for any 2717: model or configuration, according to the options specified. 1.1.1.6 root 2718: .PP 1.1.1.5 root 2719: Some configurations of the compiler also support additional special 2720: options, usually for command-line compatibility with other compilers on 2721: the same platform. 1.1.1.6 root 2722: .PP 1.1 root 2723: These are the `\|\c 2724: .B \-m\c 2725: \&\|' options defined for the 68000 series: 2726: .TP 1.1.1.5 root 2727: .B \-m68000 2728: .TP 2729: .B \-mc68000 2730: Generate output for a 68000. This is the default when the compiler is 2731: configured for 68000-based systems. 2732: .TP 1.1 root 2733: .B \-m68020 2734: .TP 2735: .B \-mc68020 2736: Generate output for a 68020 (rather than a 68000). This is the 1.1.1.5 root 2737: default when the compiler is configured for 68020-based systems. 1.1 root 2738: .TP 2739: .B \-m68881 2740: Generate output containing 68881 instructions for floating point. 1.1.1.6 root 2741: This is the default for most 68020-based systems unless 1.1.1.5 root 2742: .B \-nfp 2743: was specified when the compiler was configured. 2744: .TP 2745: .B \-m68030 2746: Generate output for a 68030. This is the default when the compiler is 2747: configured for 68030-based systems. 2748: .TP 2749: .B \-m68040 2750: Generate output for a 68040. This is the default when the compiler is 2751: configured for 68040-based systems. 2752: .TP 2753: .B \-m68020\-40 2754: Generate output for a 68040, without using any of the new instructions. 2755: This results in code which can run relatively efficiently on either a 2756: 68020/68881 or a 68030 or a 68040. 1.1 root 2757: .TP 2758: .B \-mfpa 2759: Generate output containing Sun FPA instructions for floating point. 2760: .TP 2761: .B \-msoft\-float 2762: Generate output containing library calls for floating point. 2763: .I 1.1.1.6 root 2764: WARNING: 1.1 root 2765: the requisite libraries are not part of GNU CC. Normally the 2766: facilities of the machine's usual C compiler are used, but this can't 2767: be done directly in cross-compilation. You must make your own 2768: arrangements to provide suitable library functions for cross-compilation. 2769: .TP 2770: .B \-mshort 2771: Consider type \c 2772: .B int\c 2773: \& to be 16 bits wide, like \c 2774: .B short int\c 2775: \&. 2776: .TP 2777: .B \-mnobitfield 2778: Do not use the bit-field instructions. `\|\c 2779: .B \-m68000\c 2780: \&\|' implies 2781: `\|\c 2782: .B \-mnobitfield\c 2783: \&\|'. 2784: .TP 2785: .B \-mbitfield 2786: Do use the bit-field instructions. `\|\c 2787: .B \-m68020\c 2788: \&\|' implies 2789: `\|\c 2790: .B \-mbitfield\c 2791: \&\|'. This is the default if you use the unmodified 2792: sources. 2793: .TP 2794: .B \-mrtd 2795: Use a different function-calling convention, in which functions 2796: that take a fixed number of arguments return with the \c 1.1.1.6 root 2797: .B rtd 1.1 root 2798: instruction, which pops their arguments while returning. This 2799: saves one instruction in the caller since there is no need to pop 2800: the arguments there. 1.1.1.6 root 2801: .Sp 1.1 root 2802: This calling convention is incompatible with the one normally 2803: used on Unix, so you cannot use it if you need to call libraries 2804: compiled with the Unix compiler. 1.1.1.6 root 2805: .Sp 1.1 root 2806: Also, you must provide function prototypes for all functions that 2807: take variable numbers of arguments (including \c 2808: .B printf\c 2809: \&); 2810: otherwise incorrect code will be generated for calls to those 2811: functions. 1.1.1.6 root 2812: .Sp 1.1 root 2813: In addition, seriously incorrect code will result if you call a 2814: function with too many arguments. (Normally, extra arguments are 2815: harmlessly ignored.) 1.1.1.6 root 2816: .Sp 1.1 root 2817: The \c 2818: .B rtd\c 2819: \& instruction is supported by the 68010 and 68020 2820: processors, but not by the 68000. 2821: .PP 2822: These `\|\c 2823: .B \-m\c 2824: \&\|' options are defined for the Vax: 2825: .TP 2826: .B \-munix 2827: Do not output certain jump instructions (\c 2828: .B aobleq\c 2829: \& and so on) 2830: that the Unix assembler for the Vax cannot handle across long 2831: ranges. 2832: .TP 2833: .B \-mgnu 2834: Do output those jump instructions, on the assumption that you 2835: will assemble with the GNU assembler. 2836: .TP 2837: .B \-mg 2838: Output code for g-format floating point numbers instead of d-format. 2839: .PP 2840: These `\|\c 2841: .B \-m\c 1.1.1.5 root 2842: \&\|' switches are supported on the SPARC: 2843: .PP 1.1 root 2844: .B \-mfpu 1.1.1.5 root 2845: .TP 2846: .B \-mhard\-float 1.1 root 2847: Generate output containing floating point instructions. This is the 1.1.1.5 root 2848: default. 2849: .PP 2850: .B \-mno\-fpu 1.1 root 2851: .TP 1.1.1.5 root 2852: .B \-msoft\-float 2853: Generate output containing library calls for floating point. 2854: .I Warning: 2855: there is no GNU floating-point library for SPARC. 2856: Normally the facilities of the machine's usual C compiler are used, but 2857: this cannot be done directly in cross-compilation. You must make your 2858: own arrangements to provide suitable library functions for 2859: cross-compilation. 1.1.1.6 root 2860: .Sp 1.1.1.5 root 2861: .B \-msoft\-float 2862: changes the calling convention in the output file; 2863: therefore, it is only useful if you compile 2864: .I all 2865: of a program with this option. 2866: .PP 1.1 root 2867: .B \-mno\-epilogue 1.1.1.5 root 2868: .TP 2869: .B \-mepilogue 2870: With 2871: .B \-mepilogue 2872: (the default), the compiler always emits code for 2873: function exit at the end of each function. Any function exit in 2874: the middle of the function (such as a return statement in C) will 2875: generate a jump to the exit code at the end of the function. 1.1.1.6 root 2876: .Sp 1.1.1.5 root 2877: With 2878: .BR \-mno\-epilogue , 2879: the compiler tries to emit exit code inline at every function exit. 2880: .PP 1.1.1.7 ! root 2881: .B \-mno\-v8 ! 2882: .TP 1.1.1.5 root 2883: .B \-mv8 2884: .TP 2885: .B \-msparclite 1.1.1.7 ! root 2886: These three options select variations on the SPARC architecture. 1.1.1.6 root 2887: .Sp 1.1.1.5 root 2888: By default (unless specifically configured for the Fujitsu SPARClite), 2889: GCC generates code for the v7 variant of the SPARC architecture. 1.1.1.6 root 2890: .Sp 1.1.1.5 root 2891: .B \-mv8 2892: will give you SPARC v8 code. The only difference from v7 2893: code is that the compiler emits the integer multiply and integer 2894: divide instructions which exist in SPARC v8 but not in SPARC v7. 1.1.1.6 root 2895: .Sp 1.1.1.5 root 2896: .B \-msparclite 2897: will give you SPARClite code. This adds the integer 2898: multiply, integer divide step and scan (ffs) instructions which 2899: exist in SPARClite but not in SPARC v7. 1.1 root 2900: .PP 1.1.1.7 ! root 2901: .B \-mcypress ! 2902: .TP ! 2903: .B \-msupersparc ! 2904: These two options select the processor for which the code is optimised. ! 2905: .Sp ! 2906: With ! 2907: .B \-mcypress ! 2908: (the default), the compiler optimises code for the Cypress CY7C602 chip, as ! 2909: used in the SparcStation/SparcSever 3xx series. This is also apropriate for ! 2910: the older SparcStation 1, 2, IPX etc. ! 2911: .Sp ! 2912: With ! 2913: .B \-msupersparc ! 2914: the compiler optimises code for the SuperSparc cpu, as used in the SparcStation ! 2915: 10, 1000 and 2000 series. This flag also enables use of the full SPARC v8 ! 2916: instruction set. ! 2917: .PP 1.1 root 2918: These `\|\c 2919: .B \-m\c 2920: \&\|' options are defined for the Convex: 2921: .TP 2922: .B \-mc1 2923: Generate output for a C1. This is the default when the compiler is 2924: configured for a C1. 2925: .TP 2926: .B \-mc2 2927: Generate output for a C2. This is the default when the compiler is 2928: configured for a C2. 2929: .TP 2930: .B \-margcount 2931: Generate code which puts an argument count in the word preceding each 2932: argument list. Some nonportable Convex and Vax programs need this word. 2933: (Debuggers don't, except for functions with variable-length argument 2934: lists; this info is in the symbol table.) 2935: .TP 2936: .B \-mnoargcount 2937: Omit the argument count word. This is the default if you use the 2938: unmodified sources. 2939: .PP 2940: These `\|\c 2941: .B \-m\c 2942: \&\|' options are defined for the AMD Am29000: 2943: .TP 2944: .B \-mdw 2945: Generate code that assumes the DW bit is set, i.e., that byte and 2946: halfword operations are directly supported by the hardware. This is the 2947: default. 2948: .TP 2949: .B \-mnodw 2950: Generate code that assumes the DW bit is not set. 2951: .TP 2952: .B \-mbw 2953: Generate code that assumes the system supports byte and halfword write 2954: operations. This is the default. 2955: .TP 2956: .B \-mnbw 2957: Generate code that assumes the systems does not support byte and 2958: halfword write operations. This implies `\|\c 2959: .B \-mnodw\c 2960: \&\|'. 2961: .TP 2962: .B \-msmall 2963: Use a small memory model that assumes that all function addresses are 2964: either within a single 256 KB segment or at an absolute address of less 2965: than 256K. This allows the \c 2966: .B call\c 2967: \& instruction to be used instead 2968: of a \c 2969: .B const\c 2970: \&, \c 2971: .B consth\c 2972: \&, \c 2973: .B calli\c 2974: \& sequence. 2975: .TP 2976: .B \-mlarge 2977: Do not assume that the \c 2978: .B call\c 2979: \& instruction can be used; this is the 2980: default. 2981: .TP 2982: .B \-m29050 2983: Generate code for the Am29050. 2984: .TP 2985: .B \-m29000 2986: Generate code for the Am29000. This is the default. 2987: .TP 2988: .B \-mkernel\-registers 2989: Generate references to registers \c 2990: .B gr64-gr95\c 2991: \& instead of 2992: .B gr96-gr127\c 2993: \&. This option can be used when compiling kernel code 2994: that wants a set of global registers disjoint from that used by 2995: user-mode code. 1.1.1.6 root 2996: .Sp 1.1 root 2997: Note that when this option is used, register names in `\|\c 2998: .B \-f\c 2999: \&\|' flags 3000: must use the normal, user-mode, names. 3001: .TP 3002: .B \-muser\-registers 3003: Use the normal set of global registers, \c 3004: .B gr96-gr127\c 3005: \&. This is the 3006: default. 3007: .TP 3008: .B \-mstack\-check 3009: Insert a call to \c 1.1.1.6 root 3010: .B _\|_msp_check\c 1.1 root 3011: \& after each stack adjustment. This 3012: is often used for kernel code. 3013: .PP 3014: These `\|\c 3015: .B \-m\c 3016: \&\|' options are defined for Motorola 88K architectures: 3017: .TP 1.1.1.5 root 3018: .B \-m88000 3019: Generate code that works well on both the m88100 and the 3020: m88110. 3021: .TP 3022: .B \-m88100 3023: Generate code that works best for the m88100, but that also 3024: runs on the m88110. 3025: .TP 3026: .B \-m88110 3027: Generate code that works best for the m88110, and may not run 3028: on the m88100. 1.1 root 3029: .TP 3030: .B \-midentify\-revision 3031: Include an \c 3032: .B ident\c 3033: \& directive in the assembler output recording the 3034: source file name, compiler name and version, timestamp, and compilation 3035: flags used. 3036: .TP 3037: .B \-mno\-underscores 3038: In assembler output, emit symbol names without adding an underscore 3039: character at the beginning of each name. The default is to use an 3040: underscore as prefix on each name. 3041: .TP 3042: .B \-mno\-check\-zero\-division 3043: .TP 3044: .B \-mcheck\-zero\-division 3045: Early models of the 88K architecture had problems with division by zero; 3046: in particular, many of them didn't trap. Use these options to avoid 3047: including (or to include explicitly) additional code to detect division 3048: by zero and signal an exception. All GCC configurations for the 88K use 3049: `\|\c 3050: .B \-mcheck\-zero\-division\c 3051: \&\|' by default. 3052: .TP 3053: .B \-mocs\-debug\-info 3054: .TP 3055: .B \-mno\-ocs\-debug\-info 3056: Include (or omit) additional debugging information (about 3057: registers used in each stack frame) as specified in the 88Open Object 1.1.1.6 root 3058: Compatibility Standard, \*(lqOCS\*(rq. This extra information is not needed 1.1 root 3059: by GDB. The default for DG/UX, SVr4, and Delta 88 SVr3.2 is to 3060: include this information; other 88k configurations omit this information 3061: by default. 3062: .TP 3063: .B \-mocs\-frame\-position 3064: .TP 3065: .B \-mno\-ocs\-frame\-position 3066: Force (or do not require) register values to be stored in a particular 3067: place in stack frames, as specified in OCS. The DG/UX, Delta88 SVr3.2, 3068: and BCS configurations use `\|\c 3069: .B \-mocs\-frame\-position\c 3070: \&\|'; other 88k 3071: configurations have the default `\|\c 3072: .B \-mno\-ocs\-frame\-position\c 3073: \&\|'. 3074: .TP 3075: .B \-moptimize\-arg\-area 3076: .TP 3077: .B \-mno\-optimize\-arg\-area 3078: Control how to store function arguments in stack frames. 3079: `\|\c 3080: .B \-moptimize\-arg\-area\c 3081: \&\|' saves space, but may break some 3082: debuggers (not GDB). `\|\c 3083: .B \-mno\-optimize\-arg\-area\c 3084: \&\|' conforms better to 3085: standards. By default GCC does not optimize the argument area. 3086: .TP 1.1.1.6 root 3087: .BI "\-mshort\-data\-" "num" 3088: .I num 1.1 root 3089: Generate smaller data references by making them relative to \c 3090: .B r0\c 3091: \&, 3092: which allows loading a value using a single instruction (rather than the 3093: usual two). You control which data references are affected by 3094: specifying \c 3095: .I num\c 3096: \& with this option. For example, if you specify 3097: `\|\c 3098: .B \-mshort\-data\-512\c 3099: \&\|', then the data references affected are those 3100: involving displacements of less than 512 bytes. 3101: `\|\c 3102: .B \-mshort\-data\-\c 3103: .I num\c 3104: \&\c 3105: \&\|' is not effective for \c 3106: .I num\c 3107: \& greater 3108: than 64K. 1.1.1.5 root 3109: .PP 3110: .B \-mserialize-volatile 1.1 root 3111: .TP 1.1.1.5 root 3112: .B \-mno-serialize-volatile 3113: Do, or do not, generate code to guarantee sequential consistency of 3114: volatile memory references. 1.1.1.6 root 3115: .Sp 1.1.1.5 root 3116: GNU CC always guarantees consistency by default, for the preferred 3117: processor submodel. How this is done depends on the submodel. 1.1.1.6 root 3118: .Sp 1.1.1.5 root 3119: The m88100 processor does not reorder memory references and so always 3120: provides sequential consistency. If you use `\|\c 3121: .B \-m88100\c 3122: \&\|', GNU CC does 3123: not generate any special instructions for sequential consistency. 1.1.1.6 root 3124: .Sp 1.1.1.5 root 3125: The order of memory references made by the m88110 processor does not 3126: always match the order of the instructions requesting those references. 3127: In particular, a load instruction may execute before a preceding store 3128: instruction. Such reordering violates sequential consistency of 3129: volatile memory references, when there are multiple processors. When 3130: you use `\|\c 3131: .B \-m88000\c 3132: \&\|' or `\|\c 3133: .B \-m88110\c 3134: \&\|', GNU CC generates special 3135: instructions when appropriate, to force execution in the proper order. 1.1.1.6 root 3136: .Sp 1.1.1.5 root 3137: The extra code generated to guarantee consistency may affect the 3138: performance of your application. If you know that you can safely forgo 3139: this guarantee, you may use the option `\|\c 3140: .B \-mno-serialize-volatile\c 3141: \&\|'. 1.1.1.6 root 3142: .Sp 1.1.1.5 root 3143: If you use the `\|\c 3144: .B \-m88100\c 3145: \&\|' option but require sequential consistency 3146: when running on the m88110 processor, you should use 3147: `\|\c 3148: .B \-mserialize-volatile\c 3149: \&\|'. 3150: .PP 1.1 root 3151: .B \-msvr4 3152: .TP 3153: .B \-msvr3 3154: Turn on (`\|\c 3155: .B \-msvr4\c 3156: \&\|') or off (`\|\c 3157: .B \-msvr3\c 3158: \&\|') compiler extensions 3159: related to System V release 4 (SVr4). This controls the following: 3160: .TP 1.1.1.6 root 3161: \ \ \ \(bu 1.1 root 3162: Which variant of the assembler syntax to emit (which you can select 3163: independently using `\|\c 1.1.1.5 root 3164: .B \-mversion\-03.00\c 1.1.1.6 root 3165: \&\|'). 1.1 root 3166: .TP 3167: \ \ \ \(bu 3168: `\|\c 3169: .B \-msvr4\c 3170: \&\|' makes the C preprocessor recognize `\|\c 3171: .B #pragma weak\c 3172: \&\|' 3173: .TP 3174: \ \ \ \(bu 3175: `\|\c 3176: .B \-msvr4\c 3177: \&\|' makes GCC issue additional declaration directives used in 1.1.1.6 root 3178: SVr4. 1.1 root 3179: .PP 3180: `\|\c 3181: .B \-msvr3\c 3182: \&\|' is the default for all m88K configurations except 3183: the SVr4 configuration. 3184: .TP 3185: .B \-mtrap\-large\-shift 3186: .TP 3187: .B \-mhandle\-large\-shift 3188: Include code to detect bit-shifts of more than 31 bits; respectively, 3189: trap such shifts or emit code to handle them properly. By default GCC 3190: makes no special provision for large bit shifts. 3191: .TP 3192: .B \-muse\-div\-instruction 3193: Very early models of the 88K architecture didn't have a divide 3194: instruction, so GCC avoids that instruction by default. Use this option 1.1.1.6 root 3195: to specify that it's safe to use the divide instruction. 1.1 root 3196: .TP 3197: .B \-mversion\-03.00 1.1.1.5 root 3198: In the DG/UX configuration, there are two flavors of SVr4. This option 3199: modifies 3200: .B \-msvr4 3201: to select whether the hybrid-COFF or real-ELF 3202: flavor is used. All other configurations ignore this option. 1.1 root 3203: .TP 3204: .B \-mwarn\-passed\-structs 3205: Warn when a function passes a struct as an argument or result. 3206: Structure-passing conventions have changed during the evolution of the C 3207: language, and are often the source of portability problems. By default, 3208: GCC issues no such warning. 3209: .PP 3210: These options are defined for the IBM RS6000: 3211: .PP 3212: .B \-mfp\-in\-toc 3213: .TP 3214: .B \-mno\-fp\-in\-toc 3215: Control whether or not floating-point constants go in the Table of 3216: Contents (TOC), a table of all global variable and function addresses. By 3217: default GCC puts floating-point constants there; if the TOC overflows, 3218: `\|\c 3219: .B \-mno\-fp\-in\-toc\c 3220: \&\|' will reduce the size of the TOC, which may avoid 3221: the overflow. 3222: .PP 3223: These `\|\c 3224: .B \-m\c 3225: \&\|' options are defined for the IBM RT PC: 3226: .TP 3227: .B \-min\-line\-mul 3228: Use an in-line code sequence for integer multiplies. This is the 3229: default. 3230: .TP 3231: .B \-mcall\-lib\-mul 3232: Call \c 3233: .B lmul$$\c 3234: \& for integer multiples. 3235: .TP 3236: .B \-mfull\-fp\-blocks 3237: Generate full-size floating point data blocks, including the minimum 3238: amount of scratch space recommended by IBM. This is the default. 3239: .TP 3240: .B \-mminimum\-fp\-blocks 3241: Do not include extra scratch space in floating point data blocks. This 3242: results in smaller code, but slower execution, since scratch space must 3243: be allocated dynamically. 3244: .TP 3245: .B \-mfp\-arg\-in\-fpregs 3246: Use a calling sequence incompatible with the IBM calling convention in 3247: which floating point arguments are passed in floating point registers. 3248: Note that \c 3249: .B varargs.h\c 3250: \& and \c 3251: .B stdargs.h\c 3252: \& will not work with 3253: floating point operands if this option is specified. 3254: .TP 3255: .B \-mfp\-arg\-in\-gregs 3256: Use the normal calling convention for floating point arguments. This is 3257: the default. 3258: .TP 3259: .B \-mhc\-struct\-return 3260: Return structures of more than one word in memory, rather than in a 3261: register. This provides compatibility with the MetaWare HighC (hc) 3262: compiler. Use `\|\c 3263: .B \-fpcc\-struct\-return\c 3264: \&\|' for compatibility with the 3265: Portable C Compiler (pcc). 3266: .TP 3267: .B \-mnohc\-struct\-return 3268: Return some structures of more than one word in registers, when 3269: convenient. This is the default. For compatibility with the 3270: IBM-supplied compilers, use either `\|\c 3271: .B \-fpcc\-struct\-return\c 3272: \&\|' or 3273: `\|\c 3274: .B \-mhc\-struct\-return\c 3275: \&\|'. 3276: .PP 3277: These `\|\c 3278: .B \-m\c 3279: \&\|' options are defined for the MIPS family of computers: 3280: .TP 3281: .BI "\-mcpu=" "cpu-type" 1.1.1.6 root 3282: Assume the defaults for the machine type 1.1 root 3283: .I cpu-type 3284: when 1.1.1.3 root 3285: scheduling instructions. The default 1.1 root 3286: .I cpu-type 3287: is 3288: .BR default , 3289: which picks the longest cycles times for any of the machines, in order 3290: that the code run at reasonable rates on all MIPS cpu's. Other 3291: choices for 3292: .I cpu-type 3293: are 3294: .BR r2000 , 3295: .BR r3000 , 3296: .BR r4000 , 3297: and 3298: .BR r6000 . 3299: While picking a specific 3300: .I cpu-type 3301: will schedule things appropriately for that particular chip, the 3302: compiler will not generate any code that does not meet level 1 of the 3303: MIPS ISA (instruction set architecture) without the 3304: .B \-mips2 3305: or 3306: .B \-mips3 3307: switches being used. 3308: .TP 3309: .B \-mips2 3310: Issue instructions from level 2 of the MIPS ISA (branch likely, square 1.1.1.6 root 3311: root instructions). The 1.1 root 3312: .B \-mcpu=r4000 3313: or 3314: .B \-mcpu=r6000 1.1.1.3 root 3315: switch must be used in conjunction with 1.1 root 3316: .BR \-mips2 . 3317: .TP 3318: .B \-mips3 3319: Issue instructions from level 3 of the MIPS ISA (64 bit instructions). 3320: The 3321: .B \-mcpu=r4000 1.1.1.3 root 3322: switch must be used in conjunction with 1.1 root 3323: .BR \-mips2 . 3324: .TP 3325: .B \-mint64 3326: .TP 3327: .B \-mlong64 3328: .TP 3329: .B \-mlonglong128 3330: These options don't work at present. 3331: .TP 3332: .B \-mmips\-as 3333: Generate code for the MIPS assembler, and invoke 3334: .B mips\-tfile 3335: to add normal debug information. This is the default for all 3336: platforms except for the OSF/1 reference platform, using the OSF/rose 1.1.1.2 root 3337: object format. If any of the 1.1 root 3338: .BR \-ggdb , 3339: .BR \-gstabs , 3340: or 3341: .B \-gstabs+ 3342: switches are used, the 3343: .B mips\-tfile 3344: program will encapsulate the stabs within MIPS ECOFF. 3345: .TP 3346: .B \-mgas 3347: Generate code for the GNU assembler. This is the default on the OSF/1 3348: reference platform, using the OSF/rose object format. 3349: .TP 3350: .B \-mrnames 3351: .TP 3352: .B \-mno\-rnames 3353: The 3354: .B \-mrnames 3355: switch says to output code using the MIPS software names for the 1.1.1.6 root 3356: registers, instead of the hardware names (ie, 1.1 root 3357: .B a0 3358: instead of 3359: .BR $4 ). 3360: The GNU assembler does not support the 3361: .B \-mrnames 3362: switch, and the MIPS assembler will be instructed to run the MIPS C 3363: preprocessor over the source file. The 3364: .B \-mno\-rnames 3365: switch is default. 3366: .TP 3367: .B \-mgpopt 3368: .TP 3369: .B \-mno\-gpopt 3370: The 3371: .B \-mgpopt 3372: switch says to write all of the data declarations before the 3373: instructions in the text section, to all the MIPS assembler to 3374: generate one word memory references instead of using two words for 3375: short global or static data items. This is on by default if 3376: optimization is selected. 3377: .TP 3378: .B \-mstats 3379: .TP 3380: .B \-mno\-stats 3381: For each non-inline function processed, the 3382: .B \-mstats 3383: switch causes the compiler to emit one line to the standard error file 3384: to print statistics about the program (number of registers saved, 3385: stack size, etc.). 3386: .TP 3387: .B \-mmemcpy 3388: .TP 3389: .B \-mno\-memcpy 3390: The 3391: .B \-mmemcpy 3392: switch makes all block moves call the appropriate string function 3393: .RB ( memcpy 3394: or 3395: .BR bcopy ) 3396: instead of possibly generating inline code. 3397: .TP 3398: .B \-mmips\-tfile 3399: .TP 3400: .B \-mno\-mips\-tfile 3401: The 3402: .B \-mno\-mips\-tfile 3403: switch causes the compiler not postprocess the object file with the 3404: .B mips\-tfile 3405: program, after the MIPS assembler has generated it to add debug 3406: support. If 3407: .B mips\-tfile 3408: is not run, then no local variables will be available to the debugger. 3409: In addition, 3410: .B stage2 3411: and 3412: .B stage3 3413: objects will have the temporary file names passed to the assembler 3414: embedded in the object file, which means the objects will not compare 3415: the same. 3416: .TP 3417: .B \-msoft\-float 3418: Generate output containing library calls for floating point. 3419: .I 1.1.1.6 root 3420: WARNING: 1.1 root 3421: the requisite libraries are not part of GNU CC. Normally the 3422: facilities of the machine's usual C compiler are used, but this can't 3423: be done directly in cross-compilation. You must make your own 3424: arrangements to provide suitable library functions for cross-compilation. 3425: .TP 3426: .B \-mhard\-float 3427: Generate output containing floating point instructions. This is the 3428: default if you use the unmodified sources. 3429: .TP 3430: .B \-mfp64 3431: Assume that the 3432: .B FR 3433: bit in the status word is on, and that there are 32 64-bit floating 3434: point registers, instead of 32 32-bit floating point registers. You 3435: must also specify the 3436: .B \-mcpu=r4000 3437: and 3438: .B \-mips3 3439: switches. 3440: .TP 3441: .B \-mfp32 3442: Assume that there are 32 32-bit floating point registers. This is the 3443: default. 1.1.1.5 root 3444: .PP 1.1 root 3445: .B \-mabicalls 1.1.1.5 root 3446: .TP 3447: .B \-mno\-abicalls 3448: Emit (or do not emit) the 1.1 root 3449: .BR \&.abicalls , 3450: .BR \&.cpload , 3451: and 3452: .B \&.cprestore 3453: pseudo operations that some System V.4 ports use for position 3454: independent code. 3455: .TP 3456: .B \-mhalf\-pic 3457: .TP 3458: .B \-mno\-half\-pic 3459: The 3460: .B \-mhalf\-pic 3461: switch says to put pointers to extern references into the data section 3462: and load them up, rather than put the references in the text section. 3463: This option does not work at present. 3464: .B 3465: .BI \-G num 1.1.1.6 root 3466: Put global and static items less than or equal to 1.1 root 3467: .I num 3468: bytes into the small data or bss sections instead of the normal data 3469: or bss section. This allows the assembler to emit one word memory 3470: reference instructions based on the global pointer 3471: .RB ( gp 3472: or 3473: .BR $28 ), 3474: instead of the normal two words used. By default, 3475: .I num 3476: is 8 when the MIPS assembler is used, and 0 when the GNU 3477: assembler is used. The 3478: .BI \-G num 3479: switch is also passed to the assembler and linker. All modules should 3480: be compiled with the same 3481: .BI \-G num 3482: value. 1.1.1.5 root 3483: .TP 3484: .B \-nocpp 3485: Tell the MIPS assembler to not run it's preprocessor over user 3486: assembler files (with a `\|\c 3487: .B .s\c 3488: \&\|' suffix) when assembling them. 3489: .PP 3490: These `\|\c 3491: .B \-m\c 3492: \&\|' options are defined for the Intel 80386 family of computers: 3493: .B \-m486 3494: .TP 3495: .B \-mno\-486 3496: Control whether or not code is optimized for a 486 instead of an 3497: 386. Code generated for a 486 will run on a 386 and vice versa. 3498: .TP 3499: .B \-msoft\-float 3500: Generate output containing library calls for floating point. 3501: .I Warning: 3502: the requisite libraries are not part of GNU CC. 3503: Normally the facilities of the machine's usual C compiler are used, but 3504: this can't be done directly in cross-compilation. You must make your 3505: own arrangements to provide suitable library functions for 3506: cross-compilation. 1.1.1.6 root 3507: .Sp 1.1.1.5 root 3508: On machines where a function returns floating point results in the 80387 3509: register stack, some floating point opcodes may be emitted even if 3510: `\|\c 3511: .B \-msoft-float\c 3512: \&\|' is used. 3513: .TP 3514: .B \-mno-fp-ret-in-387 3515: Do not use the FPU registers for return values of functions. 1.1.1.6 root 3516: .Sp 1.1.1.5 root 3517: The usual calling convention has functions return values of types 3518: .B float\c 3519: \& and \c 3520: .B double\c 3521: \& in an FPU register, even if there 3522: is no FPU. The idea is that the operating system should emulate 3523: an FPU. 1.1.1.6 root 3524: .Sp 1.1.1.5 root 3525: The option `\|\c 3526: .B \-mno-fp-ret-in-387\c 3527: \&\|' causes such values to be returned 3528: in ordinary CPU registers instead. 3529: .PP 3530: These `\|\c 3531: .B \-m\c 3532: \&\|' options are defined for the HPPA family of computers: 3533: .TP 3534: .B \-mpa-risc-1-0 3535: Generate code for a PA 1.0 processor. 3536: .TP 3537: .B \-mpa-risc-1-1 3538: Generate code for a PA 1.1 processor. 3539: .TP 3540: .B \-mkernel 3541: Generate code which is suitable for use in kernels. Specifically, avoid 3542: .B add\c 3543: \& instructions in which one of the arguments is the DP register; 3544: generate \c 3545: .B addil\c 3546: \& instructions instead. This avoids a rather serious 3547: bug in the HP-UX linker. 3548: .TP 3549: .B \-mshared-libs 3550: Generate code that can be linked against HP-UX shared libraries. This option 3551: is not fully function yet, and is not on by default for any PA target. Using 3552: this option can cause incorrect code to be generated by the compiler. 3553: .TP 3554: .B \-mno-shared-libs 3555: Don't generate code that will be linked against shared libraries. This is 3556: the default for all PA targets. 3557: .TP 3558: .B \-mlong-calls 3559: Generate code which allows calls to functions greater than 256K away from 3560: the caller when the caller and callee are in the same source file. Do 1.1.1.6 root 3561: not turn this option on unless code refuses to link with \*(lqbranch out of 3562: range errors\*('' from the linker. 1.1.1.5 root 3563: .TP 3564: .B \-mdisable-fpregs 3565: Prevent floating point registers from being used in any manner. This is 3566: necessary for compiling kernels which perform lazy context switching of 3567: floating point registers. If you use this option and attempt to perform 3568: floating point operations, the compiler will abort. 3569: .TP 3570: .B \-mdisable-indexing 3571: Prevent the compiler from using indexing address modes. This avoids some 3572: rather obscure problems when compiling MIG generated code under MACH. 3573: .TP 3574: .B \-mtrailing-colon 3575: Add a colon to the end of label definitions (for ELF assemblers). 3576: .PP 3577: These `\|\c 3578: .B \-m\c 3579: \&\|' options are defined for the Intel 80960 family of computers: 3580: .TP 3581: .BI "\-m" "cpu-type" 3582: Assume the defaults for the machine type 3583: .I cpu-type 3584: for instruction and addressing-mode availability and alignment. 3585: The default 3586: .I cpu-type 3587: is 3588: .BR kb ; 3589: other choices are 3590: .BR ka , 3591: .BR mc , 3592: .BR ca , 3593: .BR cf , 3594: .BR sa , 3595: and 3596: .BR sb . 3597: .TP 3598: .B \-mnumerics 3599: .TP 3600: .B \-msoft\-float 1.1.1.6 root 3601: The 1.1.1.5 root 3602: .B \-mnumerics 3603: option indicates that the processor does support 1.1.1.6 root 3604: floating-point instructions. The 1.1.1.5 root 3605: .B \-msoft\-float 3606: option indicates 3607: that floating-point support should not be assumed. 3608: .TP 3609: .B \-mleaf\-procedures 3610: .TP 3611: .B \-mno\-leaf\-procedures 3612: Do (or do not) attempt to alter leaf procedures to be callable with the 3613: .I bal 3614: instruction as well as 3615: .IR call . 3616: This will result in more 3617: efficient code for explicit calls when the 3618: .I bal 3619: instruction can be 3620: substituted by the assembler or linker, but less efficient code in other 3621: cases, such as calls via function pointers, or using a linker that doesn't 3622: support this optimization. 3623: .TP 3624: .B \-mtail\-call 3625: .TP 3626: .B \-mno\-tail\-call 3627: Do (or do not) make additional attempts (beyond those of the 3628: machine-independent portions of the compiler) to optimize tail-recursive 3629: calls into branches. You may not want to do this because the detection of 3630: cases where this is not valid is not totally complete. The default is 3631: .BR \-mno\-tail\-call . 3632: .TP 3633: .B \-mcomplex\-addr 3634: .TP 3635: .B \-mno\-complex\-addr 3636: Assume (or do not assume) that the use of a complex addressing mode is a 3637: win on this implementation of the i960. Complex addressing modes may not 3638: be worthwhile on the K-series, but they definitely are on the C-series. 1.1.1.6 root 3639: The default is currently 1.1.1.5 root 3640: .B \-mcomplex\-addr 3641: for all processors except 3642: the CB and CC. 3643: .TP 3644: .B \-mcode\-align 3645: .TP 3646: .B \-mno\-code\-align 3647: Align code to 8-byte boundaries for faster fetching (or don't bother). 3648: Currently turned on by default for C-series implementations only. 3649: .TP 3650: .B \-mic\-compat 3651: .TP 3652: .B \-mic2.0\-compat 3653: .TP 3654: .B \-mic3.0\-compat 3655: Enable compatibility with iC960 v2.0 or v3.0. 3656: .TP 3657: .B \-masm\-compat 3658: .TP 3659: .B \-mintel\-asm 3660: Enable compatibility with the iC960 assembler. 3661: .TP 3662: .B \-mstrict\-align 3663: .TP 3664: .B \-mno\-strict\-align 3665: Do not permit (do permit) unaligned accesses. 3666: .TP 3667: .B \-mold\-align 3668: Enable structure-alignment compatibility with Intel's gcc release version 3669: 1.3 (based on gcc 1.37). Currently this is buggy in that 3670: .B #pragma align 1 3671: is always assumed as well, and cannot be turned off. 3672: .PP 3673: These `\|\c 3674: .B \-m\c 3675: \&\|' options are defined for the DEC Alpha implementations: 3676: .TP 3677: .B \-mno-soft-float 3678: .TP 3679: .B \-msoft-float 3680: Use (do not use) the hardware floating-point instructions for 3681: floating-point operations. When \c 3682: .B \-msoft-float\c 3683: \& is specified, 3684: functions in `\|\c 3685: .B libgcc1.c\c 3686: \&\|' will be used to perform floating-point 3687: operations. Unless they are replaced by routines that emulate the 3688: floating-point operations, or compiled in such a way as to call such 3689: emulations routines, these routines will issue floating-point 3690: operations. If you are compiling for an Alpha without floating-point 3691: operations, you must ensure that the library is built so as not to call 3692: them. 1.1.1.6 root 3693: .Sp 1.1.1.5 root 3694: Note that Alpha implementations without floating-point operations are 3695: required to have floating-point registers. 3696: .TP 3697: .B \-mfp-reg 3698: .TP 3699: .B \-mno-fp-regs 3700: Generate code that uses (does not use) the floating-point register set. 3701: .B \-mno-fp-regs\c 3702: \& implies \c 3703: .B \-msoft-float\c 3704: \&. If the floating-point 3705: register set is not used, floating point operands are passed in integer 3706: registers as if they were integers and floating-point results are passed 3707: in $0 instead of $f0. This is a non-standard calling sequence, so any 3708: function with a floating-point argument or return value called by code 3709: compiled with \c 3710: .B \-mno-fp-regs\c 3711: \& must also be compiled with that 3712: option. 1.1.1.6 root 3713: .Sp 1.1.1.5 root 3714: A typical use of this option is building a kernel that does not use, 3715: and hence need not save and restore, any floating-point registers. 3716: .PP 3717: These additional options are available on System V Release 4 for 3718: compatibility with other compilers on those systems: 3719: .TP 3720: .B \-G 3721: On SVr4 systems, \c 3722: .B gcc\c 3723: \& accepts the option `\|\c 3724: .B \-G\c 3725: \&\|' (and passes 3726: it to the system linker), for compatibility with other compilers. 3727: However, we suggest you use `\|\c 3728: .B \-symbolic\c 3729: \&\|' or `\|\c 3730: .B \-shared\c 3731: \&\|' as 3732: appropriate, instead of supplying linker options on the \c 1.1.1.6 root 3733: .B gcc 1.1.1.5 root 3734: command line. 3735: .TP 3736: .B \-Qy 3737: Identify the versions of each tool used by the compiler, in a 3738: .B .ident\c 3739: \& assembler directive in the output. 3740: .TP 3741: .B \-Qn 3742: Refrain from adding \c 3743: .B .ident\c 3744: \& directives to the output file (this is 3745: the default). 3746: .TP 1.1.1.6 root 3747: .BI "\-YP," "dirs" 1.1.1.5 root 3748: Search the directories \c 3749: .I dirs\c 3750: \&, and no others, for libraries 3751: specified with `\|\c 3752: .B \-l\c 3753: \&\|'. You can separate directory entries in 3754: .I dirs\c 3755: \& from one another with colons. 3756: .TP 1.1.1.6 root 3757: .BI "\-Ym," "dir" 1.1.1.5 root 3758: Look in the directory \c 3759: .I dir\c 3760: \& to find the M4 preprocessor. 3761: The assembler uses this option. 1.1 root 3762: .SH CODE GENERATION OPTIONS 3763: These machine-independent options control the interface conventions 3764: used in code generation. 1.1.1.6 root 3765: .PP 1.1 root 3766: Most of them begin with `\|\c 3767: \-f\c 3768: \&\|'. These options have both positive and negative forms; the negative form 3769: of `\|\c 3770: .B \-ffoo\c 3771: \&\|' would be `\|\c 3772: .B \-fno\-foo\c 3773: \&\|'. In the table below, only 3774: one of the forms is listed\(em\&the one which is not the default. You 3775: can figure out the other form by either removing `\|\c 3776: .B no\-\c 3777: \&\|' or adding 3778: it. 3779: .TP 3780: .B \-fnonnull\-objects 1.1.1.5 root 3781: Assume that objects reached through references are not null 3782: (C++ only). 1.1.1.6 root 3783: .Sp 1.1 root 3784: Normally, GNU C++ makes conservative assumptions about objects reached 1.1.1.5 root 3785: through references. For example, the compiler must check that \c 1.1.1.6 root 3786: .B a 1.1.1.5 root 3787: is not null in code like the following: 1.1.1.6 root 3788: .Sp 3789: obj &a = g (); 3790: a.f (2); 3791: .Sp 1.1 root 3792: Checking that references of this sort have non-null values requires 3793: extra code, however, and it is unnecessary for many programs. You can 3794: use `\|\c 1.1.1.5 root 3795: .B \-fnonnull-objects\c 3796: \&\|' to omit the checks for null, if your 3797: program doesn't require checking. 1.1 root 3798: .TP 3799: .B \-fpcc\-struct\-return 3800: Use the same convention for returning \c 3801: .B struct\c 3802: \& and \c 1.1.1.6 root 3803: .B union 1.1 root 3804: values that is used by the usual C compiler on your system. This 3805: convention is less efficient for small structures, and on many 3806: machines it fails to be reentrant; but it has the advantage of 3807: allowing intercallability between GCC-compiled code and PCC-compiled 3808: code. 3809: .TP 1.1.1.5 root 3810: .B \-freg\-struct\-return 3811: Use the convention that 3812: .B struct 3813: and 3814: .B union 3815: values are returned in registers when possible. This is more 3816: efficient for small structures than 3817: .BR \-fpcc\-struct\-return . 1.1.1.6 root 3818: .Sp 1.1.1.5 root 3819: If you specify neither 3820: .B \-fpcc\-struct\-return 3821: nor 3822: .BR \-freg\-struct\-return , 3823: GNU CC defaults to whichever convention is standard for the target. 3824: If there is no standard convention, GNU CC defaults to 3825: .BR \-fpcc\-struct\-return . 3826: .TP 1.1 root 3827: .B \-fshort\-enums 3828: Allocate to an \c 3829: .B enum\c 3830: \& type only as many bytes as it needs for the 3831: declared range of possible values. Specifically, the \c 3832: .B enum\c 3833: \& type 3834: will be equivalent to the smallest integer type which has enough room. 3835: .TP 3836: .B \-fshort\-double 3837: Use the same size for 3838: .B double 3839: as for 3840: .B float 3841: \&. 3842: .TP 3843: .B \-fshared\-data 3844: Requests that the data and non-\c 3845: .B const\c 3846: \& variables of this 3847: compilation be shared data rather than private data. The distinction 3848: makes sense only on certain operating systems, where shared data is 3849: shared between processes running the same program, while private data 3850: exists in one copy per process. 3851: .TP 3852: .B \-fno\-common 3853: Allocate even uninitialized global variables in the bss section of the 3854: object file, rather than generating them as common blocks. This has the 3855: effect that if the same variable is declared (without \c 3856: .B extern\c 3857: \&) in 3858: two different compilations, you will get an error when you link them. 3859: The only reason this might be useful is if you wish to verify that the 3860: program will work on other systems which always work this way. 3861: .TP 1.1.1.5 root 3862: .B \-fno\-ident 3863: Ignore the `\|\c 3864: .B #ident\c 3865: \&\|' directive. 3866: .TP 3867: .B \-fno\-gnu\-linker 3868: Do not output global initializations (such as C++ constructors and 3869: destructors) in the form used by the GNU linker (on systems where the GNU 3870: linker is the standard method of handling them). Use this option when 3871: you want to use a non-GNU linker, which also requires using the 3872: .B collect2\c 3873: \& program to make sure the system linker includes 3874: constructors and destructors. (\c 3875: .B collect2\c 3876: \& is included in the GNU CC 3877: distribution.) For systems which \c 3878: .I must\c 3879: \& use \c 3880: .B collect2\c 3881: \&, the 3882: compiler driver \c 3883: .B gcc\c 3884: \& is configured to do this automatically. 3885: .TP 3886: .B \-finhibit-size-directive 3887: Don't output a \c 3888: .B .size\c 3889: \& assembler directive, or anything else that 1.1.1.6 root 3890: would cause trouble if the function is split in the middle, and the 1.1.1.5 root 3891: two halves are placed at locations far apart in memory. This option is 3892: used when compiling `\|\c 3893: .B crtstuff.c\c 3894: \&\|'; you should not need to use it 3895: for anything else. 3896: .TP 3897: .B \-fverbose-asm 3898: Put extra commentary information in the generated assembly code to 3899: make it more readable. This option is generally only of use to those 3900: who actually need to read the generated assembly code (perhaps while 3901: debugging the compiler itself). 3902: .TP 1.1 root 3903: .B \-fvolatile 3904: Consider all memory references through pointers to be volatile. 3905: .TP 1.1.1.5 root 3906: .B \-fvolatile\-global 3907: Consider all memory references to extern and global data items to 3908: be volatile. 3909: .TP 1.1 root 3910: .B \-fpic 3911: If supported for the target machines, generate position-independent code, 3912: suitable for use in a shared library. 3913: .TP 3914: .B \-fPIC 3915: If supported for the target machine, emit position-independent code, 3916: suitable for dynamic linking, even if branches need large displacements. 3917: .TP 1.1.1.6 root 3918: .BI "\-ffixed\-" "reg" 1.1 root 3919: Treat the register named \c 3920: .I reg\c 3921: \& as a fixed register; generated code 3922: should never refer to it (except perhaps as a stack pointer, frame 3923: pointer or in some other fixed role). 1.1.1.6 root 3924: .Sp 1.1 root 3925: .I reg\c 3926: \& must be the name of a register. The register names accepted 3927: are machine-specific and are defined in the \c 1.1.1.6 root 3928: .B REGISTER_NAMES 1.1 root 3929: macro in the machine description macro file. 1.1.1.6 root 3930: .Sp 1.1 root 3931: This flag does not have a negative form, because it specifies a 3932: three-way choice. 3933: .TP 1.1.1.6 root 3934: .BI "\-fcall\-used\-" "reg" 1.1 root 3935: Treat the register named \c 3936: .I reg\c 3937: \& as an allocatable register that is 3938: clobbered by function calls. It may be allocated for temporaries or 3939: variables that do not live across a call. Functions compiled this way 3940: will not save and restore the register \c 3941: .I reg\c 3942: \&. 1.1.1.6 root 3943: .Sp 1.1 root 3944: Use of this flag for a register that has a fixed pervasive role in the 3945: machine's execution model, such as the stack pointer or frame pointer, 3946: will produce disastrous results. 1.1.1.6 root 3947: .Sp 1.1 root 3948: This flag does not have a negative form, because it specifies a 3949: three-way choice. 3950: .TP 1.1.1.6 root 3951: .BI "\-fcall\-saved\-" "reg" 1.1 root 3952: Treat the register named \c 3953: .I reg\c 3954: \& as an allocatable register saved by 3955: functions. It may be allocated even for temporaries or variables that 3956: live across a call. Functions compiled this way will save and restore 3957: the register \c 3958: .I reg\c 3959: \& if they use it. 1.1.1.6 root 3960: .Sp 1.1 root 3961: Use of this flag for a register that has a fixed pervasive role in the 3962: machine's execution model, such as the stack pointer or frame pointer, 3963: will produce disastrous results. 1.1.1.6 root 3964: .Sp 1.1 root 3965: A different sort of disaster will result from the use of this flag for 3966: a register in which function values may be returned. 1.1.1.6 root 3967: .Sp 1.1 root 3968: This flag does not have a negative form, because it specifies a 3969: three-way choice. 3970: .SH PRAGMAS 3971: Two `\|\c 3972: .B #pragma\c 3973: \&\|' directives are supported for GNU C++, to permit using the same 3974: header file for two purposes: as a definition of interfaces to a given 3975: object class, and as the full definition of the contents of that object class. 3976: .TP 3977: .B #pragma interface 1.1.1.5 root 3978: (C++ only.) 1.1 root 3979: Use this directive in header files that define object classes, to save 3980: space in most of the object files that use those classes. Normally, 3981: local copies of certain information (backup copies of inline member 3982: functions, debugging information, and the internal tables that 3983: implement virtual functions) must be kept in each object file that 3984: includes class definitions. You can use this pragma to avoid such 3985: duplication. When a header file containing `\|\c 3986: .B #pragma interface\c 3987: \&\|' is included in a compilation, this auxiliary information 3988: will not be generated (unless the main input source file itself uses 3989: `\|\c 3990: .B #pragma implementation\c 3991: \&\|'). Instead, the object files will contain references to be 1.1.1.6 root 3992: resolved at link time. 1.1 root 3993: .TP 3994: .B #pragma implementation 3995: .TP 1.1.1.6 root 3996: \fB#pragma implementation "\fP\fIobjects\fP\fB.h"\fP 1.1.1.5 root 3997: (C++ only.) 1.1 root 3998: Use this pragma in a main input file, when you want full output from 3999: included header files to be generated (and made globally visible). 4000: The included header file, in turn, should use `\|\c 4001: .B #pragma interface\c 1.1.1.6 root 4002: \&\|'. 1.1 root 4003: Backup copies of inline member functions, debugging information, and 4004: the internal tables used to implement virtual functions are all 4005: generated in implementation files. 1.1.1.6 root 4006: .Sp 1.1 root 4007: If you use `\|\c 4008: .B #pragma implementation\c 4009: \&\|' with no argument, it applies to an include file with the same 4010: basename as your source file; for example, in `\|\c 4011: .B allclass.cc\c 4012: \&\|', `\|\c 4013: .B #pragma implementation\c 4014: \&\|' by itself is equivalent to `\|\c 1.1.1.6 root 4015: .B 1.1 root 4016: #pragma implementation "allclass.h"\c 4017: \&\|'. Use the string argument if you want a single implementation 1.1.1.6 root 4018: file to include code from multiple header files. 4019: .Sp 1.1 root 4020: There is no way to split up the contents of a single header file into 1.1.1.6 root 4021: multiple implementation files. 1.1 root 4022: .SH FILES 1.1.1.6 root 4023: .nf 1.1 root 4024: .ta \w'LIBDIR/g++\-include 'u 4025: file.c C source file 4026: file.h C header (preprocessor) file 4027: file.i preprocessed C source file 4028: file.C C++ source file 4029: file.cc C++ source file 4030: file.cxx C++ source file 4031: file.m Objective-C source file 4032: file.s assembly language file 4033: file.o object file 4034: a.out link edited output 4035: \fITMPDIR\fR/cc\(** temporary files 4036: \fILIBDIR\fR/cpp preprocessor 4037: \fILIBDIR\fR/cc1 compiler for C 4038: \fILIBDIR\fR/cc1plus compiler for C++ 4039: \fILIBDIR\fR/collect linker front end needed on some machines 4040: \fILIBDIR\fR/libgcc.a GCC subroutine library 4041: /lib/crt[01n].o start-up routine 4042: \fILIBDIR\fR/ccrt0 additional start-up routine for C++ 4043: /lib/libc.a standard C library, see 4044: .IR intro (3) 1.1.1.6 root 4045: /usr/include standard directory for \fB#include\fP files 4046: \fILIBDIR\fR/include standard gcc directory for \fB#include\fP files 4047: \fILIBDIR\fR/g++\-include additional g++ directory for \fB#include\fP 4048: .Sp 4049: .fi 1.1 root 4050: .I LIBDIR 4051: is usually 4052: .B /usr/local/lib/\c 4053: .IR machine / version . 4054: .br 4055: .I TMPDIR 1.1.1.6 root 4056: comes from the environment variable 1.1 root 4057: .B TMPDIR 4058: (default 4059: .B /usr/tmp 4060: if available, else 4061: .B /tmp\c 4062: \&). 4063: .SH "SEE ALSO" 4064: cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1). 4065: .br 1.1.1.6 root 4066: .RB "`\|" gcc "\|', `\|" cpp \|', 4067: .RB "`\|" as "\|', `\|" ld \|', 4068: and 1.1 root 4069: .RB `\| gdb \|' 4070: entries in 4071: .B info\c 4072: \&. 4073: .br 1.1.1.6 root 4074: .I 1.1 root 4075: Using and Porting GNU CC (for version 2.0)\c 1.1.1.6 root 4076: , Richard M. Stallman; 1.1 root 4077: .I 4078: The C Preprocessor\c 1.1.1.5 root 4079: , Richard M. Stallman; 1.1.1.6 root 4080: .I 1.1.1.5 root 4081: Debugging with GDB: the GNU Source-Level Debugger\c 4082: , Richard M. Stallman and Roland H. Pesch; 1.1 root 4083: .I 4084: Using as: the GNU Assembler\c 1.1.1.5 root 4085: , Dean Elsner, Jay Fenlason & friends; 1.1 root 4086: .I 1.1.1.5 root 4087: ld: the GNU linker\c 4088: , Steve Chamberlain and Roland Pesch. 1.1 root 4089: .SH BUGS 1.1.1.5 root 4090: For instructions on reporting bugs, see the GCC manual. 1.1 root 4091: .SH COPYING 1.1.1.6 root 4092: Copyright 4093: .if t \(co 4094: 1991, 1992, 1993 Free Software Foundation, Inc. 1.1 root 4095: .PP 4096: Permission is granted to make and distribute verbatim copies of 4097: this manual provided the copyright notice and this permission notice 4098: are preserved on all copies. 4099: .PP 4100: Permission is granted to copy and distribute modified versions of this 4101: manual under the conditions for verbatim copying, provided that the 4102: entire resulting derived work is distributed under the terms of a 4103: permission notice identical to this one. 4104: .PP 4105: Permission is granted to copy and distribute translations of this 4106: manual into another language, under the above conditions for modified 4107: versions, except that this permission notice may be included in 4108: translations approved by the Free Software Foundation instead of in 4109: the original English. 4110: .SH AUTHORS 4111: See the GNU CC Manual for the contributors to GNU CC.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.