Gcc command
You can find more gcc command s just by opening the command
prompt in windows ,bash in linux and
terminal in Mac Os.Enter the following code in it
gcc --help
Options:
|
-pass-exit-codes
|
Exit with highest error code from a phase
|
|
--help
|
Display Information
|
|
--target-help
|
Display
Target specific command line options
|
|
--help={common|optimizers|params|target|warnings|[^]{joined|separate|undocumented}}[,...}
|
|
Note:
The
operations starting with –g, -f ,-m –o,-W, or –param are automatically passed
on the various sub-processes invoked by the gcc. In order to pass options on
the these processes the
-w<letter>options must be used.
(Use ‘-v
–help’ to display command line options )
|
commands
|
Description
|
|
--version
|
Display Compiler version information
|
|
--dumpspecs
|
Display all the built in spec strings
|
|
--dumpversion
|
Display the version of the compiler
|
|
--dumpmachine
|
Display the compiler’s target processors
|
|
--print-search-dirs
|
Display the directories in the compilers ‘s search
path
|
|
--print-libgcc-file-name
|
Display the name of the compilers companion library
|
|
--print-multi-directory
|
Display the target’s for versions of
libgcc
|
|
--print-file-name=<lib>
|
Display the full path to library <lib>
|
|
--print-prog-name=<prog>
|
Display the full path to compiler component
<prog>
|
|
--print-multi-directory
|
Display the root directory for versions of libgcc
|
|
--print-multi-lib
|
Display the mapping between command line options and
multiple library search directories
|
|
--print-multi-os-directory
|
Display the relative path to OS libraries
|
|
--print-sysroot
|
Display the target
libraries directories
|
|
--print-sysroot-headers-suffix
|
Display the sysroot suffix used to find headers
|
|
-Wa,<options>
|
Pass comma-separated <options> on to the
assembler
|
|
-wp,<options>
|
Pass comma-separated <options> on the
preprocessor
|
|
-wl,<options>
|
Pass comma-seperated <options> on the linker
|
|
-Xassembler <arg>
|
Pass <arg> on the assembler
|
|
-Xpreprocessor <arg>
|
Pass <arg> on the preprocessor
|
|
-Xlinker <arg>
|
Pass <arg> on the linker
|
|
-save-temps
|
Do not delete intermediate files
|
|
-save-temps=<arg>
|
Do not delete the intermediate files
|
|
-no-canonical-prefiexes
|
Do not canonicalize paths when building relative
prefixes to other gcc components
|
|
-pipe
|
Use pipes rather than intermediate files
|
|
-time
|
Time the execution of each subprocess
|
|
-specs=<file>
|
Override built-in specs with the contents of
<file>
|
|
-std=<standard>
|
Assume that the input
sources are for headers and libraries
|
|
--sysroot=<directory>
|
Add <directory> as the root directory for headers and
libraries
|
|
-B <directory>
|
Add <directory> to the compiler’s search path
|
|
-v
|
Like –v but options quotes and compile, assemble or
link
|
|
-###
|
|
|
-E
|
Preprocess only; do not assemble or link
|
|
-S
|
Compile and assemble,but do not link
|
|
-c
|
Compile and assemble,but do not link
|
|
-o <file>
|
Place the Output into <file>
|
|
-pie
|
Create a postion independent executable
|
|
-shared
|
Create a shared library
|
|
-x <language>
|
Permissible languages include :c c++ assembler none
‘none’ means revert to the default behavior of guessing the language based on
the file’s extension
|
|
|
|
|
|
|
|
|
|
|