Last Update 2020/10/20
--help -v
gccから呼び出される各プロセスを含む、コマンドラインオプションの説明を標準出力へ出力
テスト概要
コマンド「gcc --help -v」の実行
実行環境
GCC-8.2.0
GNU C Library 2.28
GNU Binutils 2.31.1
GNU C Library 2.28
GNU Binutils 2.31.1
コード例・出力内容中の表記
・実行例中の太字表記部分は、コマンドなどの入力された文字列を示します。
・「︙」や「...」の着色省略表記は、 実際のソースコードや出力内容などを省略加工した部分を示します。
・「︙」や「...」の着色省略表記は、 実際のソースコードや出力内容などを省略加工した部分を示します。
実行結果(着色部は-vオプションによる標準エラー出力)
(注)標準出力と標準エラー出力が混在している部分はそのまま記述
(注)標準出力と標準エラー出力が混在している部分はそのまま記述
$ gcc --help -v -vオプション追加で呼び出される各プロセスごとに--helpによる出力が発生
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/lto-wrapper
Usage: gcc [options] file... 以下、gccのコマンドラインオプションの説明
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={common|optimizers|params|target|warnings|[^]{joined|separate|undocumented}}[,...].
︙
-pie Create a dynamically linked position independent
executable.
-shared Create a shared library.
-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
other options on to these processes the -W<letter> options must be used.
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/usr --enable-languages=c,c++ --disable-multilib --disable-bootstrap --disable-libmpx --with-system-zlib
Thread model: posix
gcc version 8.2.0 (GCC)
COLLECT_GCC_OPTIONS='--help' '-v' '-mtune=generic' '-march=x86-64'
/usr/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/cc1 -quiet -v help-dummy ...
The following options are specific to just the language Ada: 以下、コンパイラのコマンドラインオプションの説明
-fbuiltin-printf Ignored.
The following options are specific to just the language AdaSCIL:
None found. Use --help=AdaSCIL to show *all* the options supported by the AdaSCIL front-end.
The following options are specific to just the language AdaWhy:
None found. Use --help=AdaWhy to show *all* the options supported by the AdaWhy front-end.
The following options are specific to just the language BRIG:
None found. Use --help=BRIG to show *all* the options supported by the BRIG front-end.
The following options are specific to just the language C:
-fgimple Enable parsing GIMPLE.
-lang-asm This option lacks documentation.
The following options are specific to just the language C++:
-Wplacement-new Warn for placement new expressions with undefined behavior. Same as -Wplacement-new=.
-Wplacement-new=<0,2> Warn for placement new expressions with undefined behavior.
The following options are specific to just the language Fortran:
-J<directory> Put MODULE files in 'directory'.
-Waliasing Warn about possible aliasing of dummy arguments.
-Walign-commons Warn about alignment of COMMON blocks.
︙
-std=f95 Conform to the ISO Fortran 95 standard.
-std=gnu Conform to nothing in particular.
-std=legacy Accept extensions to support legacy code.
The following options are specific to just the language Go:
-fgo-c-header=<file> Write Go struct definitions to file as C code.
-fgo-check-divide-overflow Add explicit checks for division overflow in INT_MIN / -1.
-fgo-check-divide-zero Add explicit checks for division by zero.
︙
-fgo-prefix=<string> Set package-specific prefix for exported Go names.
-fgo-relative-import-path=<path> Treat a relative import as relative to path.
-frequire-return-statement Functions which return values must end with return statements.
The following options are specific to just the language LTO:
-flinker-output= Set linker output type (used internally during LTO optimization)
-fltrans Run the link-time optimizer in local transformation (LTRANS) mode.
-fltrans-output-list= Specify a file to which a list of files output by LTRANS is written.
-fresolution= The resolution file.
-fwpa Run the link-time optimizer in whole program analysis (WPA) mode.
-fwpa= Whole program analysis (WPA) mode with number of parallel jobs specified.
The following options are specific to just the language ObjC:
None found. Use --help=ObjC to show *all* the options supported by the ObjC front-end.
The following options are specific to just the language ObjC++:
-fobjc-call-cxx-cdtors Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed.
The following options are language-related:
--all-warnings Same as -Wall. Use the latter option instead.
--ansi Same as -ansi. Use the latter option instead.
--assert Same as -A. Use the latter option instead.
︙
-undef Do not predefine system-specific and GCC-specific macros.
-v Enable verbose output.
-w Suppress warnings.
The --param option recognizes the following as parameters:
predictable-branch-outcome Maximal estimated outcome of branch considered predictable.
inline-min-speedup The minimal estimated speedup allowing inliner to ignore inline-insns-single and inline-insns-auto.
max-inline-insns-single The maximum number of instructions in a single function eligible for inlining.
︙
unroll-jam-min-percent Minimum percentage of memrefs that must go away for unroll-and-jam to be considered profitable.
unroll-jam-max-unroll Maximum unroll factor for the unroll-and-jam transformation.
avoid-fma-max-bits Maximum number of bits for which we avoid creating FMAs.
The following options control compiler warning messages:
--extra-warnings Same as -Wextra. Use the latter option instead.
-W This switch is deprecated; use -Wextra instead. Same as -Wextra.
-Waggregate-return Warn about returning structures, unions or arrays.
︙
-Wunused-parameter Warn when a function parameter is unused.
-Wunused-value Warn when an expression value is unused.
-Wvector-operation-performance Warn when a vector operation is compiled outside the SIMD.
The following options control optimizations:
-O<number> Set optimization level to <number>.
-Ofast Optimize for speed disregarding exact standards compliance.
-Og Optimize for debugging experience rather than speed or size.
︙
-fweb Construct webs and split unrelated uses of single variable.
-fwrapv Assume signed arithmetic overflow wraps around.
-fwrapv-pointer Assume pointer overflow wraps around.
The following options are target specific:
-m128bit-long-double sizeof(long double) is 16.
-m16 Generate 16bit i386 code.
-m32 Generate 32bit i386 code.
︙
-mxsavec Support XSAVEC instructions.
-mxsaveopt Support XSAVEOPT instruction.
-mxsaves Support XSAVES and XRSTORS instructions.
Known assembler dialects (for use with the -masm= option):
att intel
︙
Known TLS dialects (for use with the -mtls-dialect= option):
gnu gnu2
The following options are language-independent:
--debug Same as -g. Use the latter option instead.
--dumpbase Same as -dumpbase. Use the latter option instead.
--dumpdir Same as -dumpdir. Use the latter option instead.
︙
-gas-loc-support Assume assembler support for (DWARF2+) .loc directives
-gas-locview-support Assume assembler support for view in (DWARF2+) .loc directives
-gcoff GNU C17 (GCC) version 8.2.0 (x86_64-pc-linux-gnu)
compiled by GNU C version 8.2.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Does nothing. Preserved for backward compatibility. Uses of this option are diagnosed.
-gcoff1 Does nothing. Preserved for backward compatibility. Uses of this option are diagnosed.
-gcoff2 Does nothing. Preserved for backward compatibility. Uses of this option are diagnosed.
︙
-pedantic-errors Like -pedantic but issue them as errors.
-quiet Do not display functions compiled or elapsed time.
-version Display the compiler's version.
COLLECT_GCC_OPTIONS='--help' '-v' '-mtune=generic' '-march=x86-64'
as -v --64 --help -o /tmp/ccmtY4m8.o /tmp/ccdw7kjU.s
GNU assembler version 2.31.1 (x86_64-pc-linux-gnu) using BFD version (GNU Binutils) 2.31.1
Usage: as [option...] [asmfile...] 以下、アセンブラのコマンドラインオプションの説明
Options:
-a[sub-option...] turn on listings
Sub-options [default hls]:
c omit false conditionals
d omit debugging directives
g include general info
h include high-level source
l include assembly
m include macro expansions
n omit forms processing
s include symbols
=FILE list to FILE (must be last sub-option)
--alternate initially turn on alternate macro syntax
--compress-debug-sections[={none|zlib|zlib-gnu|zlib-gabi}]
compress DWARF debug sections using zlib [default]
︙
-mrelax-relocations=[no|yes]
generate relax relocations
-mamd64 accept only AMD64 ISA
-mintel64 accept only Intel64 ISA
Report bugs to <http://www.sourceware.org/bugzilla/>
COMPILER_PATH=/usr/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/:/usr/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/:/usr/libexec/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='--help' '-v' '-mtune=generic' '-march=x86-64'
/usr/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/collect2 ...
Usage: collect2 [options] 以下、リンカのコマンドラインオプションの説明
Wrap linker and generate constructor code if needed.
Options:
-debug Enable debug output
--help Display this information
-v, --version Display this program's version number
Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html
Report bugs: <https://gcc.gnu.org/bugs/>
Usage: /usr/bin/ld [options] file...
Options:
-a KEYWORD Shared library control for HP/UX compatibility
-A ARCH, --architecture ARCH
Set architecture
-b TARGET, --format TARGET Specify target for following input files
︙
-z dynamic-undefined-weak Make undefined weak symbols dynamic
-z nodynamic-undefined-weak Do not make undefined weak symbols dynamic
-z call-nop=PADDING Use PADDING as 1-byte NOP for branch
Report bugs to <http://www.sourceware.org/bugzilla/>
COLLECT_GCC_OPTIONS='--help' '-v' '-mtune=generic' '-march=x86-64'
For bug reporting instructions, please see:
<https://gcc.gnu.org/bugs/>
$