Guest User

Untitled

a guest
Mar 19th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.06 KB | None | 0 0
  1. bash-3.2$ CC -flags
  2. ______________________________________________________________________________
  3. Items within [ ] are optional. Items within < > are variable parameters.
  4. Bar | indicates choice of literal values.
  5. ______________________________________________________________________________
  6. -# Verbose mode
  7. -### Show compiler commands built by driver, no compilation
  8. -B[static|dynamic] Specify dynamic or static binding
  9. -D<name[=token]> Associate name with token as if by #define
  10. -E Compile source through preprocessor only, output to stdout
  11. -G Build a dynamic shared library
  12. -H Print path name of each file included during compilation
  13. -I<dir> Add <dir> to preprocessor #include file search path
  14. -KPIC Compile position independent code with 32-bit addresses
  15. -Kpic Compile position independent code
  16. -L<dir> Pass to linker to add <dir> to the library search path
  17. -M<file> Pass <file> mapfile to linker
  18. -O Use default optimization level (-xO3)
  19. -O<n> Same as -xO<n>
  20. -P Compile source through preprocessor only, output to .i file
  21. -PIC Same as -KPIC
  22. -Qoption <prog> <o>[,<o>...] Pass options list <o> to compilation phase <prog>
  23. -R<dir[:dir]> Build runtime search path list into executable
  24. -S Compile and only generate assembly code (.s)
  25. -U<name> Delete initial definition of preprocessor symbol <name>
  26. -V Report version number of each compilation phase
  27. -W<c>,<arg> Pass <arg> to specified component <c> (a,c,d,l,m,O,o,p,0,2)
  28. -Xlinker <arg> Pass <arg> to linker
  29. -Xm Support dollar character in C++ identifiers
  30. -Y<c>,<dir> Specify <dir> for location of component <c> (a,c,l,m,p,0,2,o)
  31. -YA,<dir> Change default directory searched for components
  32. -YI,<dir> Change default directory searched for include files
  33. -YP,<dir> Change default directory for finding libraries files
  34. -YS,<dir> Change default directory for startup object files
  35. -c Compile only - produce .o files, suppress linking
  36. -compat=5 Standard mode; accept source code that conforms to the C++ standard (default mode)
  37. -compat=g G++ compatibility mode; accept g++ source code and generate g++ compatible object code
  38. +d Do not expand inline functions
  39. -dalign Expands to -xmemalign=8s
  40. -d{n|y} Dynamic [-dy] or static [-dn] option to linker
  41. -dryrun Show compiler commands built by driver, no compilation
  42. -e<arg> Passed to linker
  43. -erroff[=<tags>] Suppress warnings specified by tags; <tags>={%none, %all, <tag list>}
  44. -errtags[={yes|no}] Display messages with tags
  45. -errwarn[=<tags>] Treats warnings specified by tags as errors; <tags>={%none, %all, <tag list>}
  46. -fPIC Same as -KPIC
  47. -fast Optimize using a selection of options
  48. -features=<a>[,<a>] Enable/disable various C++ language features
  49. -filt[=<a>[,<a>]] Control the filtering of both linker and compiler error messages;
  50. <a>={errors,names,returns,stdlib}
  51. -flags Show this summary of compiler options
  52. -flagsrc=<f> Accept command options from file <f>
  53. -fma=<a> Enable floating-point multiply-add instruction; <a>={none|fused}
  54. -fnonstd Initialize floating-point hardware to non-standard preferences
  55. -fns[={yes|no}] Select non-standard floating point mode
  56. -fpic Same as -Kpic
  57. -fround=<r> Select the IEEE rounding mode in effect at startup
  58. -fsimple[=<n>] Select floating-point optimization preferences <n>
  59. -ftrap=<t> Select floating-point trapping mode in effect at startup
  60. -g Compile for debugging
  61. -g0 Compile for debugging by dbx but allow inlining
  62. -g3 Compile for debugging by dbx including macros.
  63. -h <name> Assign <name> to generated dynamic shared library
  64. -help Same as -xhelp=flags
  65. -i Passed to linker to ignore any LD_LIBRARY_PATH setting
  66. -include <file> Include the contents of <file> before other files
  67. -inline=<v> Attempt inlining of specified user routines; <v>={%auto,<func>,no%<func>}
  68. -instances=<a> Control the link attributes of template instantiations;
  69. <a>={static|global|extern|explicit|semiexplicit}
  70. -instlib=<library> Inhibit generation of instances already in <library>
  71. -keeptmp Keep temporary files created during compilation
  72. -l<name> Link with library lib<name>.a or lib<name>.so
  73. -libmieee Same as -xlibmieee
  74. -libmil Same as -xlibmil
  75. -library=<a>[,<a>] Incorporates specified CC-provided libraries into compilation and linking
  76. -m32 Set 32-bit addressing model
  77. -m64 Set 64-bit addressing model
  78. -mc Remove duplicate strings from .comment section of output files
  79. -migration Show where to get information about migrating from C++ 4.2
  80. -misalign Expands to -xmemalign=1i
  81. -mr Remove all strings from .comment section of output files
  82. -mr,"string" Remove all strings and append "string" to .comment section
  83. -mt[={yes|no}] Specify options needed when compiling multi-threaded code
  84. -native Optimize for the host system (-xtarget=native)
  85. -noex Same as -features=no%except
  86. -o <outputfile> Set name of output file to <outputfile>
  87. -p Compile for profiling with prof
  88. +p Ignore non-standard preprocessor asserts
  89. -pg Compile for profiling with gprof
  90. -pic Same as -Kpic
  91. -qp Compile for profiling with prof
  92. -s Strip symbol table from the executable file
  93. -shared Same as -G
  94. -staticlib=<a>[,<a>] Force linkage of specified libraries to be static
  95. -sync_stdio[={yes|no}] Controls synchronization of the I/O libraries
  96. -temp=<path> Use <path> as directory for temporary files
  97. -template=<a>[,<a>] Enable/disable various template options;
  98. <a>={wholeclass,extdef,geninlinefuncs}
  99. -time Same as -xtime
  100. -traceback[=<a>[,<a>]] Provide stack traceback for the abnormal termination by signals; <a>={%none|common|<signal>}
  101. -unroll=<n> Enable unrolling loops <n> times where possible
  102. -v Same as -verbose=diags
  103. -verbose=<a>[,<a>] Control verbosity during compilation; <a>={template,diags,version}
  104. -w Suppress compiler warning messages
  105. +w Print warnings about additional questionable constructs
  106. +w2 Emit warnings for code with additional portability problems
  107. -xF[=<a>[,<a>]] Compile for later mapfile reordering and data fragmentation
  108. -xM Generate makefile dependencies
  109. -xM1 Generate makefile dependencies, but exclude /usr/include
  110. -xMD Generate makefile dependencies and compile at once
  111. -xMMD Generate makefile dependencies like -xMD, but excluding standard headers
  112. -xMF <file> Specify output <file> for makefile dependencies dump
  113. -xMerge Merge data segment into text segment
  114. -xO<n> Generate optimized code; <n>={1|2|3|4|5}
  115. -xalias_level[=<a>] Enable optimizations based on the specified alias_level;
  116. <a>={any|simple|compatible}
  117. -xanalyze=code Generate static analysis information for the code analyzer
  118. -xannotate[={yes|no}] Annotate binaries for optimization and analysis
  119. -xar Create archive library with instantiated templates
  120. -xarch=<a> Specify target architecture instruction set
  121. -xautopar Enable automatic loop parallelization
  122. -xbinopt[=<a>] Prepare the binary for binary optimizations and analysis;
  123. <a>={off|prepare}
  124. -xbuiltin[=<a>] Inline system functions and intrinsics when beneficial;
  125. <a>={%none|%default|%all}
  126. -xcache=<t> Define cache properties for use by optimizer
  127. -xchar[=<a>] Treat type char as signed (s) or unsigned (u);
  128. <a>={s|signed|u|unsigned}
  129. -xcheck[=<a>[,<a>]] Generate runtime checks for error condition;
  130. <a>={stkovf,init_local}
  131. -xchip=<a> Specify the target processor for use by the optimizer
  132. -xcode=<a> Generate different code for forming addresses;
  133. <a>={abs32|abs44|abs64|pic13|pic32}
  134. -xdebugformat=<a> Selects the format of debugging information; <a>={stabs|dwarf}
  135. -xdepend[={yes|no}] Analyze loops for data dependencies
  136. -xdumpmacros[=<a>[,<a>]] Prints macro definitions on the standard error output;
  137. <a>={defs,undefs,use,loc,conds,sys}
  138. -xdryrun The same as -###
  139. -xe Perform only syntax/semantic checking, no code generation
  140. -xhelp=<a> Display on-line help information; <a>={flags|readme}
  141. -xhwcprof[=<a>] Enable/disable program annotation for hardware counter profiling; <a>={enable|disable}
  142. -xia Enable interval arithmetic
  143. -xinline=<v> Attempt inlining of specified user routines; <v>={%auto,<func>,no%<func>}
  144. -xinstrument=[no_]datarace Enable/disable instrumentation for race detection tool
  145. -xipo[=<n>] Enable optimization and inlining across source files; <n>={0|1|2}
  146. -xipo_archive=<a> Enable crossfile optimization including archive files;
  147. <a>={none|readonly|writeback}
  148. -xivdep[=<a>] Ignore loop-carried dependences on array references in a loop; <a>={loop|loop_any|back|back_any|none}
  149. -xjobs=<n> Maximum number of components compiler will fork in parallel
  150. -xkeepframe[=<v>] Do not optimize stack frame of specified user routine; <v>={%all|%none|[no%]<func>}
  151. -xlang=<a>[,<a>] The set of languages used in the program; <a>={f77,f90,f95,c99}
  152. -xldscope=<a> Indicates the appropriate linker scoping within the source program;
  153. <a>={global|symbolic|hidden}
  154. -xlibmieee Force IEEE 754 return values for math routines in exceptional cases
  155. -xlibmil Inline selected libm math routines for optimization
  156. -xlibmopt Link with optimized math library
  157. -xlic_lib=sunperf (Obsolete) Use -library=sunperf instead
  158. -xlinkopt[={0,1,2}] Perform optimizations on relocatable object files
  159. -xloopinfo Show loops that parallelized
  160. -xmaxopt=[off,1,2,3,4,5] Maximum optimization level allowed on #pragma opt
  161. -xmemalign[=<a><b>] Controls memory alignment; <a>={1|2|4|8|16}, <b>={f|i|s}
  162. -xnolib Do not link with default system libraries
  163. -xnolibmil Cancel -xlibmil on command line
  164. -xnolibmopt Cancel -xlibmopt on command line
  165. -xnorunpath Do not build a runtime search path into the executable
  166. -xopenmp[=<a>] Enable OpenMP language extension; <a>={none|noopt|parallel}
  167. -xpagesize=<a> Controls the preferred page size for the stack and for the heap; <a>={8K|64K|512K|4M|32M|256M|2G|16G|default}
  168. -xpagesize_heap=<a> Controls the preferred page size for the heap; <a>={8K|64K|512K|4M|32M|256M|2G|16G|default}
  169. -xpagesize_stack=<a> Controls the preferred page size for the stack; <a>={8K|64K|512K|4M|32M|256M|2G|16G|default}
  170. -xpch=<t> Enable precompiled headers. Collect data for, or use existing, PCH file; <t>={auto|autofirst|{collect,use}:<file>[.cpch]}
  171. -xpchstop=<file> Specified include file marks end of initial common sequence of pre-processing directives for precompiled headers
  172. -xpec[={yes|no}] Generate a PEC binary
  173. -xpg Compile for profiling with gprof
  174. -xport64[=<a>] Enable extra checking for code ported from 32-bit to 64-bit platforms;
  175. <a>={no|implicit|full}
  176. -xprefetch[=<p>] Specify instruction prefetch; <p>={auto,no%auto,explicit,no%explicit,latx:<n>.<n>}
  177. -xprefetch_auto_type=<a> Specify automatic indirect prefetch insertion for loops;
  178. <a>={indirect_array_access}
  179. -xprefetch_level[=<n>] Controls the aggressiveness of the -xprefetch=auto option; <n>={1|2|3}
  180. -xprofile=<t> Collect data for a profile or use a profile to optimize; <t>={{collect,use}[:<path>],tcov}
  181. -xprofile_ircache[=<t>] Path to intermediate file cache used with -xprofile option
  182. -xprofile_pathmap=<collect-path>:<use-path> Map object file path from <collect-path> to <use-path>
  183. -xreduction Recognize reduction operations in parallelized loops
  184. -xregs=<a>[,<a>] Specify the usage of optional registers; <a>={appl,float,frameptr}
  185. -xrestrict[=<f>] Treat pointer valued function parameters as restricted; <f>={%none,%all,<function-name list>}
  186. -xs Allow debugging without object (.o) files
  187. -xsafe=mem Assume that no memory based traps will occur
  188. -xspace Do not do optimizations that increase code size
  189. -xtarget=<a> Specify target system for optimization
  190. -xtemp=<dir> Set directory for temporary files to <dir>
  191. -xthreadvar[=<a>] Control code generation for thread variables; <a>={dynamic}
  192. -xtime[=<a>] Report the execution time for each compilation phase; <a>={1|2|3}
  193. -xtrigraphs[={yes|no}] Enable|disable trigraph translation
  194. -xunroll=<n> Enable unrolling loops <n> times where possible
  195. -xustr=<a> Recognize sixteen-bit string literals; <a>={ascii_utf16_ushort|no}
  196. -xvector[=<a>[,<a>]] Automatic generation of calls to the vector library functions and/or the generation of the SIMD instructions; <a>={[no%]lib|%none}
  197. -xvis[={yes|no}] Enable the use of VIS inline templates
  198. -xvpara Verbose parallelization warnings
  199. -xwe Convert all warnings to errors
  200.  
  201. Suffix 'a' Object library
  202. Suffix 'il' Inline template file
  203. Suffix 'o' Object file
  204. Suffix 'so' Shared object
  205. Suffix 's' Assembler source
  206. Suffix 'S' Assembler source for cpp
  207. Suffix 'c' C++ source
  208. Suffix 'cc' C++ source
  209. Suffix 'cxx' C++ source
  210. Suffix 'cpp' C++ source
  211. Suffix 'C' C++ source
  212. Suffix 'c++' C++ source
  213. Suffix 'i' C++ source after preprocessing
  214. Suffix 'err' ld error file
  215. Suffix 'd' Build dependencies file
Advertisement
Add Comment
Please, Sign In to add comment