Specifications
166 www.xilinx.com Embedded System Tools Guide (EDK 6.2i)
1-800-255-7778 UG111 (v1.4) January 30, 2004
Chapter 11: GNU Compiler Tools
R
Compiler Options
Some of the compiler options are discussed in details in this section
-g
This option adds debugging information to the output file. The debugging information is 
required by the GNU Debugger (mb-gdb or powerpc-eabi-gdb). The debugger provides 
debugging at the source as well as the assembly level. This option adds debugging 
information only when the input is a C/C++ source file. 
-gstabs
Use this option for adding debugging symbols to assembly(.S) files. This is a assembler 
option and should be provided directly to the GNU assembler (mb-as or powerpc-eabi-
as). If an assembly file is compiled using the compiler (mb-gcc or powerpc-eabi-gcc), 
prefix the option with -Wa, .
Table 11-1: Commonly Used Compiler Options
Options Explanation
-E Preprocess only; Do not compile, assemble and link. The preprocessed output is 
displayed on the standard out device
-S Compile only; Do not assemble and link (Generates .s file)
-c Compile and Assemble only; Do not link (Generates .o file)
-g Add debugging information, which is used by GNU debugger (mb-gdb or 
powerpc-eabi-gdb)
-gstabs Add debugging information to the compiled assembly file. Pass this option 
directly to the GNU assembler or through the -Wa option to the Compiler
 -Wa,option Pass comma-separated options to the assembler
-Wp,option Pass comma-separated options to the preprocessor
-Wl,option Pass comma-separated options to the linker
-B directory Add directory to the C-run time library search paths
-L directory Add directory to library search path
-I directory Add directory to header search path
-l library Search library
a
 for undefined symbols. 
 -v  (Verbose). Display the programs invoked by the compiler
-o filename Place the output in the filename
-save-temps Store the intermediate files, i.e files produced at the end of each pass,
--help Display a short listing of options.
-O n Specify Optimization level n = 0,1,2,3
a. The compiler prefixes “lib” to the library name indicated in this command line switch.










