📄 install.texi
字号:
information, every time it is run. This is for internal developmentpurposes, and only works when the compiler is being built with gcc. The@var{level} argument controls whether the compiler is built optimized ornot, values are @samp{opt} and @samp{noopt}. For coverage analysis youwant to disable optimization, for performance analysis you want toenable optimization. When coverage is enabled, the default level iswithout optimization.@item --enable-gather-detailed-mem-statsWhen this option is specified more detailed information on memoryallocation is gathered. This information is printed when using@option{-fmem-report}.@item --with-gc@itemx --with-gc=@var{choice}With this option you can specify the garbage collector implementationused during the compilation process. @var{choice} can be one of@samp{page} and @samp{zone}, where @samp{page} is the default.@item --enable-nls@itemx --disable-nlsThe @option{--enable-nls} option enables Native Language Support (NLS),which lets GCC output diagnostics in languages other than AmericanEnglish. Native Language Support is enabled by default if not doing acanadian cross build. The @option{--disable-nls} option disables NLS@.@item --with-included-gettextIf NLS is enabled, the @option{--with-included-gettext} option causes the buildprocedure to prefer its copy of GNU @command{gettext}.@item --with-catgetsIf NLS is enabled, and if the host lacks @code{gettext} but has theinferior @code{catgets} interface, the GCC build procedure normallyignores @code{catgets} and instead uses GCC's copy of the GNU@code{gettext} library. The @option{--with-catgets} option causes thebuild procedure to use the host's @code{catgets} in this situation.@item --with-libiconv-prefix=@var{dir}Search for libiconv header files in @file{@var{dir}/include} andlibiconv library files in @file{@var{dir}/lib}.@item --enable-obsoleteEnable configuration for an obsoleted system. If you attempt toconfigure GCC for a system (build, host, or target) which has beenobsoleted, and you do not specify this flag, configure will halt with anerror message.All support for systems which have been obsoleted in one release of GCCis removed entirely in the next major release, unless someone stepsforward to maintain the port.@item --enable-decimal-float@itemx --enable-decimal-float=yes@itemx --enable-decimal-float=no@itemx --enable-decimal-float=bid@itemx --enable-decimal-float=dpd@itemx --disable-decimal-floatEnable (or disable) support for the C decimal floating point extensionthat is in the IEEE 754R extension to the IEEE754 floating pointstandard. This is enabled by default only on PowerPC, i386, andx86_64 GNU/Linux systems. Other systems may also support it, butrequire the user to specifically enable it. You can optionallycontrol which decimal floating point format is used (either @samp{bid}or @samp{dpd}). The @samp{bid} (binary integer decimal) format isdefault on i386 and x86_64 systems, and the @samp{dpd} (densely packeddecimal) format is default on PowerPC systems.@item --enable-fixed-point@itemx --disable-fixed-pointEnable (or disable) support for C fixed-point arithmetic.This option is enabled by default for some targets (such as MIPS) whichhave hardware-support for fixed-point operations. On other targets, youmay enable this option manually.@item --with-long-double-128Specify if @code{long double} type should be 128-bit by default on selectedGNU/Linux architectures. If using @code{--without-long-double-128},@code{long double} will be by default 64-bit, the same as @code{double} type.When neither of these configure options are used, the default will be128-bit @code{long double} when built against GNU C Library 2.4 and later,64-bit @code{long double} otherwise.@item --with-gmp=@var{pathname}@itemx --with-gmp-include=@var{pathname}@itemx --with-gmp-lib=@var{pathname}@itemx --with-mpfr=@var{pathname}@itemx --with-mpfr-include=@var{pathname}@itemx --with-mpfr-lib=@var{pathname}If you do not have GMP (the GNU Multiple Precision library) and theMPFR Libraries installed in a standard location and you want to buildGCC, you can explicitly specify the directory where they are installed(@samp{--with-gmp=@var{gmpinstalldir}},@samp{--with-mpfr=@var{mpfrinstalldir}}). The@option{--with-gmp=@var{gmpinstalldir}} option is shorthand for@option{--with-gmp-lib=@var{gmpinstalldir}/lib} and@option{--with-gmp-include=@var{gmpinstalldir}/include}. Likewise the@option{--with-mpfr=@var{mpfrinstalldir}} option is shorthand for@option{--with-mpfr-lib=@var{mpfrinstalldir}/lib} and@option{--with-mpfr-include=@var{mpfrinstalldir}/include}. If theseshorthand assumptions are not correct, you can use the explicitinclude and lib options directly.@item --with-debug-prefix-map=@var{map}Convert source directory names using @option{-fdebug-prefix-map} whenbuilding runtime libraries. @samp{@var{map}} is a space-separatedlist of maps of the form @samp{@var{old}=@var{new}}.@end table@subheading Cross-Compiler-Specific OptionsThe following options only apply to building cross compilers.@table @code@item --with-sysroot@itemx --with-sysroot=@var{dir}Tells GCC to consider @var{dir} as the root of a tree that contains a(subset of) the root filesystem of the target operating system.Target system headers, libraries and run-time object files will besearched in there. The specified directory is not copied into theinstall tree, unlike the options @option{--with-headers} and@option{--with-libs} that this option obsoletes. The default value,in case @option{--with-sysroot} is not given an argument, is@option{$@{gcc_tooldir@}/sys-root}. If the specified directory is asubdirectory of @option{$@{exec_prefix@}}, then it will be found relative tothe GCC binaries if the installation tree is moved.@item --with-build-sysroot@itemx --with-build-sysroot=@var{dir}Tells GCC to consider @var{dir} as the system root (see@option{--with-sysroot}) while building target libraries, instead ofthe directory specified with @option{--with-sysroot}. This option isonly useful when you are already using @option{--with-sysroot}. Youcan use @option{--with-build-sysroot} when you are configuring with@option{--prefix} set to a directory that is different from the one inwhich you are installing GCC and your target libraries. This option affects the system root for the compiler used to buildtarget libraries (which runs on the build system); it does not affectthe compiler which is used to build GCC itself.@item --with-headers@itemx --with-headers=@var{dir}Deprecated in favor of @option{--with-sysroot}.Specifies that target headers are available when building a cross compiler.The @var{dir} argument specifies a directory which has the target includefiles. These include files will be copied into the @file{gcc} installdirectory. @emph{This option with the @var{dir} argument is required} whenbuilding a cross compiler, if @file{@var{prefix}/@var{target}/sys-include}doesn't pre-exist. If @file{@var{prefix}/@var{target}/sys-include} doespre-exist, the @var{dir} argument may be omitted. @command{fixincludes}will be run on these files to make them compatible with GCC@.@item --without-headersTells GCC not use any target headers from a libc when building a crosscompiler. When crossing to GNU/Linux, you need the headers so GCCcan build the exception handling for libgcc.@item --with-libs@itemx --with-libs=``@var{dir1} @var{dir2} @dots{} @var{dirN}''Deprecated in favor of @option{--with-sysroot}.Specifies a list of directories which contain the target runtimelibraries. These libraries will be copied into the @file{gcc} installdirectory. If the directory list is omitted, this option has noeffect.@item --with-newlibSpecifies that @samp{newlib} isbeing used as the target C library. This causes @code{__eprintf} to beomitted from @file{libgcc.a} on the assumption that it will be provided by@samp{newlib}.@item --with-build-time-tools=@var{dir}Specifies where to find the set of target tools (assembler, linker, etc.)that will be used while building GCC itself. This option can be usefulif the directory layouts are different between the system you are buildingGCC on, and the system where you will deploy it.For example, on a @option{ia64-hp-hpux} system, you may have the GNUassembler and linker in @file{/usr/bin}, and the native tools in adifferent path, and build a toolchain that expects to find thenative tools in @file{/usr/bin}.When you use this option, you should ensure that @var{dir} includes@command{ar}, @command{as}, @command{ld}, @command{nm},@command{ranlib} and @command{strip} if necessary, and possibly@command{objdump}. Otherwise, GCC may use an inconsistent set oftools.@end table@subheading Java-Specific OptionsThe following option applies to the build of the Java front end.@table @code@item --disable-libgcjSpecify that the run-time librariesused by GCJ should not be built. This is useful in case you intendto use GCJ with some other run-time, or you're going to install itseparately, or it just happens not to build on your particularmachine. In general, if the Java front end is enabled, the GCJlibraries will be enabled too, unless they're known to not work onthe target platform. If GCJ is enabled but @samp{libgcj} isn't built, youmay need to port it; in this case, before modifying the top-level@file{configure.in} so that @samp{libgcj} is enabled by default on this platform,you may use @option{--enable-libgcj} to override the default.@end tableThe following options apply to building @samp{libgcj}.@subsubheading General Options@table @code@item --enable-java-maintainer-modeBy default the @samp{libjava} build will not attempt to compile the@file{.java} source files to @file{.class}. Instead, it will use the@file{.class} files from the source tree. If you use this option youmust have executables named @command{ecj1} and @command{gjavah} in your pathfor use by the build. You must use this option if you intend tomodify any @file{.java} files in @file{libjava}.@item --with-java-home=@var{dirname}This @samp{libjava} option overrides the default value of the@samp{java.home} system property. It is also used to set@samp{sun.boot.class.path} to @file{@var{dirname}/lib/rt.jar}. Bydefault @samp{java.home} is set to @file{@var{prefix}} and@samp{sun.boot.class.path} to@file{@var{datadir}/java/libgcj-@var{version}.jar}.@item --with-ecj-jar=@var{filename}This option can be used to specify the location of an external jarfile containing the Eclipse Java compiler. A specially modifiedversion of this compiler is used by @command{gcj} to parse@file{.java} source files. If this option is given, the@samp{libjava} build will create and install an @file{ecj1} executablewhich uses this jar file at runtime.If this option is not given, but an @file{ecj.jar} file is found inthe topmost source tree at configure time, then the @samp{libgcj}build will create and install @file{ecj1}, and will also install thediscovered @file{ecj.jar} into a suitable place in the install tree.If @file{ecj1} is not installed, then the user will have to supply oneon his path in order for @command{gcj} to properly parse @file{.java}source files. A suitable jar is available from@uref{ftp://sourceware.org/pub/java/}.@item --disable-getenv-propertiesDon't set system properties from @env{GCJ_PROPERTIES}.@item --enable-hash-synchronizationUse a global hash table for monitor locks. Ordinarily,@samp{libgcj}'s @samp{configure} script automatically makesthe correct choice for this option for your platform. Only usethis if you know you need the library to be configured differently.@item --enable-interpreterEnable the Java interpreter. The interpreter is automaticallyenabled by default on all platforms that support it. This optionis really only useful if you want to disable the interpreter(using @option{--disable-interpreter}).@item --disable-java-netDisable java.net. This disables the native part of java.net only,using non-functional stubs for native method implementations.@item --disable-jvmpiDisable JVMPI support.@item --disable-libgcj-bcDisable BC ABI compilation of certain parts of libgcj. By default,some portions of libgcj are compiled with @option{-findirect-dispatch}and @option{-fno-indirect-classes}, allowing them to be overridden atrun-time.If @option{--disable-libgcj-bc} is specified, libgcj is built withoutthese options. This allows the compile-time linker to resolvedependencies when statically linking to libgcj. However it makes itimpossible to override the affected portions of libgcj at run-time.@item --with-ecosEnable runtime eCos target support.@item --without-libffiDon't use @samp{libffi}. This will disable the interpreter and JNIsupport as well, as these require @samp{libffi} to work.@item --enable-libgcj-debugEnable runtime debugging code.@item --enable-libgcj-multifileIf specified, causes all @file{.java} source files to becompiled into @file{.class} files in one invocation of@samp{gcj}. This can speed up build time, but is moreresource-intensive. If this option is unspecified ordisabled, @samp{gcj} is invoked once for each @file{.java}file to compile into a @file{.class} file.@item --with-libiconv-prefix=DIRSearch for libiconv in @file{DIR/include} and @file{DIR/lib}.@item --enable-sjlj-exceptionsForce use of the @code{setjmp}/@code{longjmp}-based scheme for exceptions.@samp{configure} ordinarily picks the correct value based on the platform.Only use this option if you are sure you need a different setting.@item --with-system-zlibUse installed @samp{zlib} rather than that included with GCC@.@item --with-win32-nlsapi=ansi, unicows or unicodeIndicates how MinGW @samp{libgcj} translates between UNICODEcharacters and the Win32 API@.@table @code@item ansiUse the single-byte @code{char} and the Win32 A functions natively,translating to and from UNICODE when using these functions. Ifunspecified, this is the default.@item unicowsUse the @code{WCHAR} and Win32 W functions natively. Adds@code{-lunicows} to @file{libgcj.spec} to link with @samp{libunicows}.@file{unicows.dll} needs to be deployed on Microsoft Windows 9X machinesrunning built executables. @file{libunicows.a}, an open-sourceimport library around Microsoft's @code{unicows.dll}, is obtained from@uref{http://libunicows.sourceforge.net/}, which also gives detailson getting @file{unicows.dll} from
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -