OSDN Git Service

* alpha.md (addsi3, subsi3): No new temporaries once cse is
[pf3gnuchains/gcc-fork.git] / gcc / install.texi
index bb60f0a..5e3da8e 100644 (file)
@@ -1,4 +1,4 @@
-@c Copyright (C) 1988,89,92,93,94,95,96,97 Free Software Foundation, Inc.
+@c Copyright (C) 1988,89,92,93,94,95,96,97,1998 Free Software Foundation, Inc.
 @c This is part of the GCC manual.
 @c For copying conditions, see the file gcc.texi.
 
@@ -67,14 +67,14 @@ to specify a configuration when building a native compiler unless
 wrong.
 
 In those cases, specify the build machine's @dfn{configuration name}
-with the @samp{--build} option; the host and target will default to be
-the same as the build machine.  (If you are building a cross-compiler,
+with the @samp{--host} option; the host and target will default to be
+the same as the host machine.  (If you are building a cross-compiler,
 see @ref{Cross-Compiler}.)
 
 Here is an example:
 
 @smallexample
-./configure --build=sparc-sun-sunos4.1
+./configure --host=sparc-sun-sunos4.1
 @end smallexample
 
 A configuration name may be canonical or it may be more or less
@@ -141,9 +141,9 @@ linker with GNU CC.
 
 This option does not cause the GNU linker to be installed; it just
 modifies the behavior of GNU CC to work with the GNU linker.
-Specifically, it inhibits the installation of @code{collect2}, a program
-which otherwise serves as a front-end for the system's linker on most
-configurations.
+@c Specifically, it inhibits the installation of @code{collect2}, a program
+@c which otherwise serves as a front-end for the system's linker on most
+@c configurations.
 
 @item --with-stabs
 On MIPS based systems and on Alphas, you must specify whether you want
@@ -182,7 +182,7 @@ make a difference.
 @cindex Haifa scheduler
 @cindex scheduler, experimental
 @item --enable-haifa
-@item --disable-haifa
+@itemx --disable-haifa
 Use @samp{--enable-haifa} to enable use of an experimental instruction
 scheduler (from IBM Haifa).  This may or may not produce better code.
 Some targets on which it is known to be a win enable it by default; use
@@ -191,7 +191,7 @@ will print out whether the Haifa scheduler is enabled when it is run.
 
 @cindex Objective C threads
 @cindex threads, Objective C
-@item --enable-objcthreads=@var{type}
+@item --enable-threads=@var{type}
 Certain systems, notably Linux-based GNU systems, can't be relied on to
 supply a threads facility for the Objective C runtime and so will
 default to single-threaded runtime.  They may, however, have a library
@@ -199,6 +199,14 @@ threads implementation available, in which case threads can be enabled
 with this option by supplying a suitable @var{type}, probably
 @samp{posix}.  The possibilities for @var{type} are @samp{single},
 @samp{posix}, @samp{win32}, @samp{solaris}, @samp{irix} and @samp{mach}.
+
+@cindex Internal Compiler Checking
+@item --enable-checking
+When you specify this option, the compiler is built to perform checking
+of tree node types when referencing fields of that node.  This does not
+change the generated code, but adds error checking within the compiler.
+This will slow down the compiler and may only work properly if you
+are building the compiler with GNU C.
 @end table
 
 The @file{configure} script searches subdirectories of the source
@@ -261,18 +269,19 @@ If you want to install its files somewhere else, specify
 is a directory name to use instead of @file{/usr/local} for all purposes
 with one exception: the directory @file{/usr/local/include} is searched
 for header files no matter where you install the compiler.  To override
-this name, use the @code{--local-prefix} option below.
+this name, use the @code{--with-local-prefix} option below.  The directory
+you specify need not exist, but its parent directory must exist.
 
 @item
-Specify @samp{--local-prefix=@var{dir}} if you want the compiler to
+Specify @samp{--with-local-prefix=@var{dir}} if you want the compiler to
 search directory @file{@var{dir}/include} for locally installed header
 files @emph{instead} of @file{/usr/local/include}.
 
-You should specify @samp{--local-prefix} @strong{only} if your site has
+You should specify @samp{--with-local-prefix} @strong{only} if your site has
 a different convention (not @file{/usr/local}) for where to put
 site-specific files.
 
-The default value for @samp{--local-prefix} is @file{/usr/local}
+The default value for @samp{--with-local-prefix} is @file{/usr/local}
 regardless of the value of @samp{--prefix}.  Specifying @samp{--prefix}
 has no effect on which directory GNU CC searches for local header files.
 This may seem counterintuitive, but actually it is logical.
@@ -283,8 +292,8 @@ any in that directory---are not part of GNU CC.  They are part of other
 programs---perhaps many others.  (GNU CC installs its own header files
 in another directory which is based on the @samp{--prefix} value.)
 
-@strong{Do not} specify @file{/usr} as the @samp{--local-prefix}!  The
-directory you use for @samp{--local-prefix} @strong{must not} contain
+@strong{Do not} specify @file{/usr} as the @samp{--with-local-prefix}!  The
+directory you use for @samp{--with-local-prefix} @strong{must not} contain
 any of the system's standard header files.  If it did contain them,
 certain programs would be miscompiled (including GNU Emacs, on certain
 targets), because this would override and nullify the header file
@@ -340,8 +349,9 @@ Ignore any warnings you may see about ``statement not reached'' in
 escape sequence'' are normal in @file{genopinit.c} and perhaps some
 other files.  Likewise, you should ignore warnings about ``constant is
 so large that it is unsigned'' in @file{insn-emit.c} and
-@file{insn-recog.c} and a warning about a comparison always being zero
-in @file{enquire.o}.  Any other compilation errors may represent bugs in
+@file{insn-recog.c}, a warning about a comparison always being zero
+in @file{enquire.o}, and warnings about shift counts exceeding type
+widths in @file{cexp.y}.  Any other compilation errors may represent bugs in
 the port to your machine or operating system, and
 @ifclear INSTALLONLY
 should be investigated and reported (@pxref{Bugs}).
@@ -507,11 +517,11 @@ This copies the files @file{cc1}, @file{cpp} and @file{libgcc.a} to
 files @file{cc1}, @file{cpp} and @file{libgcc.a} in the directory
 @file{/usr/local/lib/gcc-lib/@var{target}/@var{version}}, which is where
 the compiler driver program looks for them.  Here @var{target} is the
-target machine type specified when you ran @file{configure}, and
-@var{version} is the version number of GNU CC.  This naming scheme
-permits various versions and/or cross-compilers to coexist.
-It also copies the executables for compilers for other languages
-(e.g., @file{cc1plus} for C++) to the same directory.
+canonicalized form of target machine type specified when you ran
+@file{configure}, and @var{version} is the version number of GNU CC.
+This naming scheme permits various versions and/or cross-compilers to
+coexist.  It also copies the executables for compilers for other
+languages (e.g., @file{cc1plus} for C++) to the same directory.
 
 This also copies the driver program @file{xgcc} into
 @file{/usr/local/bin/gcc}, so that it appears in typical execution
@@ -534,12 +544,57 @@ since they usually run faster than the ones compiled with some other
 compiler.)
 
 @item
+@cindex C++ runtime library
+@cindex @code{libstdc++}
 If you're going to use C++, it's likely that you need to also install
-the libg++ distribution.  It should be available from the same
-place where you got the GNU C distribution.  Just as GNU C does not
-distribute a C runtime library, it also does not include a C++ run-time
+a C++ runtime library.  Just as GNU C does not
+distribute a C runtime library, it also does not include a C++ runtime
 library.  All I/O functionality, special class libraries, etc., are
-available in the libg++ distribution.
+provided by the C++ runtime library.
+
+The standard C++ runtime library for GNU CC is called @samp{libstdc++}.
+An obsolescent library @samp{libg++} may also be available, but it's
+necessary only for older software that hasn't been converted yet; if
+you don't know whether you need @samp{libg++} then you probably don't
+need it.
+
+Here's one way to build and install @samp{libstdc++} for GNU CC:
+
+@itemize @bullet
+@item
+Build and install GNU CC, so that invoking @samp{gcc} obtains the GNU CC
+that was just built.
+
+@item
+Obtain a copy of a compatible @samp{libstdc++} distribution.  For
+example, the @samp{libstdc++-2.8.0.tar.gz} distribution should be
+compatible with GCC 2.8.0.  GCC distributors normally distribute
+@samp{libstdc++} as well.
+
+@item
+Set the @samp{CXX} environment variable to @samp{gcc} while running the
+@samp{libstdc++} distribution's @file{configure} command.  Use the same
+@file{configure} options that you used when you invoked GCC's
+@file{configure} command.
+
+@item
+Invoke @samp{make} to build the C++ runtime.
+
+@item
+Invoke @samp{make install} to install the C++ runtime.
+
+@end itemize
+
+To summarize, after building and installing GNU CC, invoke the following
+shell commands in the topmost directory of the C++ library distribution.
+For @var{configure-options}, use the same options that
+you used to configure GNU CC.
+
+@example
+$ CXX=gcc ./configure @var{configure-options}
+$ make
+$ make install
+@end example
 
 @item
 GNU CC includes a runtime library for Objective-C because it is an
@@ -817,9 +872,10 @@ particular configuration.
 AMD Am29050 used in a system running a variant of BSD Unix.
 
 @item decstation-*
-DECstations can support three different personalities: Ultrix,
-DEC OSF/1, and OSF/rose.  To configure GCC for these platforms
-use the following configurations:
+MIPS-based DECstations can support three different personalities:
+Ultrix, DEC OSF/1, and OSF/rose.  (Alpha-based DECstation products have
+a configuration name beginning with @samp{alpha-dec}.)  To configure GCC
+for these platforms use the following configurations:
 
 @table @samp
 @item decstation-ultrix
@@ -898,7 +954,9 @@ highly recommend using GAS for all HP-PA configurations.
 You should be using GAS-2.6 (or later) along with GDB-4.16 (or later).  These
 can be retrieved from all the traditional GNU ftp archive sites.
 
-GAS will need to be installed into a directory before @code{/bin},
+On some versions of HP-UX, you will need to install GNU @file{sed}.
+
+You will need to be install GAS into a directory before @code{/bin},
 @code{/usr/bin}, and @code{/usr/ccs/bin} in your search path.  You
 should install GAS before you build GNU CC.
 
@@ -932,25 +990,30 @@ Use this configuration for SCO release 3.2 version 4.
 
 @item i386-*-sco3.2v5*
 Use this for the SCO OpenServer Release family including 5.0.0, 5.0.2, 
-5.0.4, Internet FastStart 1.0, and Internet FastStart 1.1.
-
-GNU CC can generate ELF binaries (if you specify @samp{-melf}) or COFF 
-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, the
-bootstrap will generate incorrect versions of @file{libgcc.a}.
-
-You must have TLS597 (from ftp.sco.com/TLS) installed for ELF
-binaries 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 builds
-a @file{cc1plus} that will not correctly parse many valid C++ programs.
-You must do a @samp{make bootstrap} if you are building with the native
-compiler.
+5.0.4, 5.0.5, Internet FastStart 1.0, and Internet FastStart 1.1.
+
+GNU CC can generate COFF binaries if you specify @samp{-mcoff} or ELF
+binaries, the default.    A full @samp{make bootstrap} is recommended
+so that an ELF compiler that builds ELF is generated.                   
+
+You must have TLS597 from @uref{ftp://ftp.sco.com/TLS} installed for ELF
+C++ binaries to work correctly on releases before 5.0.4. 
+
+The native SCO assembler that is provided with the OS at no charge
+is normally required.  If, however, you must be able to use the GNU
+assembler (perhaps you have complex asms) you must configure this
+package @samp{--with-gnu-as}.  To do this, install (cp or symlink)
+gcc/as to your copy of the GNU assembler.  You must use a recent version
+of GNU binutils; version 2.9.1 seems to work well.  If you select this
+option, you will be unable to build COFF images.  Trying to do so will
+result in non-obvious failures.  In general, the "--with-gnu-as" option
+isn't as well tested as the native assembler.
+
+@emph{NOTE:} If you are building C++, you must follow the instructions
+about invoking @samp{make bootstrap} because the native OpenServer
+compiler may build a @file{cc1plus} that will not correctly parse many
+valid C++ programs.  You must do a @samp{make bootstrap} if you are
+building with the native compiler.
 
 @item i386-*-isc
 It may be a good idea to link with GNU malloc instead of the malloc that
@@ -971,10 +1034,8 @@ GNU binutils version 2.2 or later.
 Go to the Berkeley universe before compiling.
 
 @item i386-sequent-ptx1*
-Sequent DYNIX/ptx 1.x.
-
-@item i386-sequent-ptx2*
-Sequent DYNIX/ptx 2.x.
+@itemx i386-sequent-ptx2*
+You must install GNU @file{sed} before running @file{configure}.
 
 @item i386-sun-sunos4
 You may find that you need another version of GNU CC to begin
@@ -1060,7 +1121,7 @@ This configuration is intended for embedded systems.
 
 @item m68000-hp-bsd
 HP 9000 series 200 running BSD.  Note that the C compiler that comes
-with this system cannot compile GNU CC; contact @code{law@@cs.utah.edu}
+with this system cannot compile GNU CC; contact @code{law@@cygnus.com}
 to get binaries of GNU CC for bootstrapping.
 
 @item m68k-altos
@@ -1076,7 +1137,7 @@ that configuration with + the @samp{--with-gnu-as} and @samp{--with-gnu-ld}
 options to @code{configure}.
 
 Note the C compiler that comes
-with this system cannot compile GNU CC.  You can fine binaries of GNU CC
+with this system cannot compile GNU CC.  You can find binaries of GNU CC
 for bootstrapping on @code{jagubox.gsfc.nasa.gov}.
 You will also a patched version of @file{/bin/ld} there that
 raises some of the arbitrary limits found in the original.
@@ -1177,8 +1238,8 @@ PHCO_4484 from HP.
 In addition, if you wish to use gas @samp{--with-gnu-as} you must use
 gas version 2.1 or later, and you must use the GNU linker version 2.1 or
 later.  Earlier versions of gas relied upon a program which converted the
-gas output into the native HP/UX format, but that program has not been
-kept up to date.  gdb does not understand that native HP/UX format, so
+gas output into the native HP-UX format, but that program has not been
+kept up to date.  gdb does not understand that native HP-UX format, so
 you must use gas if you wish to use gdb.
 
 @item m68k-sun
@@ -1370,12 +1431,14 @@ stage3 object files, and errors when compiling @file{libgcc.a} or
 xlc-1.3.0.0 (distributed with AIX 3.2.5), and xlc-1.3.0.19.  Both
 xlc-1.2.1.28 and xlc-1.3.0.24 (PTF 432238) are known to produce working
 versions of GNU CC, but most other recent releases correctly bootstrap
-GNU CC.  Also, releases of AIX prior to AIX 3.2.4 include a version of
+GNU CC.
+
+Release 4.3.0 of AIX and ones prior to AIX 3.2.4 include a version of
 the IBM assembler which does not accept debugging directives: assembler
 updates are available as PTFs.  Also, if you are using AIX 3.2.5 or
 greater and the GNU assembler, you must have a version modified after
 October 16th, 1995 in order for the GNU C compiler to build.  See the
-file @file{README.RS6000} for more details on of these problems.
+file @file{README.RS6000} for more details on any of these problems.
 
 GNU CC does not yet support the 64-bit PowerPC instructions.
 
@@ -1927,9 +1990,13 @@ To install the cross-compiler, use @samp{make install}, as usual.
 @cindex Sun installation
 @cindex installing GNU CC on the Sun
 
-On Solaris (version 2.1), do not use the linker or other tools in
+On Solaris, do not use the linker or other tools in
 @file{/usr/ucb} to build GNU CC.  Use @code{/usr/ccs/bin}.
 
+If the assembler reports @samp{Error: misaligned data} when bootstrapping,
+you are probably using an obsolete version of the GNU assembler.  Upgrade
+to the latest version of GNU @code{binutils}, or use the Solaris assembler.
+
 Make sure the environment variable @code{FLOAT_OPTION} is not set when
 you compile @file{libgcc.a}.  If this option were set to @code{f68881}
 when @file{libgcc.a} is compiled, the resulting code would demand to be
@@ -2027,8 +2094,8 @@ $ assign /system /translation=concealed -
 
 @noindent
 with the appropriate disk and directory name.  If you are going to be
-using libg++, this is where the libg++ install procedure will install
-the libg++ header files.
+using a C++ runtime library, this is where its install procedure will install
+its header files.
 
 @item
 Obtain the file @file{gcc-cc1plus.exe}, and place this in the same
@@ -2205,11 +2272,8 @@ available.
 @node Collect2
 @section @code{collect2}
 
-Many target systems do not have support in the assembler and linker for
-``constructors''---initialization functions to be called before the
-official ``start'' of @code{main}.  On such systems, GNU CC uses a
-utility called @code{collect2} to arrange to call these functions at
-start time.
+GNU CC uses a utility called @code{collect2} on nearly all systems to arrange
+to call various initialization functions at start time.
 
 The program @code{collect2} works by linking the program once and
 looking through the linker output file for symbols with particular names
@@ -2300,7 +2364,7 @@ are already suitable for ANSI C and GNU CC, nothing special need be
 done).
 
 @code{GPLUS_INCLUDE_DIR} means the same thing for native and cross.  It
-is where @code{g++} looks first for header files.  @code{libg++}
+is where @code{g++} looks first for header files.  The C++ library
 installs only target independent header files in that directory.
 
 @code{LOCAL_INCLUDE_DIR} is used only for a native compiler.  It is