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

📄 install.texi

📁 早期freebsd实现
💻 TEXI
📖 第 1 页 / 共 4 页
字号:
@c Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc.@c This is part of the GCC manual.@c For copying conditions, see the file gcc.texi.@c The text of this file appears in the file INSTALL@c in the GCC distribution, as well as in the GCC manual.@ifclear INSTALLONLY@node Installation@chapter Installing GNU CC@end ifclear@cindex installing GNU CCHere is the procedure for installing GNU CC on a Unix system.@menu* Other Dir::     Compiling in a separate directory (not where the source is).* Cross-Compiler::   Building and installing a cross-compiler.* PA Install::    See below for installation on the HP Precision Architecture.* Sun Install::   See below for installation on the Sun.* 3b1 Install::   See below for installation on the 3b1.* Unos Install::  See below for installation on Unos (from CRDS).* VMS Install::   See below for installation on VMS.* WE32K Install:: See below for installation on the 3b* aside from the 3b1.* MIPS Install::  See below for installation on the MIPS Architecture.@end menu@iftexSee below for VMS systems, and modified procedures needed on othersystems including HP, Sun, 3b1, SCO Unix and Unos.  The following sectionsays how to compile in a separate directory on Unix; here we assume youcompile in the same directory that contains the source files.@end iftex@enumerate@itemIf you have built GNU CC previously in the same directory for adifferent target machine, do @samp{make distclean} to delete all filesthat might be invalid.  One of the files this deletes is@file{Makefile}; if @samp{make distclean} complains that @file{Makefile}does not exist, it probably means that the directory is already suitablyclean.@itemOn a System V release 4 system, make sure @file{/usr/bin} precedes@file{/usr/ucb} in @code{PATH}.  The @code{cc} command in@file{/usr/ucb} uses libraries which have bugs.@itemSpecify the host and target machine configurations.  You do this byrunning the file @file{configure} with appropriate arguments.If you are building a compiler to produce code for the machine it runson, specify just one machine type.  Use the @samp{--target} option; thehost type will default to be the same as the target.  (For informationon building a cross-compiler, see @ref{Cross-Compiler}.)  The commandlooks like this:@exampleconfigure --target=sparc-sun-sunos4.1@end exampleA configuration name may be canonical or it may be more or lessabbreviated.A canonical configuration name has three parts, separated by dashes.It looks like this: @samp{@var{cpu}-@var{company}-@var{system}}.(The three parts may themselves contain dashes; @file{configure}can figure out which dashes serve which purpose.)  For example,@samp{m68k-sun-sunos4.1} specifies a Sun 3.You can also replace parts of the configuration by nicknames or aliases.For example, @samp{sun3} stands for @samp{m68k-sun}, so@samp{sun3-sunos4.1} is another way to specify a Sun 3.  You can alsouse simply @samp{sun3-sunos}, since the version of SunOS is assumed bydefault to be version 4.  @samp{sun3-bsd} also works, since@file{configure} knows that the only BSD variant on a Sun 3 is SunOS.You can specify a version number after any of the system types, and someof the CPU types.  In most cases, the version is irrelevant, and will beignored.  So you might as well specify the version if you know it.Here are the possible CPU types:@quotation@c gmicro, alliant, spur and tahoe omitted since they don't work.a29k, alpha, arm, c@var{n}, elxsi, hppa1.0, hppa1.1,i386, i860, i960, m68000, m68k, m88k, mips,ns32k, pyramid, romp, rs6000, sparc, vax, we32k.@end quotationHere are the recognized company names.  As you can see, customaryabbreviations are used rather than the longer official names.@quotationalliant, altos, apollo, att,cbm, convergent, convex, crds, dec, dg,encore, harris, hp, ibm, mips,motorola, ncr, next, ns, omron,sequent, sgi, sony, sun, tti, unicom.@end quotationThe company name is meaningful only to disambiguate when the rest ofthe information supplied is insufficient.  You can omit it, writingjust @samp{@var{cpu}-@var{system}}, if it is not needed.  For example,@samp{vax-ultrix4.2} is equivalent to @samp{vax-dec-ultrix4.2}.Here is a list of system types:@quotationaix, aos, bsd, ctix, dgux, dynix,genix, hpux, isc, linux, luna, mach,minix, newsos, osf, osfrose, riscos,sco, sunos, sysv, ultrix, unos, vms.@end quotation@noindentYou can omit the system type; then @file{configure} guesses theoperating system from the CPU and company.You can add a version number to the system type; this may or may notmake a difference.  For example, you can write @samp{bsd4.3} or@samp{bsd4.4} to distinguish versions of BSD.  In practice, the versionnumber is most needed for @samp{sysv3} and @samp{sysv4}, which are oftentreated differently.If you specify an impossible combination such as @samp{i860-dg-vms},then you may get an error message from @file{configure}, or it mayignore part of the information and do the best it can with the rest.@file{configure} always prints the canonical name for the alternativethat it used.Often a particular model of machine has a name.  Many machine names arerecognized as aliases for CPU/company combinations.  Thus, the machinename @samp{sun3}, mentioned above, is an alias for @samp{m68k-sun}.Sometimes we accept a company name as a machine name, when the name ispopularly used for a particular machine.  Here is a table of the knownmachine names:@quotation3300, 3b1, 3b@var{n}, 7300, altos3068, altos,apollo68, att-7300, balance,convex-c@var{n}, crds, decstation-3100,decstation, delta, encore,fx2800, gmicro, hp7@var{nn}, hp8@var{nn},hp9k2@var{nn}, hp9k3@var{nn}, hp9k7@var{nn},hp9k8@var{nn}, iris4d, iris, isi68,m3230, magnum, merlin, miniframe,mmax, news-3600, news800, news, next,pbd, pc532, pmax, ps2, risc-news,rtpc, sun2, sun386i, sun386, sun3,sun4, symmetry, tower-32, tower.@end quotation @noindentRemember that a machine name specifies both the cpu type and the companyname.There are four additional options you can specify independently to describe variant hardware and software configurations.  These are@samp{--with-gnu-as}, @samp{--with-gnu-ld}, @samp{--with-stabs} and@samp{--nfp}.@table @samp@item --with-gnu-asOn certain systems, you must specify whether you want GNU CC to workwith the usual compilation tools or with the GNU compilation tools(including GAS).  Use the @samp{--with-gnu-as} argument when you run@file{configure}, if you want to use the GNU tools.  (Specify@samp{--with-gnu-ld} as well, since on these systems GAS works only withthe GNU linker.)  The systems where this makes a difference are@samp{i386-@var{anything}-sysv}, @samp{i860-@var{anything}-bsd},@samp{m68k-hp-hpux}, @samp{m68k-sony-bsd}, @samp{m68k-altos-sysv},@samp{m68000-hp-hpux}, and @samp{m68000-att-sysv}.  On any other system,@samp{--with-gnu-as} has no effect.@item --with-gnu-ldSpecify the option @samp{--with-gnu-ld} if you plan to use the GNUlinker.  This inhibits the installation of @code{collect2}, a programwhich otherwise serves as a front-end for the system's linker on mostconfigurations.@item --with-stabsOn MIPS based systems, you must specify whether you want GNU CC tocreate the normal ECOFF debugging format, or to use BSD-style stabspassed through the ECOFF symbol table.  The normal ECOFF debug formatcannot fully handle languages other than C.  BSD stabs format can handleother languages, but it only works with the GNU debugger GDB.Normally, GNU CC uses the ECOFF debugging format by default; if youprefer BSD stabs, specify @samp{--with-stabs} when you configure GNUCC.No matter which default you choose when you configure GNU CC, the usercan use the @samp{-gcoff} and @samp{-gstabs+} options to specify explicitlythe debug format for a particular compilation.@item --nfpOn certain systems, you must specify whether the machine has a floatingpoint unit.  These systems are @samp{m68k-sun-sunos@var{n}} and@samp{m68k-isi-bsd}.  On any other system, @samp{--nfp} currently has noeffect, though perhaps there are other systems where it could usefullymake a difference.@end tableIf you want to install your own homemade configuration files, you canuse @samp{local} as the company name to access them.  If you use configuration @samp{@var{cpu}-local}, the entire configuration nameis used to form the configuration file names.Thus, if you specify @samp{m68k-local}, then the files used are@file{m68k-local.md}, @file{m68k-local.h}, @file{m68k-local.c},@file{xm-m68k-local.h}, @file{t-m68k-local}, and @file{x-m68k-local}.Here is a list of configurations that have special treatment or specialthings you must know:@table @samp@item alpha-*-osf1Systems using processors that implement the DEC Alpha architecture andare running the OSF/1 operating system. (VMS on the Alpha is notcurrently supported by GNU CC.)  As of this writing, the only Alpha-basedproduct currently available from DEC is the 21064 (EV4) processor chip;no system-level products can be ordered.  This port is provided forthose developers who might have early Alpha hardware from DEC or othervendors and run the OSF/1 operating system.  It has not been extensivelytested and both the C++ and Objective-C languages may not work, exceptin a cross-compilation environment.The @code{ASSEMBLE_FILE_START} macro writes a @code{.verstamp} directivecontaining the version of the calling sequence.  Currently, we use@samp{9 0}, which we believe will work until the official release by DECof their system, at which point @samp{3 11} is the correct value.  Ifyou get a mismatch error from the assembler on a @code{.verstamp} line,consult the file @file{/usr/include/stamp.h} for the present value.  GNUC on the Alpha does not support versions of DEC's OSF/1 earlier thanBL9; if you are running an older version, we suggest you ask your DECcontact for an update.Note that since the Alpha is a 64-bit architecture, cross-compilersfrom 32-bit machines will not generate as efficient code as thatgenerated when the compiler is running on a 64-bit machine because manyoptimizations that depend on being able to represent a word on thetarget in an integral value on the host cannot be performed.@item a29kAMD Am29K-family processors.  These are normally used in embeddedapplications.  There are no standard Unix configurations.This configurationcorresponds to AMD's standard calling sequence and binary interfaceand is compatible with other 29K tools.  You may need to make a variant of the file @file{a29k.h} for yourparticular configuration.@item a29k-*-bsdAMD Am29050 used in a system running a variant of BSD Unix.@item elxsi-elxsi-bsdThe Elxsi's C compiler has known limitations that prevent it fromcompiling GNU C.  Please contact @code{mrs@@cygnus.com} for more details.@ignore@item fx80Alliant FX/8 computer.  Note that the standard installed C compiler inConcentrix 5.0 has a bug which prevent it from compiling GNU CCcorrectly.  You can patch the compiler bug as follows:@examplecp /bin/pcc ./pccadb -w ./pcc - << EOF15f6?w 6610EOF@end exampleThen you must use the @samp{-ip12} option when compiling GNU CCwith the patched compiler, as shown here:@examplemake CC="./pcc -ip12" CFLAGS=-w@end exampleNote also that Alliant's version of DBX does not manage to work with theoutput from GNU CC.@end ignore@item i386-*-scoCompilation with RCC is recommended.@item i386-ibm-aixYou need a version of GAS that you can get from @code{tranle@@intellicorp.com}.@item i386-sequentGo to the Berkeley universe before compiling.  In addition, you probablyneed to create a file named @file{string.h} containing just one line:@samp{#include <strings.h>}.@item i386-sun-sunos4You may find that you need another version of GNU CC to beginbootstrapping with, since the current version when built with thesystem's own compiler seems to get an infinite loop compiling part of@file{libgcc2.c}.  GNU CC version 2 compiled with GNU CC (any version)seems not to have this problem.@item m68000-attAT&T 3b1, a.k.a. 7300 PC.  Special procedures are needed to compile GNUCC with this machine's standard C compiler, due to bugs in thatcompiler.  @xref{3b1 Install}.  You can bootstrap it more easily withprevious versions of GNU CC if you have them.@item m68000-hp-bsdHP 9000 series 200 running BSD.  Note that the C compiler that comeswith this system cannot compile GNU CC; contact @code{law@@cs.utah.edu}to get binaries of GNU CC for bootstrapping.@item m68k-altosAltos 3068.  You must use the GNU assembler, linker and debugger, withCOFF-encapsulation.  Also, you must fix a kernel bug.  Details in thefile @file{README.ALTOS}.@item m68k-hp-hpuxHP 9000 series 300 or 400 running HP-UX.  HP-UX version 8.0 has a bug inthe assembler that prevents compilation of GNU CC.  To fix it, get patchPHCO_0800 from HP.In addition, @samp{--gas} does not currently work with thisconfiguration.  Changes in HP-UX have broken the library conversion tooland the linker.@item m68k-sunSun 3.  We do not provide a configuration file to use the Sun FPA bydefault, because programs that establish signal handlers for floatingpoint traps inherently cannot work with the FPA.@item m88k-svr3Motorola m88k running the AT&T/Unisoft/Motorola V.3 reference port.These systems tend to use the Green Hills C, revision 1.8.5, as thestandard C compiler.  There are apparently bugs in this compiler thatresult in object files differences between stage 2 and stage 3.  If thishappens, make the stage 4 compiler and compare it to the stage 3compiler.  If the stage 3 and stage 4 object files are identical, thissuggests a problem with the standard C compiler.  It is best, however,to use an older version of GNU CC for bootstrapping.@item m88k-dgux

⌨️ 快捷键说明

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