Chapter 4. GCC Command Options
-print-libgcc-file-name
Same as
-print-file-name=libgcc.a
This is useful when you use
. You can do
libgcc.a
gcc -nostdlib
-print-search-dirs
Print the name of the configured installation directory and a list of program and library directories
will search--and don't do anything else.
gcc
This is useful when
cpp0: No such file or directory
other compiler components where
variable
GCC_EXEC_PREFIX
'/'. Section 4.19 Environment Variables Affecting GCC.
-dumpmachine
Print the compiler's target machine (for example,
else.
-dumpversion
Print the compiler version (for example,
-dumpspecs
Print the compiler's built-in specs--and don't do anything else. (This is used when GCC itself is
being built.) Section 4.15 Specifying subprocesses and the switches to pass to them.
-feliminate-unused-debug-types
Normally, when producing DWARF2 output, GCC will emit debugging information for all types
declared in a compilation unit, regardless of whether or not they are actually used in that compi-
lation unit. Sometimes this is useful, such as if, in the debugger, you want to cast a value to a type
that is not actually used in your program (but is declared). More often, however, this results in a
significant amount of wasted space. With this option, GCC will avoid producing debug symbol
output for types that are nowhere used in the source file being compiled.
4.10. Options That Control Optimization
These options control various sorts of optimizations.
Without any optimization option, the compiler's goal is to reduce the cost of compilation and to make
debugging produce the expected results. Statements are independent: if you stop the program with a
breakpoint between statements, you can then assign a new value to any variable or change the program
counter to any other statement in the function and get exactly the results you would expect from the
source code.
Turning on optimization flags makes the compiler attempt to improve the performance and/or code
size at the expense of compilation time and possibly the ability to debug the program.
The compiler performs optimization based on the knowledge it has of the program. Using the
-funit-at-a-time
functions in the file when compiling a function. Compiling multiple files at once to a single output
file (and using
-funit-at-a-time
the files when compiling each of them.
Not all optimizations are controlled directly by a flag. Only optimizations that have a flag are listed.
-nostdlib
... 'gcc -print-libgcc-file-name'
files
prints the error message
gcc
gcc
to the directory where you installed them. Don't forget the trailing
flag will allow the compiler to consider information gained from later
) will allow the compiler to use information gained from all of
.
or
-nodefaultlibs
installation problem, cannot exec
. To resolve this you either need to put
expects to find them, or you can set the environment
i686-pc-linux-gnu
)--and don't do anything else.
3.0
but you do want to link with
cpp0
)--and don't do anything
53
and the
Need help?
Do you have a question about the ENTERPRISE LINUX 4 and is the answer not in the manual?