Linux gcc compiler common Options list __linux

Source: Internet
Author: User
[Root@localhost one]# gcc--help
USAGE:GCC [options] File ...
Options:
-pass-exit-codes exit with highest error code from a phase
--help Display This information
--target-help Display Target specific command line options
--help={target|optimizers|warnings|params|[ ^]{joined|separate|undocumented}}[,...]
Display specific types of command line options
(Use '-V--help ' to display command line options of sub-processes)
--version Display Compiler version Information
-dumpspecs Display All of the built in spec strings
-dumpversion Display The version of the compiler
-dumpmachine Display The compiler ' s target processor
-print-search-dirs Display The directories in the compiler ' s search path
-print-libgcc-file-name Display The name of the compiler ' s Companion library
-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 directory
-print-sysroot-headers-suffix Display the sysroot suffix used to find headers
-wa,<options> Pass comma-separated <options> in to the assembler
-wp,<options> Pass comma-separated <options> in to the preprocessor
-wl,<options> Pass comma-separated <options> in to the linker
-xassembler <arg> Pass <arg> on to the assembler
-xpreprocessor <arg> Pass <arg> on to the preprocessor
-xlinker <arg> Pass <arg> on to the linker
-combine pass multiple source files to compiler at once
-save-temps do not delete intermediate files
-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's input sources are for <standard>
--sysroot=<directory> use <directory> as the root directory for headers
and libraries
-B <directory> Add <directory> to the compiler ' s search paths
-B <machine> Run gcc for target <machine>, if installed
-V <version> Run gcc version number <version> if installed
-V Display The programs invoked by the compiler
-### like-v but options quoted and commands not executed
-e preprocess only; Do not compile, assemble or link
-S Compile only; Do not assemble or link
-C Compile and assemble, but do not link
-O <file> place the output into <file>
-X <language> Specify the language of the following input files
Permissible languages Include:c C + + assembler None
' None ' means revert to the default behavior of
Guessing the language based on the file ' s extension

Options starting With-g,-F,-M,-O, W, or--param are automatically
Passed on to the various sub-processes invoked by GCC. In order to pass
The other options in to these processes the-w<letter> options must are used.

For bugs reporting instructions, please:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.