Библиотека сайта rus-linux.net
Linux Compilers and AssemblersSEP 19, 2003 By Christopher Paul, Rafeeq Rehman. Article is provided courtesy of Prentice Hall. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3.3 Compiling a ProgramThe GCC compiler is commonly invoked using the 3.3.1 Simple CompilationConsider the following C source code file, which is named #include <stdio.h> main () { printf("Hello world\n"); } To compile this file, you just need to run the following command. [rr@conformix 4]$ gcc hello.c [rr@conformix 4]$ By default, this command will generate an output file named [rr@conformix 4]$ ./a.out Hello world [rr@conformix 4]$ Note that regardless of the name of your source code file, the name of the output file is always gcc hello.c -o hello As you may have noted, the above commands do both the compiling and linking processes in a single step. If you don't want
to link the program, then simple compilation of gcc –c hello.c Note that both – gcc –c hello.c -o test.o Usually when you compile many files in a project, you don't create 3.3.2 Default File TypesGCC can recognize an input file by the last part of its name, sometimes called an extension. Table 3-1 shows file types and the extensions used with them. Depending upon a particular extension, Table 3-1. File types used with GCC
This means that if you use command Table 3-2. Selecting languages with –x option.
Note that – By default, the object file created by GCC has gcc –c hello.c –o test.o 3.3.3 Compiling to Intermediate LevelsThe compilation process involves many steps like preprocessing, assembling and linking. By default GCC carries out all of
these processes and generates executable code as you have seen earlier. However, you can force GCC not to do all of these
steps. For example, using the – gcc –c hello.c If you look at the type of the newly created object file using the [root@conformix chap-03]# file hello.o hello.o: ELF 32-bit LSB relocatable, Intel 80386, version 1, not stripped [root@conformix chap-03]# 3.3.3.1 Creating Assembler CodeUsing the – gcc –S hello.c If you look at the output file, you can see the assembler code. Contents of the input file are as follows: #include <stdio.h> main() { printf ("Hello world\n"); } The output assembler code is shown below: [root@conformix chap-03]# cat hello.s .file "hello.c" .version "01.01" gcc2_compiled.: .section .rodata .LC0: .string "Hello world\n" .text .align 4 .globl main .type main,@function main: pushl %ebp movl %esp, %ebp subl $8, %esp subl $12, %esp pushl $.LC0 call printf addl $16, %esp leave ret .Lfe1: .size main,.Lfe1-main .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-81)" [root@conformix chap-03]# This assembler code may be used with some assembler, like GNU as. Here as is not word “as” but name of the GNU Assembler which is often written as GNU as as, later on. It can also be assembled and linked to create and execute. Please note that for the above command, the compiler that is included in RedHat distribution was used. 3.3.4 Compilation with Debug SupportIf you want to debug a program after compiling with [rr@conformix 4]$ gcc -g -c hello.c [rr@conformix 4]$ Note that when you compile a program with debug information, the size may be quite large as compared to a file compiled without
debug information. In the example program of You can use multiple debug levels with – You can use the debug option with optimization options. Optimization options are discussed later in this chapter. With the – You can also use some command line switches to provide extra information. For example, one useful thing is to print out a
list of directories that the [rr@conformix 4]$ gcc -print-search-dirs hello.c -o hello install: /usr/lib/gcc-lib/i386-redhat-linux/2.96/ programs: =/usr/lib/gcc-lib/i386-redhat-linux/2.96/:/usr/lib/gcc-lib/i386-redhat-linux/2. 96/:/usr/lib/gcc-lib/i386-redhat-linux/:/usr/lib/gcc/i386-redhat-linux/2.96/:/usr/lib/gcc/ i386-redhat-linux/:/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../../i386-redhat-linux/ bin/i386-redhat-linux/2.96/:/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../../ i386-redhat-linux/bin/ libraries: =/usr/lib/gcc-lib/i386-redhat-linux/2.96/:/usr/lib/gcc/i386-redhat-linux/2.96/: /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../../i386-redhat-linux/lib/ i386-redhat-linux/2.96/:/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../../ i386-redhat-linux/lib/:/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../i386-redhat-linux/ 2.96/:/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../:/lib/i386-redhat-linux/2.96/:/lib/ :/usr/lib/i386-redhat-linux/2.96/:/usr/lib/ [rr@conformix 4]$ Here I have used GCC version 2.96 that came with RedHat Linux 7.1 and you can see directories and references to this version information also. You can also find the amount of time taken by each process during compilation. The following command displays time taken during each step of building the output file. [rr@conformix 4]$ gcc -time hello.c -o hello # cpp0 0.06 0.00 # cc1 0.08 0.01 # as 0.02 0.00 # collect2 0.12 0.03 [rr@conformix 4]$ It is also evident from the output of the above command that GCC has used four other programs (cpp0, cc1, as and collect2) during the compilation process. 3.3.5 Compilation with OptimizationThe first objective of a compiler is to generate output code swiftly. The compiler does not do any code optimization to make
the compile time short. However you can instruct So what does optimization mean? Consider the following C source code file 1 #include <stdio.h> 2 main () 3 { 4 int a, b, sum; 5 6 a=4; 7 b=3; 8 sum = a+b; 9 10 printf("The sum is: %d\n", sum); 11 } If you compile this program without any optimization, the compiler will generate code for all lines starting from line number 6 to line number 10. This can be verified by loading the file in a debugger and tracing through it. However, if you optimize the compilation process, lines 6 to 10 can be replaced by a single line as shown below. This can be done without affecting the output of the program. printf("The sum is: 7\n", ); This is because the compiler can easily determine that all of the variables are static and there is no need to assign values
and then calculate the sum at the run time. All of this can be done at the compile time. You can also verify this fact in
a debugger. The optimized code will skip over assignment lines (lines 6 to 8) and will directly jump to the However in the following code, the compiler can't make such decisions because the numbers 1 #include <stdio.h> 2 main () 3 { 4 int a, b, sum; 5 6 printf("Enter first number: "); 7 scanf("%d", &a); 8 printf("Enter second number: "); 9 scanf("%d", &b); 10 11 sum = a+b; 12 13 printf("The sum is: %d\n", sum); 14 } If you compile this code with different levels of optimization (e.g., –O1 and –O2), and then trace it through a debugger, you will see a difference in execution sequence because of the way the compiler makes decisions at the compile time. It may be mentioned that optimization is not always beneficial. For example, code optimization changes timings or clock cycles when the code is executed. This especially may create some problems on embedded systems if you have debugged your code by compiling without optimization. The rule of thumb is that you should create optimized code instead of relying on the compiler to make optimization for you. For a detailed list of optimization options, please see all options starting with – 3.3.6 Static and Dynamic LinkingA compiler can generate static or dynamic code depending upon how you proceed with the linking process. If you create static object code, the output files are larger but they can be used as stand-alone binaries. This means that you can copy an executable file to another system and it does not depend on shared libraries when it is executed. On the other hand, if you chose dynamic linking, the final executable code is much smaller but it depends heavily upon shared libraries. If you copy the final executable program to another system, you have to make sure that the shared libraries are also present on the system where your application is executed. Please note that version inconsistencies in dynamic libraries can also cause problems. To create static binaries, you have to use – For example, if we compile the To identify the dependencies of a dynamically linked binary file, you can use the [rr@conformix 4]$ ldd hello libc.so.6 => /lib/i686/libc.so.6 (0x4002c000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) [rr@conformix 4]$ If you copy On most of the Linux systems, dynamic linking is done by default. 3.3.7 Compiling Source Code for Other LanguagesAs mentioned earlier, the GCC set of compilers supports many languages. It can be used to compile programs other than C language. Following is an introduction to compiling programs from other languages. 3.3.7.1 Compiling C++ CodeC++ source code files have suffixes such as .C, .cpp, .cc, .c++, .cxx or .cp. The 3.3.7.2 Compiling Objective C CodeObjective files have suffixes such as .m and #include "objc/Object.h" @interface HelloWorld : Object { STR msg; } + new; - print; - setMessage: (STR) str; @end @implementation HelloWorld + new { self = [super new]; [self setMessage : ""]; return self; } - print { printf("%s\n", msg); return self; } - setMessage: (STR) str { msg = str; return self; } @end int main(int argc, char**argv) { id msg; msg = [HelloWorld new]; [msg setMessage: "Hello World"] ; [msg print]; return 0; } You can compile and link it using the This is sort of a long “Hello World” program. There are much shorter Objective C “Hello World” programs available on the Internet. 3.3.7.3 Compiling Java CodeInformation about the GCC Java compiler Download
Note that your new compiler must be in Now let us see how to compile a Java program. Consider the following simple Java program that prints the message “Hello World”.
The source code filename is class HelloWorld { public static void main (String args[]) { System.out.print("Hello World "); } } Traditionally you have to invoke the gcj –main=HelloWorld –o hello hello.java The output file is The compiler uses some information to build Java code. This information includes reading the [rr@conformix 4]$ gcj -v Reading specs from /opt/gcc-3.0.4/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/specs Reading specs from /opt/gcc-3.0.4/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/../../../libgcj.spec rename spec lib to liborig rename spec startfile to startfileorig Configured with: ../gcc-3.0.4/configure --prefix=/opt/gcc-3.0.4 --enable-threads=posix Thread model: posix gcc version 3.0.4 [rr@conformix 4]$ The compilation of Java programs is completed in many steps. Let us compile the [rr@conformix 4]$ gcj hello.java --main=HelloWorld -o hello -static -v Reading specs from /opt/gcc-3.0.4/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/specs Reading specs from /opt/gcc-3.0.4/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/../../../libgcj.spec rename spec lib to liborig rename spec startfile to startfileorig Configured with: ../gcc-3.0.4/configure --prefix=/opt/gcc-3.0.4 --enable-threads=posix Thread model: posix gcc version 3.0.4 /opt/gcc-3.0.4/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/jc1 hello.java -fuse-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -quiet -dumpbase hello.java -g1 -version -o /tmp/ccHj5WMY.s GNU Java version 3.0.4 (i686-pc-linux-gnu) compiled by GNU C version 3.0.4. as --traditional-format -V -Qy -o /tmp/cchm92Nc.o /tmp/ccHj5WMY.s GNU assembler version 2.10.91 (i386-redhat-linux) using BFD version 2.10.91.0.2 /opt/gcc-3.0.4/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/jvgenmain HelloWorldmain /tmp/ ccTlFcXz.i /opt/gcc-3.0.4/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/cc1 /tmp/ccTlFcXz.i -quiet -dumpbase HelloWorldmain.c -g1 -version -fdollars-in-identifiers -o /tmp/ccHj5WMY.s GNU CPP version 3.0.4 (cpplib) (i386 Linux/ELF) GNU C version 3.0.4 (i686-pc-linux-gnu) compiled by GNU C version 3.0.4. as --traditional-format -V -Qy -o /tmp/ccBgJjpa.o /tmp/ccHj5WMY.s GNU assembler version 2.10.91 (i386-redhat-linux) using BFD version 2.10.91.0.2 /opt/gcc-3.0.4/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/collect2 -m elf_i386 -static -o hello /usr/lib/crt1.o /usr/lib/crti.o /opt/gcc-3.0.4/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/ crtbegin.o -L/opt/gcc-3.0.4/lib/gcc-lib/i686-pc-linux-gnu/3.0.4 -L/opt/gcc-3.0.4/lib/ gcc-lib/i686-pc-linux-gnu/3.0.4/../../.. /tmp/ccBgJjpa.o /tmp/cchm92Nc.o -lgcc -lgcj -lm -lgcjgc -lpthread -lzgcj -ldl -lgcc -lc -lgcc /opt/gcc-3.0.4/lib/gcc-lib/ i686-pc-linux-gnu/3.0.4/crtend.o /usr/lib/crtn.o [rr@conformix 4]$ As you can see, different programs have been executed to get the output binary file. These programs include:
You can also see various command line switches used with these programs. 3.3.8 Summary of gcc OptionsHundreds of options can be used with 3.3.8.1 Overall Options-c -S -E -o file -pipe -pass-exit-codes -x language -v --target-help --help 3.3.8.2 C Language Options-ansi -std=standard -aux-info filename -fno-asm -fno-builtin -fhosted -ffree-standing -trigraphs -traditional -traditional-cpp -fallow-single-precision -fcond-mismatch -fsigned-bitfields -fsigned-char -funsigned-bitfields -funsigned-char -fwritable-strings -fshort-wchar 3.3.8.3 C++ Language Options-fno-access-control -fcheck-new -fconserve-space -fno-const-strings -fdollars-in-identifiers -fno-elide-constructors -fno-enforce-eh-specs -fexternal-templates -falt-external-templates -ffor-scope -fno-for-scope -fno-gnu-keywords -fno-implicit-templates -fno-implicit-inline-templates -fno-implement-inlines -fms-extensions -fno-nonansi-builtins -fno-operator-names -fno-optional-diags -fpermissive -frepo -fno-rtti -fstats -ftemplate-depth-n -fuse-cxa-atexit -fno-weak -nostdinc++ -fno-default-inline -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Weffc++ -Wno-deprecated -Wno-non-template-friend -Wold-style-cast -Woverloaded-virtual -Wno-pmf-conversions -Wsign-promo -Wsynth 3.3.8.4 Objective-C Language Options-fconstant-string-class=class-name -fgnu-runtime -fnext-runtime -gen-decls -Wno-protocol -Wselector 3.3.8.5 Language Independent Options-fmessage-length=n -fdiagnostics-show-location=[once|every-line] 3.3.8.6 Warning Options-fsyntax-only -pedantic -pedantic-errors -w -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wdisabled-optimization -Werror -Wfloat-equal -Wformat -Wformat=2 -Wformat-nonliteral -Wformat-security -Wid-clash-len -Wimplicit -Wimplicit-int -Wimplicit-function-declaration -Werror-implicit-function-declaration -Wimport -Winline -Wlarger-than-len -Wlong-long -Wmain -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wno-format-extra-args -Wno-format-y2k -Wno-import -Wpacked -Wpadded -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings 3.3.8.7 C-only Warning Options-Wbad-function-cast -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes -Wtraditional 3.3.8.8 Debugging Options-a -ax -dletters -dumpspecs -dumpmachine -dumpversion -fdump-unnumbered -fdump-translation-unit[-n] -fdump-class-hierarchy[-n] -fdump-ast-original[-n] -fdump-ast-optimized[-n] -fmem-report -fpretend-float -fprofile-arcs -ftest-coverage -ftime-report -g -glevel -gcoff -gdwarf -gdwarf-1 -gdwarf-1+ -gdwarf-2 -ggdb -gstabs -gstabs+ -gxcoff -gxcoff+ -p -pg -print-file-name=library -print-libgcc-file-name -print-multi-directory -print-multi-lib -print-prog-name=program -print-search-dirs -Q -save-temps -time 3.3.8.9 Optimization Options-falign-functions=n -falign-jumps=n -falign-labels=n -falign-loops=n -fbranch-probabilities -fcaller-saves -fcse-follow-jumps -fcse-skip-blocks -fdata-sections -fdce -fdelayed-branch -fdelete-null-pointer-checks -fexpensive-optimizations -ffast-math -ffloat-store -fforce-addr -fforce-mem -ffunction-sections -fgcse -finline-functions -finline-limit=n -fkeep-inline-functions -fkeep-static-consts -fmove-all-movables -fno-default-inline -fno-defer-pop -fno-function-cse -fno-guess-branch-probability -fno-inline -fno-math-errno -fno-peephole -fno-peephole2 -fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls -freduce-all-givs -fregmove -frename-registers -frerun-cse-after-loop -frerun-loop-opt -fschedule-insns -fschedule-insns2 -fsingle-precision-constant -fssa -fstrength-reduce -fstrict-aliasing -fthread-jumps -ftrapv -funroll-all-loops -funroll-loops --param name=value -O -O0 -O1 -O2 -O3 -Os 3.3.8.10 Preprocessor Options-$ -Aquestion=answer -A-question[=answer] -C -dD -dI -dM -dN -Dmacro[=defn] -E -H -idirafter dir -include file -imacros file -iprefix file -iwithprefix dir -iwithprefixbefore dir -isystem dir -M -MM -MF -MG -MP -MQ -MT -nostdinc -P -remap -trigraphs -undef -Umacro -Wp,option 3.3.8.11 Assembler Option-Wa,option 3.3.8.12 Linker Optionsobject-file-name -llibrary -nostartfiles -nodefaultlibs -nostdlib -s -static -static-libgcc -shared -shared-libgcc -symbolic -Wl,option -Xlinker option -u symbol 3.3.8.13 Directory Options-Bprefix -Idir -I- -Ldir -specs=file 3.3.8.14 Target Options-b machine -V version 3.3.8.15 Machine Dependent OptionsM680x0 Options -m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040 -m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020 -mfpa -mnobitfield -mrtd -mshort -msoft-float -mpcrel -malign-int -mstrict-align M68hc1x Options -m6811 -m6812 -m68hc11 -m68hc12 -mauto-incdec -mshort -msoft-reg-count=count VAX Options -mg -mgnu -munix SPARC Options -mcpu=cpu-type -mtune=cpu-type -mcmodel=code-model -m32 -m64 -mapp-regs -mbroken-saverestore -mcypress -mepilogue -mfaster-structs -mflat -mfpu -mhard-float -mhard-quad-float -mimpure-text -mlive-g0 -mno-app-regs -mno-epilogue -mno-faster-structs -mno-flat -mno-fpu -mno-impure-text -mno-stack-bias -mno-unaligned-doubles -msoft-float -msoft-quad-float -msparclite -mstack-bias -msupersparc -munaligned-doubles -mv8 Convex Options -mc1 -mc2 -mc32 -mc34 -mc38 -margcount -mnoargcount -mlong32 -mlong64 -mvolatile-cache -mvolatile-nocache AMD29K Options -m29000 -m29050 -mbw -mnbw -mdw -mndw -mlarge -mnormal -msmall -mkernel-registers -mno-reuse-arg-regs -mno-stack-check -mno-storem-bug -mreuse-arg-regs -msoft-float -mstack-check -mstorem-bug -muser-registers ARM Options -mapcs-frame -mno-apcs-frame -mapcs-26 -mapcs-32 -mapcs-stack-check -mno-apcs-stack-check -mapcs-float -mno-apcs-float -mapcs-reentrant -mno-apcs-reentrant -msched-prolog -mno-sched-prolog -mlittle-endian -mbig-endian -mwords-little-endian -malignment-traps -mno-alignment-traps -msoft-float -mhard-float -mfpe -mthumb-interwork -mno-thumb-interwork -mcpu=name -march=name -mfpe=name -mstructure-size-boundary=n -mbsd -mxopen -mno-symrename -mabort-on-noreturn -mlong-calls -mno-long-calls -msingle-pic-base -mno-single-pic-base -mpic-register=reg -mnop-fun-dllimport -mpoke-function-name -mthumb -marm -mtpcs-frame -mtpcs-leaf-frame -mcaller-super-interworking -mcallee-super-interworking MN10200 Options -mrelax MN10300 Options -mmult-bug -mno-mult-bug -mam33 -mno-am33 -mno-crt0 -mrelax M32R/D Options -mcode-model=model-type -msdata=sdata-type -G num M88K Options -m88000 -m88100 -m88110 -mbig-pic -mcheck-zero-division -mhandle-large-shift -midentify-revision -mno-check-zero-division -mno-ocs-debug-info -mno-ocs-frame-position -mno-optimize-arg-area -mno-serialize-volatile -mno-underscores -mocs-debug-info -mocs-frame-position -moptimize-arg-area -mserialize-volatile -mshort-data-num -msvr3 -msvr4 -mtrap-large-shift -muse-div-instruction -mversion-03.00 -mwarn-passed-structs RS/6000 and PowerPC Options -mcpu=cpu-type -mtune=cpu-type -mpower -mno-power -mpower2 -mno-power2 -mpowerpc -mpowerpc64 -mno-powerpc -mpowerpc-gpopt -mno-powerpc-gpopt -mpowerpc-gfxopt -mno-powerpc-gfxopt -mnew-mnemonics -mold-mnemonics -mfull-toc -mminimal-toc -mno-fop-in-toc -mno-sum-in-toc -m64 -m32 -mxl-call -mno-xl-call -mthreads -mpe -msoft-float -mhard-float -mmultiple -mno-multiple -mstring -mno-string -mupdate -mno-update -mfused-madd -mno-fused-madd -mbit-align -mno-bit-align -mstrict-align -mno-strict-align -mrelocatable -mno-relocatable -mrelocatable-lib -mno-relocatable-lib -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian -mcall-aix -mcall-sysv -mcall-netbsd -mprototype -mno-prototype- -msim -mmvme -mads -myellowknife -memb -msdata -msdata=opt -mvxworks –G num RT Options -mcall-lib-mul -mfp-arg-in-fpregs -mfp-arg-in-gregs -mfull-fp-blocks -mhc-struct-return -min-line-mul -mminimum-fp-blocks -mnohc-struct-return MIPS Options -mabicalls -mcpu=cpu-type -membedded-data -muninit-const-in-rodata -membedded-pic- -mfp32 -mfp64 -mgas -mgp32 -mgp64 -mgpopt -mhalf-pic -mhard-float -mint64 -mips1 -mips2 -mips3 -mips4 -mlong64 -mlong32 -mlong-calls -mmemcpy -mmips-as -mmips-tfile -mno-abicalls -mno-embedded-data -mno-uninit-const-in-rodata -mno-embedded-pic -mno-gpopt -mno-long-calls -mno-memcpy -mno-mips-tfile -mno-rnames -mno-stats -mrnames -msoft-float -m4650 -msingle-float -mmad -mstats -EL -EB -G num -nocpp -mabi=32 -mabi=n32 -mabi=64 -mabi=eabi -mfix7000 -mno-crt0 i386 Options -mcpu=cpu-type -march=cpu-type -mintel-syntax -mieee-fp -mno-fancy-math-387 -mno-fp-ret-in-387 -msoft-float -msvr3-shlib -mno-wide-multiply -mrtd -malign-double -mreg-alloc=list -mregparm=num -malign-jumps=num -malign-loops=num -malign-functions=num -mpreferred-stack-boundary=num -mthreads -mno-align-stringops -minline-all-stringops -mpush-args -maccumulate-outgoing-args -m128bit-long-double -m96bit-long-double -momit-leaf-frame-pointer HPPA Options -march=architecture-type -mbig-switch -mdisable-fpregs -mdisable-indexing -mfast-indirect-calls -mgas -mjump-in-delay -mlong-load-store -mno-big-switch -mno-disable-fpregs -mno-disable-indexing -mno-fast-indirect-calls -mno-gas -mno-jump-in-delay -mno-long-load-store -mno-portable-runtime -mno-soft-float -mno-space-regs -msoft-float -mpa-risc-1-0 -mpa-risc-1-1 -mpa-risc-2-0 -mportable-runtime -mschedule=cpu-type -mspace-regs Intel 960 Options -mcpu-type -masm-compat -mclean-linkage -mcode-align -mcomplex-addr -mleaf-procedures -mic-compat -mic2.0-compat -mic3.0-compat -mintel-asm -mno-clean-linkage -mno-code-align -mno-complex-addr -mno-leaf-procedures -mno-old-align -mno-strict-align -mno-tail-call -mnumerics -mold-align -msoft-float -mstrict-align -mtail-call DEC Alpha Options -mfp-regs -mno-fp-regs -mno-soft-float -msoft-float -malpha-as -mgas -mieee -mieee-with-inexact -mieee-conformant -mfp-trap-mode=mode -mfp-rounding-mode=mode -mtrap-precision=mode -mbuild-constants -mcpu=cpu-type -mbwx -mno-bwx -mcix -mno-cix -mmax -mno-max -mmemory-latency=time Clipper Options -mc300 -mc400 H8/300 Options -mrelax -mh -ms -mint32 -malign-300 SH Options -m1 -m2 -m3 -m3e -m4-nofpu -m4-single-only -m4-single -m4 -mb -ml -mdalign -mrelax -mbigtable -mfmovd -mhitachi -mnomacsave -mieee -misize -mpadstruct -mspace -mprefergot -musermode System V Options -Qy -Qn -YP,paths -Ym,dir ARC Options -EB -EL -mmangle-cpu -mcpu=cpu -mtext=text-section -mdata=data-section -mrodata=readonly-data-section TMS320C3x/C4x Options -mcpu=cpu -mbig -msmall -mregparm -mmemparm -mfast-fix -mmpyi -mbk -mti -mdp-isr-reload -mrpts=count -mrptb -mdb -mloop-unsigned -mparallel-insns -mparallel-mpy -mpreserve-float V850 Options -mlong-calls -mno-long-calls -mep -mno-ep -mprolog-function -mno-prolog-function -mspace -mtda=n -msda=n -mzda=n -mv850 -mbig-switch NS32K Options -m32032 -m32332 -m32532 -m32081 -m32381 -mmult-add -mnomult-add -msoft-float -mrtd -mnortd -mregparam -mnoregparam -msb -mnosb -mbitfield -mnobitfield -mhimem -mnohimem AVR Options -mmcu=mcu -msize -minit-stack=n -mno-interrupts -mcall-prologues -mno-table-jump -mtiny-stack MCore Options -mhardlit -mno-hardlit -mdiv -mno-div -mrelax-immediates -mno-relax-immediates -mwide-bitfields -mno-wide-bitfields -m4byte-functions -mno-4byte-functions -mcallgraph-data -mno-callgraph-data -mslow-bytes -mno-slow-bytes -mno-lsim -mlittle-endian -mbig-endian -m210 -m340 -mstack-increment IA-64 Options -mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic -mvolatile-asm-stop -mb-step -mregister-names -mno-sdata -mconstant-gp -mauto-pic -minline-divide-min-latency -minline-divide-max-throughput -mno-dwarf2-asm -mfixed-range=register-range S/390 and zSeries Options -mhard-float -msoft-float -mbackchain -mno-backchain -msmall-exec -mno-small-exec -mmvcle -mno-mvcle -m64 -m31 -mdebug -mno-debug Xtensa Options -mbig-endian -mlittle-endian -mdensity -mno-density -mmac16 -mno-mac16 -mmul16 -mno-mul16 -mmul32 -mno-mul32 -mnsa -mno-nsa -mminmax -mno-minmax -msext -mno-sext -mbooleans -mno-booleans -mhard-float -msoft-float -mfused-madd -mno-fused-madd -mserialize-volatile -mno-serialize-volatile -mtext-section-literals -mno-text-section-literals -mtarget-align -mno-target-align -mlongcalls -mno-long-calls 3.3.8.16 Code Generation Options-fcall-saved-reg -fcall-used-reg -ffixed-reg -fexceptions -fnon-call-exceptions -funwind-tables -finhibit-size-directive -finstrument-functions -fcheck-memory-usage -fprefix-function-name -fno-common -fno-ident -fno-gnu-linker -fpcc-struct-return -fpic -fPIC -freg-struct-return -fshared-data -fshort-enums -fshort-double -fvolatile -fvolatile-global -fvolatile-static -fverbose-asm -fpack-struct -fstack-check -fstack-limit-register=reg -fstack-limit-symbol=sym -fargument-alias -fargument-noalias -fargument-noalias-global -fleading-underscore © 2003 Pearson Education, Inc. InformIT Division. All rights reserved. 800 East 96th Street Indianapolis, Indiana 46240 |