⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.texi

📁 理解和实践操作系统的一本好书
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
@var{dirname} correctly if it contains the @samp{~} metacharacter; use@env{$HOME} instead.The following standard @command{autoconf} options are supported.  Normally youshould not need to use these options.@table @code@item --exec-prefix=@var{dirname}Specify the toplevel installation directory for architecture-dependentfiles.  The default is @file{@var{prefix}}.@item --bindir=@var{dirname}Specify the installation directory for the executables called by users(such as @command{gcc} and @command{g++}).  The default is@file{@var{exec-prefix}/bin}.@item --libdir=@var{dirname}Specify the installation directory for object code libraries andinternal data files of GCC@.  The default is @file{@var{exec-prefix}/lib}.@item --libexecdir=@var{dirname}Specify the installation directory for internal executables of GCC@.  The default is @file{@var{exec-prefix}/libexec}.@item --with-slibdir=@var{dirname}Specify the installation directory for the shared libgcc library.  Thedefault is @file{@var{libdir}}.@item --infodir=@var{dirname}Specify the installation directory for documentation in info format.The default is @file{@var{prefix}/info}.@item --datadir=@var{dirname}Specify the installation directory for some architecture-independentdata files referenced by GCC@.  The default is @file{@var{prefix}/share}.@item --mandir=@var{dirname}Specify the installation directory for manual pages.  The default is@file{@var{prefix}/man}.  (Note that the manual pages are only extracts fromthe full GCC manuals, which are provided in Texinfo format.  The manpagesare derived by an automatic conversion process from parts of the fullmanual.)@item --with-gxx-include-dir=@var{dirname}Specifythe installation directory for G++ header files.  The default is@file{@var{prefix}/include/c++/@var{version}}.@end table@item --program-prefix=@var{prefix}GCC supports some transformations of the names of its programs wheninstalling them.  This option prepends @var{prefix} to the names ofprograms to install in @var{bindir} (see above).  For example, specifying@option{--program-prefix=foo-} would result in @samp{gcc}being installed as @file{/usr/local/bin/foo-gcc}.@item --program-suffix=@var{suffix}Appends @var{suffix} to the names of programs to install in @var{bindir}(see above).  For example, specifying @option{--program-suffix=-3.1}would result in @samp{gcc} being installed as@file{/usr/local/bin/gcc-3.1}.@item --program-transform-name=@var{pattern}Applies the @samp{sed} script @var{pattern} to be applied to the namesof programs to install in @var{bindir} (see above).  @var{pattern} has toconsist of one or more basic @samp{sed} editing commands, separated bysemicolons.  For example, if you want the @samp{gcc} program name to betransformed to the installed program @file{/usr/local/bin/myowngcc} andthe @samp{g++} program name to be transformed to@file{/usr/local/bin/gspecial++} without changing other program names,you could use the pattern@option{--program-transform-name='s/^gcc$/myowngcc/; s/^g++$/gspecial++/'}to achieve this effect.All three options can be combined and used together, resulting in morecomplex conversion patterns.  As a basic rule, @var{prefix} (and@var{suffix}) are prepended (appended) before further transformationscan happen with a special transformation script @var{pattern}.As currently implemented, this option only takes effect for nativebuilds; cross compiler binaries' names are not transformed even when atransformation is explicitly asked for by one of these options.For native builds, some of the installed programs are also installedwith the target alias in front of their name, as in@samp{i686-pc-linux-gnu-gcc}.  All of the above transformations happenbefore the target alias is prepended to the name---so, specifying@option{--program-prefix=foo-} and @option{program-suffix=-3.1}, theresulting binary would be installed as@file{/usr/local/bin/i686-pc-linux-gnu-foo-gcc-3.1}.As a last shortcoming, none of the installed Ada programs aretransformed yet, which will be fixed in some time.@item --with-local-prefix=@var{dirname}Specify theinstallation directory for local include files.  The default is@file{/usr/local}.  Specify this option if you want the compiler tosearch directory @file{@var{dirname}/include} for locally installedheader files @emph{instead} of @file{/usr/local/include}.You should specify @option{--with-local-prefix} @strong{only} if yoursite has a different convention (not @file{/usr/local}) for where to putsite-specific files.The default value for @option{--with-local-prefix} is @file{/usr/local}regardless of the value of @option{--prefix}.  Specifying@option{--prefix} has no effect on which directory GCC searches forlocal header files.  This may seem counterintuitive, but actually it islogical.The purpose of @option{--prefix} is to specify where to @emph{installGCC}.  The local header files in @file{/usr/local/include}---if you putany in that directory---are not part of GCC@.  They are part of otherprograms---perhaps many others.  (GCC installs its own header files inanother directory which is based on the @option{--prefix} value.)Both the local-prefix include directory and the GCC-prefix includedirectory are part of GCC's ``system include'' directories.  Although thesetwo directories are not fixed, they need to be searched in the properorder for the correct processing of the include_next directive.  Thelocal-prefix include directory is searched before the GCC-prefixinclude directory.  Another characteristic of system include directoriesis that pedantic warnings are turned off for headers in these directories.Some autoconf macros add @option{-I @var{directory}} options to thecompiler command line, to ensure that directories containing installedpackages' headers are searched.  When @var{directory} is one of GCC'ssystem include directories, GCC will ignore the option so that systemdirectories continue to be processed in the correct order.  Thismay result in a search order different from what was specified but thedirectory will still be searched.GCC automatically searches for ordinary libraries using@env{GCC_EXEC_PREFIX}.  Thus, when the same installation prefix isused for both GCC and packages, GCC will automatically search forboth headers and libraries.  This provides a configuration that iseasy to use.  GCC behaves in a manner similar to that when it isinstalled as a system compiler in @file{/usr}.Sites that need to install multiple versions of GCC may not want touse the above simple configuration.  It is possible to use the@option{--program-prefix}, @option{--program-suffix} and@option{--program-transform-name} options to install multiple versionsinto a single directory, but it may be simpler to use different prefixesand the @option{--with-local-prefix} option to specify the location of thesite-specific files for each version.  It will then be necessary forusers to specify explicitly the location of local site libraries(e.g., with @env{LIBRARY_PATH}).The same value can be used for both @option{--with-local-prefix} and@option{--prefix} provided it is not @file{/usr}.  This can be usedto avoid the default search of @file{/usr/local/include}.@strong{Do not} specify @file{/usr} as the @option{--with-local-prefix}!The directory you use for @option{--with-local-prefix} @strong{must not}contain any of the system's standard header files.  If it did containthem, certain programs would be miscompiled (including GNU Emacs, oncertain targets), because this would override and nullify the headerfile corrections made by the @command{fixincludes} script.Indications are that people who use this option use it based on mistakenideas of what it is for.  People use it as if it specified where toinstall part of GCC@.  Perhaps they make this assumption becauseinstalling GCC creates the directory.@item --enable-shared[=@var{package}[,@dots{}]]Build shared versions of libraries, if shared libraries are supported onthe target platform.  Unlike GCC 2.95.x and earlier, shared librariesare enabled by default on all platforms that support shared libraries.If a list of packages is given as an argument, build shared librariesonly for the listed packages.  For other packages, only static librarieswill be built.  Package names currently recognized in the GCC tree are@samp{libgcc} (also known as @samp{gcc}), @samp{libstdc++} (not@samp{libstdc++-v3}), @samp{libffi}, @samp{zlib}, @samp{boehm-gc},@samp{ada}, @samp{libada}, @samp{libjava} and @samp{libobjc}.Note @samp{libiberty} does not support shared libraries at all.Use @option{--disable-shared} to build only static libraries.  Note that@option{--disable-shared} does not accept a list of package names asargument, only @option{--enable-shared} does.@item @anchor{with-gnu-as}--with-gnu-asSpecify that the compiler should assume that theassembler it finds is the GNU assembler.  However, this does not modifythe rules to find an assembler and will result in confusion if theassembler found is not actually the GNU assembler.  (Confusion may alsoresult if the compiler finds the GNU assembler but has not beenconfigured with @option{--with-gnu-as}.)  If you have more than oneassembler installed on your system, you may want to use this option inconnection with @option{--with-as=@var{pathname}} or@option{--with-build-time-tools=@var{pathname}}.The following systems are the only ones where it makes a differencewhether you use the GNU assembler.  On any other system,@option{--with-gnu-as} has no effect.@itemize @bullet@item @samp{hppa1.0-@var{any}-@var{any}}@item @samp{hppa1.1-@var{any}-@var{any}}@item @samp{i386-@var{any}-sysv}@item @samp{m68k-bull-sysv}@item @samp{m68k-hp-hpux}@item @samp{m68000-hp-hpux}@item @samp{m68000-att-sysv}@item @samp{sparc-sun-solaris2.@var{any}}@item @samp{sparc64-@var{any}-solaris2.@var{any}}@end itemizeOn the systems listed above (except for the HP-PA, the SPARC, for ISC onthe 386, if you use the GNU assembler, you should also use the GNU linker(and specify @option{--with-gnu-ld}).@item @anchor{with-as}--with-as=@var{pathname}Specify that the compiler should use the assembler pointed to by@var{pathname}, rather than the one found by the standard rules to findan assembler, which are:@itemize @bullet@itemUnless GCC is being built with a cross compiler, check the@file{@var{libexec}/gcc/@var{target}/@var{version}} directory.@var{libexec} defaults to @file{@var{exec-prefix}/libexec};@var{exec-prefix} defaults to @var{prefix}, whichdefaults to @file{/usr/local} unless overridden by the@option{--prefix=@var{pathname}} switch described above.  @var{target}is the target system triple, such as @samp{sparc-sun-solaris2.7}, and@var{version} denotes the GCC version, such as 3.0.@itemIf the target system is the same that you are building on, checkoperating system specific directories (e.g.@: @file{/usr/ccs/bin} onSun Solaris 2).@itemCheck in the @env{PATH} for a tool whose name is prefixed by thetarget system triple.@itemCheck in the @env{PATH} for a tool whose name is not prefixed by thetarget system triple, if the host and target system triple arethe same (in other words, we use a host tool if it can be used forthe target as well).@end itemizeYou may want to use @option{--with-as} if no assembleris installed in the directories listed above, or if you have multipleassemblers installed and want to choose one that is not found by theabove rules.@item @anchor{with-gnu-ld}--with-gnu-ldSame as @uref{#with-gnu-as,,@option{--with-gnu-as}}but for the linker.@item --with-ld=@var{pathname}Same as @uref{#with-as,,@option{--with-as}}but for the linker.@item --with-stabsSpecify that stabs debugginginformation should be used instead of whatever format the host normallyuses.  Normally GCC uses the same debug format as the host system.On MIPS based systems and on Alphas, you must specify whether you wantGCC to create the normal ECOFF debugging format, or to use BSD-stylestabs passed through the ECOFF symbol table.  The normal ECOFF debugformat cannot fully handle languages other than C@.  BSD stabs format canhandle other languages, but it only works with the GNU debugger GDB@.Normally, GCC uses the ECOFF debugging format by default; if youprefer BSD stabs, specify @option{--with-stabs} when you configure GCC@.No matter which default you choose when you configure GCC, the usercan use the @option{-gcoff} and @option{-gstabs+} options to specify explicitlythe debug format for a particular compilation.@option{--with-stabs} is meaningful on the ISC system on the 386, also, if@option{--with-gas} is used.  It selects use of stabs debugginginformation embedded in COFF output.  This kind of debugging informationsupports C++ well; ordinary COFF debugging information does not.@option{--with-stabs} is also meaningful on 386 systems running SVR4.  Itselects use of stabs debugging information embedded in ELF output.  TheC++ compiler currently (2.6.0) does not support the DWARF debugginginformation normally used on 386 SVR4 platforms; stabs provide aworkable alternative.  This requires gas and gdb, as the normal SVR4tools can not generate or interpret stabs.@item --disable-multilibSpecify that multiple targetlibraries to support different target variants, callingconventions, etc.@: should not be built.  The default is to build apredefined set of them.Some targets provide finer-grained control over which multilibs are built(e.g., @option{--disable-softfloat}):@table @code@item arc-*-elf*biendian.@item arm-*-*fpu, 26bit, underscore, interwork, biendian, nofmult.@item m68*-*-*softfloat, m68881, m68000, m68020.@item mips*-*-*single-float, biendian, softfloat.@item powerpc*-*-*, rs6000*-*-*aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian,sysv, aix.@end table@item --enable-threadsSpecify that the targetsupports threads.  This affects the Objective-C compiler and runtimelibrary, and exception handling for other languages like C++ and Java.On some systems, this is the default.In general, the best (and, in many cases, the only known) threadingmodel available will be configured for use.  Beware that on somesystems, GCC has not been taught what threading models are generallyavailable for the system.  In this case, @option{--enable-threads} is analias for @option{--enable-threads=single}.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -