install.texi

来自「GCC编译器源代码」· TEXI 代码 · 共 1,605 行 · 第 1/5 页

TEXI
1,605
字号
binaries (the default).  If you are going to build your compiler in ELF mode (once you have bootstrapped the first stage compiler) you @strong{must} specify @samp{-melf} as part of @code{CC},@emph{not} @code{CFLAGS}, for example as@samp{CC="stage1/xgcc -melf -Bstage1/" }.  If you do not do this, thebootstrap will generate incorrect versions of @file{libgcc.a}.You must have TLS597 (from ftp.sco.com/TLS) installed for ELFbinaries to work correctly. Note that Open Server 5.0.2 @emph{does}need TLS597 installed.@emph{NOTE:} You must follow the instructions about invoking@samp{make bootstrap} because the native OpenServer compiler buildsa @file{cc1plus} that will not correctly parse many valid C++ programs.You must do a @samp{make bootstrap} if you are building with the nativecompiler.@item i386-*-iscIt may be a good idea to link with GNU malloc instead of the malloc thatcomes with the system.In ISC version 4.1, @file{sed} core dumps when building@file{deduced.h}.  Use the version of @file{sed} from version 4.0.@item i386-*-esixIt may be good idea to link with GNU malloc instead of the malloc thatcomes with the system.@item i386-ibm-aixYou need to use GAS version 2.1 or later, and LD fromGNU binutils version 2.2 or later.@item i386-sequent-bsdGo to the Berkeley universe before compiling.@item i386-sequent-ptx1*Sequent DYNIX/ptx 1.x.@item i386-sequent-ptx2*Sequent DYNIX/ptx 2.x.@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.See @ref{Sun Install}, for information on installing GNU CC on Sunsystems.@item i[345]86-*-winnt3.5This version requires a GAS that has not yet been released.  Until itis, you can get a prebuilt binary version via anonymous ftp from@file{cs.washington.edu:pub/gnat} or @file{cs.nyu.edu:pub/gnat}. Youmust also use the Microsoft header files from the Windows NT 3.5 SDK.Find these on the CDROM in the @file{/mstools/h} directory dated 9/4/94.  Youmust use a fixed version of Microsoft linker made especially for NT 3.5,which is also is available on the NT 3.5 SDK CDROM.  If you do not havethis linker, can you also use the linker from Visual C/C++ 1.0 or 2.0.Installing GNU CC for NT builds a wrapper linker, called @file{ld.exe},which mimics the behaviour of Unix @file{ld} in the specification oflibraries (@samp{-L} and @samp{-l}).  @file{ld.exe} looks for both Unixand Microsoft named libraries.  For example, if you specify@samp{-lfoo}, @file{ld.exe} will look first for @file{libfoo.a}and then for @file{foo.lib}.You may install GNU CC for Windows NT in one of two ways, depending onwhether or not you have a Unix-like shell and various Unix-likeutilities.@enumerate@itemIf you do not have a Unix-like shell and few Unix-like utilities, youwill use a DOS style batch script called @file{configure.bat}.  Invokeit as @code{configure winnt} from an MSDOS console window or from theprogram manager dialog box.  @file{configure.bat} assumes you havealready installed and have in your path a Unix-like @file{sed} programwhich is used to create a working @file{Makefile} from @file{Makefile.in}.@file{Makefile} uses the Microsoft Nmake program maintenance utility andthe Visual C/C++ V8.00 compiler to build GNU CC.  You need only have theutilities @file{sed} and @file{touch} to use this installation method,which only automatically builds the compiler itself.  You must thenexamine what @file{fixinc.winnt} does, edit the header files by hand andbuild @file{libgcc.a} manually.@itemThe second type of installation assumes you are running a Unix-likeshell, have a complete suite of Unix-like utilities in your path, andhave a previous version of GNU CC already installed, either throughbuilding it via the above installation method or acquiring a pre-builtbinary.  In this case, use the @file{configure} script in the normalfashion.@end enumerate@item i860-intel-osf1This is the Paragon.@ifset INSTALLONLYIf you have version 1.0 of the operating system, you need to takespecial steps to build GNU CC due to peculiarities of the system.  Newersystem versions have no problem.  See the section `Installation Problems'in the GNU CC Manual.@end ifset@ifclear INSTALLONLYIf you have version 1.0 of the operating system,see @ref{Installation Problems}, for special things you need to do tocompensate for peculiarities in the system.@end ifclear@item *-lynx-lynxosLynxOS 2.2 and earlier comes with GNU CC 1.x already installed as@file{/bin/gcc}.  You should compile with this instead of @file{/bin/cc}.You can tell GNU CC to use the GNU assembler and linker, by specifying@samp{--with-gnu-as --with-gnu-ld} when configuring.  These will produceCOFF format object files and executables;  otherwise GNU CC will use theinstalled tools, which produce @file{a.out} format executables.@item m32r-*-elfMitsubishi M32R processor.This configuration is intended for embedded systems.@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.Also, you must fix a kernel bug.  Details in the file @file{README.ALTOS}.@item m68k-apple-auxApple Macintosh running A/UX.You may configure GCC  to use either the system assembler andlinker or the GNU assembler and linker.  You should use the GNU configurationif you can, especially if you also want to use GNU C++.  You enabledthat configuration with + the @samp{--with-gnu-as} and @samp{--with-gnu-ld}options to @code{configure}.Note the C compiler that comeswith this system cannot compile GNU CC.  You can fine binaries of GNU CCfor bootstrapping on @code{jagubox.gsfc.nasa.gov}.You will also a patched version of @file{/bin/ld} there thatraises some of the arbitrary limits found in the original.@item m68k-att-sysvAT&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.  You can bootstrap it more easily withprevious versions of GNU CC if you have them.Installing GNU CC on the 3b1 is difficult if you do not already haveGNU CC running, due to bugs in the installed C compiler.  However,the following procedure might work.  We are unable to test it.@enumerate@itemComment out the @samp{#include "config.h"} line near the start of@file{cccp.c} and do @samp{make cpp}.  This makes a preliminary versionof GNU cpp.@itemSave the old @file{/lib/cpp} and copy the preliminary GNU cpp to thatfile name.@itemUndo your change in @file{cccp.c}, or reinstall the original version,and do @samp{make cpp} again.@itemCopy this final version of GNU cpp into @file{/lib/cpp}.@findex obstack_free@itemReplace every occurrence of @code{obstack_free} in the file@file{tree.c} with @code{_obstack_free}.@itemRun @code{make} to get the first-stage GNU CC.@itemReinstall the original version of @file{/lib/cpp}.@itemNow you can compile GNU CC with itself and install it in the normalfashion.@end enumerate@item m68k-bull-sysvBull DPX/2 series 200 and 300 with BOS-2.00.45 up to BOS-2.01. GNU CC workseither with native assembler or GNU assembler. You can useGNU assembler with native coff generation by providing @samp{--with-gnu-as} tothe configure script or use GNU assembler with dbx-in-coff encapsulationby providing @samp{--with-gnu-as --stabs}. For any problem with nativeassembler or for availability of the DPX/2 port of GAS, contact@code{F.Pierresteguy@@frcl.bull.fr}.@item m68k-crds-unoxUse @samp{configure unos} for building on Unos.The Unos assembler is named @code{casm} instead of @code{as}.  For somestrange reason linking @file{/bin/as} to @file{/bin/casm} changes thebehavior, and does not work.  So, when installing GNU CC, you shouldinstall the following script as @file{as} in the subdirectory wherethe passes of GCC are installed:@example#!/bin/shcasm $*@end exampleThe default Unos library is named @file{libunos.a} instead of@file{libc.a}.  To allow GNU CC to function, either change allreferences to @samp{-lc} in @file{gcc.c} to @samp{-lunos} or link@file{/lib/libc.a} to @file{/lib/libunos.a}.@cindex @code{alloca}, for UnosWhen compiling GNU CC with the standard compiler, to overcome bugs inthe support of @code{alloca}, do not use @samp{-O} when making stage 2.Then use the stage 2 compiler with @samp{-O} to make the stage 3compiler.  This compiler will have the same characteristics as the usualstage 2 compiler on other systems.  Use it to make a stage 4 compilerand compare that with stage 3 to verify proper compilation.(Perhaps simply defining @code{ALLOCA} in @file{x-crds} as described inthe comments there will make the above paragraph superfluous.  Pleaseinform us of whether this works.)Unos uses memory segmentation instead of demand paging, so you will needa lot of memory.  5 Mb is barely enough if no other tasks are running.If linking @file{cc1} fails, try putting the object files into a libraryand linking from that library.@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_4484 from HP.In addition, if you wish to use gas @samp{--with-gnu-as} you must usegas version 2.1 or later, and you must use the GNU linker version 2.1 orlater.  Earlier versions of gas relied upon a program which converted thegas output into the native HP/UX format, but that program has not beenkept up to date.  gdb does not understand that native HP/UX format, soyou must use gas if you wish to use gdb.@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.See @ref{Sun Install}, for information on installing GNU CC on Sunsystems.@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 you encountered a problem with the standard C compiler; thestage 3 and 4 compilers may be usable.It is best, however, to use an older version of GNU CC for bootstrappingif you have one.@item m88k-*-dguxMotorola m88k running DG/UX.  To build 88open BCS native or crosscompilers on DG/UX, specify the configuration name as@samp{m88k-*-dguxbcs} and build in the 88open BCS software developmentenvironment.  To build ELF native or cross compilers on DG/UX, specify@samp{m88k-*-dgux} and build in the DG/UX ELF development environment.You set the software development environment by issuing@samp{sde-target} command and specifying either @samp{m88kbcs} or@samp{m88kdguxelf} as the operand.If you do not specify a configuration name, @file{configure} guesses theconfiguration based on the current software development environment.@item m88k-tektronix-sysv3Tektronix XD88 running UTekV 3.2e.  Do not turn onoptimization while building stage1 if you bootstrap withthe buggy Green Hills compiler.  Also, The bundled LAISystem V NFS is buggy so if you build in an NFS mounteddirectory, start from a fresh reboot, or avoid NFS all together.Otherwise you may have trouble getting clean comparisonsbetween stages.@item mips-mips-bsdMIPS machines running the MIPS operating system in BSD mode.  It'spossible that some old versions of the system lack the functions@code{memcpy}, @code{memcmp}, and @code{memset}.  If your system lacksthese, you must remove or undo the definition of@code{TARGET_MEM_FUNCTIONS} in @file{mips-bsd.h}.The MIPS C compiler needs to be told to increase its table sizefor switch statements with the @samp{-Wf,-XNg1500} option inorder to compile @file{cp/parse.c}.  If you use the @samp{-O2}optimization option, you also need to use @samp{-Olimit 3000}.Both of these options are automatically generated in the@file{Makefile} that the shell script @file{configure} builds.If you override the @code{CC} make variable and use the MIPScompilers, you may need to add @samp{-Wf,-XNg1500 -Olimit 3000}.@item mips-mips-riscos*The MIPS C compiler needs to be told to increase its table sizefor switch statements with the @samp{-Wf,-XNg1500} option inorder to compile @file{cp/parse.c}.  If you use the @samp{-O2}optimization option, you also need to use @samp{-Olimit 3000}.Both of these options are automatically generated in the@file{Makefile} that the shell script @file{configure} builds.If you override the @code{CC} make variable and use the MIPScompilers, you may need to add @samp{-Wf,-XNg1500 -Olimit 3000}.MIPS computers running RISC-OS can support four differentpersonalities: default, BSD 4.3, System V.3, and System V.4(older versions of RISC-OS don't support V.4).  To configure GCCfor these platforms use the following configurations:@table @samp

⌨️ 快捷键说明

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