📄 install.texi
字号:
@item --disable-threadsSpecify that threading support should be disabled for the system.This is an alias for @option{--enable-threads=single}.@item --enable-threads=@var{lib}Specify that@var{lib} is the thread support library. This affects the Objective-Ccompiler and runtime library, and exception handling for other languageslike C++ and Java. The possibilities for @var{lib} are:@table @code@item aixAIX thread support.@item dceDCE thread support.@item gnatAda tasking support. For non-Ada programs, this setting is equivalentto @samp{single}. When used in conjunction with the Ada run time, itcauses GCC to use the same thread primitives as Ada uses. This optionis necessary when using both Ada and the back end exception handling,which is the default for most Ada targets.@item machGeneric MACH thread support, known to work on NeXTSTEP@. (Please notethat the file needed to support this configuration, @file{gthr-mach.h}, ismissing and thus this setting will cause a known bootstrap failure.)@item noThis is an alias for @samp{single}.@item posixGeneric POSIX/Unix98 thread support.@item posix95Generic POSIX/Unix95 thread support.@item rtemsRTEMS thread support.@item singleDisable thread support, should work for all platforms.@item solarisSun Solaris 2 thread support.@item vxworksVxWorks thread support.@item win32Microsoft Win32 API thread support.@item nksNovell Kernel Services thread support.@end table@item --enable-tlsSpecify that the target supports TLS (Thread Local Storage). Usuallyconfigure can correctly determine if TLS is supported. In cases whereit guesses incorrectly, TLS can be explicitly enabled or disabled with@option{--enable-tls} or @option{--disable-tls}. This can happen ifthe assembler supports TLS but the C library does not, or if theassumptions made by the configure test are incorrect.@item --disable-tlsSpecify that the target does not support TLS.This is an alias for @option{--enable-tls=no}.@item --with-cpu=@var{cpu}Specify which cpu variant the compiler should generate code for by default.@var{cpu} will be used as the default value of the @option{-mcpu=} switch.This option is only supported on some targets, including ARM, i386, M68k,PowerPC, and SPARC@.@item --with-schedule=@var{cpu}@itemx --with-arch=@var{cpu}@itemx --with-tune=@var{cpu}@itemx --with-abi=@var{abi}@itemx --with-fpu=@var{type}@itemx --with-float=@var{type}These configure options provide default values for the @option{-mschedule=},@option{-march=}, @option{-mtune=}, @option{-mabi=}, and @option{-mfpu=}options and for @option{-mhard-float} or @option{-msoft-float}. As with@option{--with-cpu}, which switches will be accepted and acceptable valuesof the arguments depend on the target.@item --with-mode=@var{mode}Specify if the compiler should default to @option{-marm} or @option{-mthumb}.This option is only supported on ARM targets.@item --with-divide=@var{type}Specify how the compiler should generate code for checking fordivision by zero. This option is only supported on the MIPS target.The possibilities for @var{type} are:@table @code@item trapsDivision by zero checks use conditional traps (this is the default onsystems that support conditional traps).@item breaksDivision by zero checks use the break instruction.@end table@c If you make --with-llsc the default for additional targets,@c update the --with-llsc description in the MIPS section below.@item --with-llscOn MIPS targets, make @option{-mllsc} the default when no@option{-mno-lsc} option is passed. This is the default forLinux-based targets, as the kernel will emulate them if the ISA doesnot provide them.@item --without-llscOn MIPS targets, make @option{-mno-llsc} the default when no@option{-mllsc} option is passed.@item --enable-__cxa_atexitDefine if you want to use __cxa_atexit, rather than atexit, toregister C++ destructors for local statics and global objects.This is essential for fully standards-compliant handling ofdestructors, but requires __cxa_atexit in libc. This option is currentlyonly available on systems with GNU libc. When enabled, this will cause@option{-fuse-cxa-atexit} to be passed by default.@item --enable-target-optspaceSpecify that targetlibraries should be optimized for code space instead of code speed.This is the default for the m32r platform.@item --disable-cppSpecify that a user visible @command{cpp} program should not be installed.@item --with-cpp-install-dir=@var{dirname}Specify that the user visible @command{cpp} program should be installedin @file{@var{prefix}/@var{dirname}/cpp}, in addition to @var{bindir}.@item --enable-initfini-arrayForce the use of sections @code{.init_array} and @code{.fini_array}(instead of @code{.init} and @code{.fini}) for constructors anddestructors. Option @option{--disable-initfini-array} has theopposite effect. If neither option is specified, the configure scriptwill try to guess whether the @code{.init_array} and@code{.fini_array} sections are supported and, if they are, use them.@item --enable-maintainer-modeThe build rules thatregenerate the GCC master message catalog @file{gcc.pot} are normallydisabled. This is because it can only be rebuilt if the complete sourcetree is present. If you have changed the sources and want to rebuild thecatalog, configuring with @option{--enable-maintainer-mode} will enablethis. Note that you need a recent version of the @code{gettext} toolsto do so.@item --disable-bootstrapFor a native build, the default configuration is to performa 3-stage bootstrap of the compiler when @samp{make} is invoked,testing that GCC can compile itself correctly. If you want to disablethis process, you can configure with @option{--disable-bootstrap}.@item --enable-bootstrapIn special cases, you may want to perform a 3-stage buildeven if the target and host triplets are different.This could happen when the host can run code compiled forthe target (e.g.@: host is i686-linux, target is i486-linux).Starting from GCC 4.2, to do this you have to configure explicitlywith @option{--enable-bootstrap}.@item --enable-generated-files-in-srcdirNeither the .c and .h files that are generated from Bison and flex nor theinfo manuals and man pages that are built from the .texi files are presentin the SVN development tree. When building GCC from that development tree,or from one of our snapshots, those generated files are placed in yourbuild directory, which allows for the source to be in a readonlydirectory.If you configure with @option{--enable-generated-files-in-srcdir} then thosegenerated files will go into the source directory. This is mainly intendedfor generating release or prerelease tarballs of the GCC sources, since itis not a requirement that the users of source releases to have flex, Bison,or makeinfo.@item --enable-version-specific-runtime-libsSpecifythat runtime libraries should be installed in the compiler specificsubdirectory (@file{@var{libdir}/gcc}) rather than the usual places. Inaddition, @samp{libstdc++}'s include files will be installed into@file{@var{libdir}} unless you overruled it by using@option{--with-gxx-include-dir=@var{dirname}}. Using this option isparticularly useful if you intend to use several versions of GCC inparallel. This is currently supported by @samp{libgfortran},@samp{libjava}, @samp{libmudflap}, @samp{libstdc++}, and @samp{libobjc}.@item --enable-languages=@var{lang1},@var{lang2},@dots{}Specify that only a particular subset of compilers andtheir runtime libraries should be built. For a list of valid values for@var{langN} you can issue the following command in the@file{gcc} directory of your GCC source tree:@*@smallexamplegrep language= */config-lang.in@end smallexampleCurrently, you can use any of the following:@code{all}, @code{ada}, @code{c}, @code{c++}, @code{fortran}, @code{java},@code{objc}, @code{obj-c++}, @code{treelang}.Building the Ada compiler has special requirements, see below.If you do not pass this flag, or specify the option @code{all}, then alldefault languages available in the @file{gcc} sub-tree will be configured.Ada, Objective-C++, and treelang are not default languages; the rest are.Re-defining @code{LANGUAGES} when calling @samp{make} @strong{does not}work anymore, as those language sub-directories might not have beenconfigured!@item --enable-stage1-languages=@var{lang1},@var{lang2},@dots{}Specify that a particular subset of compilers and their runtimelibraries should be built with the system C compiler during stage 1 ofthe bootstrap process, rather than only in later stages with thebootstrapped C compiler. The list of valid values is the same as for@option{--enable-languages}, and the option @code{all} will select allof the languages enabled by @option{--enable-languages}. This option isprimarily useful for GCC development; for instance, when a developmentversion of the compiler cannot bootstrap due to compiler bugs, or whenone is debugging front ends other than the C front end. When thisoption is used, one can then build the target libraries for thespecified languages with the stage-1 compiler by using @command{makestage1-bubble all-target}, or run the testsuite on the stage-1 compilerfor the specified languages using @command{make stage1-start check-gcc}.@item --disable-libadaSpecify that the run-time libraries and tools used by GNAT should notbe built. This can be useful for debugging, or for compatibility withprevious Ada build procedures, when it was required to explicitlydo a @samp{make -C gcc gnatlib_and_tools}.@item --disable-libsspSpecify that the run-time libraries for stack smashing protectionshould not be built.@item --disable-libgompSpecify that the run-time libraries used by GOMP should not be built.@item --with-dwarf2Specify that the compiler shoulduse DWARF 2 debugging information as the default.@item --enable-targets=all@itemx --enable-targets=@var{target_list}Some GCC targets, e.g.@: powerpc64-linux, build bi-arch compilers.These are compilers that are able to generate either 64-bit or 32-bitcode. Typically, the corresponding 32-bit target, e.g.@:powerpc-linux for powerpc64-linux, only generates 32-bit code. Thisoption enables the 32-bit target to be a bi-arch compiler, which isuseful when you want a bi-arch compiler that defaults to 32-bit, andyou are building a bi-arch or multi-arch binutils in a combined tree.Currently, this option only affects powerpc-linux and x86-linux.@item --enable-securepltThis option enables @option{-msecure-plt} by default for powerpc-linux.@ifnothtml@xref{RS/6000 and PowerPC Options,, RS/6000 and PowerPC Options, gcc,Using the GNU Compiler Collection (GCC)},@end ifnothtml@ifhtmlSee ``RS/6000 and PowerPC Options'' in the main manual@end ifhtml@item --enable-cldThis option enables @option{-mcld} by default for 32-bit x86 targets.@ifnothtml@xref{i386 and x86-64 Options,, i386 and x86-64 Options, gcc,Using the GNU Compiler Collection (GCC)},@end ifnothtml@ifhtmlSee ``i386 and x86-64 Options'' in the main manual@end ifhtml@item --enable-win32-registry@itemx --enable-win32-registry=@var{key}@itemx --disable-win32-registryThe @option{--enable-win32-registry} option enables Microsoft Windows-hosted GCCto look up installations paths in the registry using the following key:@smallexample@code{HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\@var{key}}@end smallexample@var{key} defaults to GCC version number, and can be overridden by the@option{--enable-win32-registry=@var{key}} option. Vendors and distributorswho use custom installers are encouraged to provide a different key,perhaps one comprised of vendor name and GCC version number, toavoid conflict with existing installations. This feature is enabledby default, and can be disabled by @option{--disable-win32-registry}option. This option has no effect on the other hosts.@item --nfpSpecify that the machine does not have a floating point unit. Thisoption only applies to @samp{m68k-sun-sunos@var{n}}. On any othersystem, @option{--nfp} has no effect.@item --enable-werror@itemx --disable-werror@itemx --enable-werror=yes@itemx --enable-werror=noWhen you specify this option, it controls whether certain files in thecompiler are built with @option{-Werror} in bootstrap stage2 and later.If you don't specify it, @option{-Werror} is turned on for the maindevelopment trunk. However it defaults to off for release branches andfinal releases. The specific files which get @option{-Werror} arecontrolled by the Makefiles.@item --enable-checking@itemx --enable-checking=@var{list}When you specify this option, the compiler is built to perform internalconsistency checks of the requested complexity. This does not change thegenerated code, but adds error checking within the compiler. This willslow down the compiler and may only work properly if you are buildingthe compiler with GCC@. This is @samp{yes} by default when buildingfrom SVN or snapshots, but @samp{release} for releases. More controlover the checks may be had by specifying @var{list}. The categories ofchecks available are @samp{yes} (most common checks@samp{assert,misc,tree,gc,rtlflag,runtime}), @samp{no} (no checks atall), @samp{all} (all but @samp{valgrind}), @samp{release} (cheapestchecks @samp{assert,runtime}) or @samp{none} (same as @samp{no}).Individual checks can be enabled with these flags @samp{assert},@samp{df}, @samp{fold}, @samp{gc}, @samp{gcac} @samp{misc}, @samp{rtl},@samp{rtlflag}, @samp{runtime}, @samp{tree}, and @samp{valgrind}.The @samp{valgrind} check requires the external @command{valgrind}simulator, available from @uref{http://valgrind.org/}. The@samp{df}, @samp{rtl}, @samp{gcac} and @samp{valgrind} checks are very expensive.To disable all checking, @samp{--disable-checking} or@samp{--enable-checking=none} must be explicitly requested. Disablingassertions will make the compiler and runtime slightly faster butincrease the risk of undetected internal errors causing wrong code to begenerated.@item --enable-coverage@itemx --enable-coverage=@var{level}With this option, the compiler is built to collect self coverage
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -