Specifications
168 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
There are certain options which are required by tool, but might not be necessary for the top
level compiler. These command can be issues using the options as indicated in Table 11-3
--help
Use this option with any GNU compiler to get more information about the available
options or consult the GCC manual available online at
http://www.gnu.org/manual/manual.html
Library Search Options
-l libraryname
The compiler, by default, searches only the standard libraries such as libc, libm and libxil.
The users can create their own libraries containing some commonly used functions. The
users can indicate to the compiler, the name of the library, where the compiler can find the
definition of these functions. The compiler prefixes the word “lib” to the libraryname
provided by the user.
The compiler is sensitive to the order in which the various options are provided, especially
the -l command line switch. This switch should be provided only after all the sources in the
command line.
For example, if a user creates his own library called libproject.a., he/she can include
functions from this library using the following command:
Compiler Source_Files -L${LIBDIR} -lproject
Caution! If the library flag -llibrary name is given before the source files, the compiler will not
be able to find the functions called from any of the sources. The compiler search is only done in
one direction and does not keep a list of libraries available.
-L Lib Directory
This option indicates to the compiler, the directories to search for the libraries. The
compiler has a default library search path, where it looks for the standard library. By
providing -L option, the user can include some additional directories in the compiler
search path.
Header Files Search Option
-I Directory Name
The option -I, indicates to the compiler to search for header files in the directory Directory
Name before searching the header files in the standard path.
Table 11-3: Tool specific options passed to the top level gcc compiler
Option Tool
-Wp,option Preprocessor
-Wa,option Assembler
-Wl,option Linker










