From bdc228c6395178f59ff23e7f7be2256840f86f8f Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sun, 3 Oct 1999 09:19:40 +0000 Subject: [PATCH] Virgin import of EGCS 1.1.2 --- contrib/gcc/genmultilib | 114 ++++++--- contrib/gcc/install.texi | 507 ++++++++++++++++++++++++++++----------- 2 files changed, 441 insertions(+), 180 deletions(-) diff --git a/contrib/gcc/genmultilib b/contrib/gcc/genmultilib index d4cc7ff7fe50..02206960400f 100644 --- a/contrib/gcc/genmultilib +++ b/contrib/gcc/genmultilib @@ -1,6 +1,6 @@ #!/bin/sh # Generates multilib.h. -# Copyright (C) 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. #This file is part of GNU CC. @@ -42,6 +42,12 @@ # appear in the first argument, and the second should be a synonym for # it. Question marks are replaced with equal signs in both options. +# The optional fourth argument is a list of multilib directory +# combinations that should not be built. + +# The optional fifth argument is a list of options that should be +# used whenever building multilib libraries. + # The output looks like # #define MULTILIB_MATCHES "\ # SUBDIRECTORY OPTIONS;\ @@ -59,16 +65,15 @@ # genmultilib "m68000/m68020 msoft-float" "m68000 m68020 msoft-float" # "m68000=mc68000" # This produces: -# #define MULTILIB_SELECT "\ -# . !m68000 !mc68000 !m68020 !msoft-float;\ -# m68000 m68000 !m68020 !msoft-float;\ -# m68000 mc60000 !m68020 !msoft-float;\ -# m68020 !m68000 !mc68000 m68020 !msoft-float;\ -# msoft-float !m68000 !mc68000 !m68020 msoft-float;\ -# m68000/msoft-float m68000 !m68020 msoft-float;\ -# m68000/msoft-float mc68000 !m68020 msoft-float;\ -# m68020/msoft-float !m68000 !mc68000 m68020 msoft-float;\ -# " +# ". !m68000 !mc68000 !m68020 !msoft-float;", +# "m68000 m68000 !m68020 !msoft-float;", +# "m68000 mc60000 !m68020 !msoft-float;", +# "m68020 !m68000 !mc68000 m68020 !msoft-float;", +# "msoft-float !m68000 !mc68000 !m68020 msoft-float;", +# "m68000/msoft-float m68000 !m68020 msoft-float;", +# "m68000/msoft-float mc68000 !m68020 msoft-float;", +# "m68020/msoft-float !m68000 !mc68000 m68020 msoft-float;", +# # The effect is that `gcc -msoft-float' (for example) will append # msoft-float to the directory name when searching for libraries or # startup files, and `gcc -m68000 -msoft-float' (for example) will @@ -78,6 +83,10 @@ options=$1 dirnames=$2 matches=$3 +exceptions=$4 +extra=$5 + +echo "static char *multilib_raw[] = {" # What we want to do is select all combinations of the sets in # options. Each combination which includes a set of mutually @@ -112,6 +121,33 @@ combinations=`initial=/ ./tmpmultilib ${options}` rm -f tmpmultilib +# If there exceptions, weed them out now +if [ -n "${exceptions}" ]; then + rm -f tmpmultilib2 + cat >tmpmultilib2 <<\EOF +#!/bin/sh +# This recursive script weeds out any combination of multilib +# switches that should not be generated. The output looks like +# a list of subdirectory names with leading and trailing slashes. + + for opt in $@; do + case "$opt" in +EOF + + for except in ${exceptions}; do + echo " /${except}/) : ;;" >> tmpmultilib2 + done + +cat >>tmpmultilib2 <<\EOF + *) echo ${opt};; + esac + done +EOF + chmod +x tmpmultilib2 + combinations=`./tmpmultilib2 ${combinations}` + rm -f ./tmpmultilib2 +fi + # Construct a sed pattern which will convert option names to directory # names. todirnames= @@ -128,16 +164,6 @@ if [ -n "${dirnames}" ]; then done fi -# Construct a sed pattern which will add negations based on the -# matches. The semicolons are easier than getting the shell to accept -# quoted spaces when expanding a variable. -matchnegations= -for i in ${matches}; do - l=`echo $i | sed -e 's/=.*$//' -e 's/?/=/g'` - r=`echo $i | sed -e 's/^.*=//' -e 's/?/=/g'` - matchnegations="${matchnegations} -e s/;!${l};/;!${l};!${r};/" -done - # We need another recursive shell script to correctly handle positive # matches. If we are invoked as # genmultilib "opt1 opt2" "" "opt1=nopt1 opt2=nopt2" @@ -154,7 +180,7 @@ cat >tmpmultilib2 <<\EOF # ${dirout} is the directory name and ${optout} is the current list of # options. if [ "$#" = "0" ]; then - echo "${dirout} ${optout};\\" + echo "\"${dirout} ${optout};\"," else first=$1 shift @@ -169,9 +195,6 @@ fi EOF chmod +x tmpmultilib2 -# We are ready to start output. -echo '#define MULTILIB_SELECT "\' - # Start with the current directory, which includes only negations. optout= for set in ${options}; do @@ -180,10 +203,7 @@ for set in ${options}; do done done optout=`echo ${optout} | sed -e 's/^ //'` -if [ -n "${matchnegations}" ]; then - optout=`echo ";${optout};" | sed -e 's/ /;/g' ${matchnegations} -e 's/^;//' -e 's/;$//' -e 's/;/ /g'` -fi -echo ". ${optout};\\" +echo "\". ${optout};\"," # Work over the list of combinations. We have to translate each one # to use the directory names rather than the option names, we have to @@ -214,18 +234,36 @@ for combo in ${combinations}; do done optout=`echo ${optout} | sed -e 's/^ //'` - # Add any negations of matches. - if [ -n "${matchnegations}" ]; then - optout=`echo ";${optout};" | sed -e 's/ /;/g' ${matchnegations} -e 's/^;//' -e 's/;$//' -e 's/;/ /g'` - fi - # Output the line with all appropriate matches. - dirout="${dirout}" optout="${optout}" ./tmpmultilib2 ${matches} + dirout="${dirout}" optout="${optout}" ./tmpmultilib2 done +# Terminate the list of string. +echo "NULL" +echo "};" + +# Output all of the matches now as option and that is the same as that, with +# a semicolon trailer. Include all of the normal options as well. +# Note, the format of the matches is reversed compared +# to what we want, so switch them around. +echo "" +echo "static char *multilib_matches_raw[] = {" +for match in ${matches}; do + l=`echo ${match} | sed -e 's/=.*$//' -e 's/?/=/g'` + r=`echo ${match} | sed -e 's/^.*=//' -e 's/?/=/g'` + echo "\"${r} ${l};\"," +done +for set in ${options}; do + for opt in `echo ${set} | sed -e 's|/| |'g`; do + echo "\"${opt} ${opt};\"," + done +done +echo "NULL" +echo "};" + +# Output the default options now +echo "" +echo "static char *multilib_extra = \"${extra}\";" rm -f tmpmultilib2 -# That's it. -echo '"' - exit 0 diff --git a/contrib/gcc/install.texi b/contrib/gcc/install.texi index 337da7951809..5e3da8e58c1a 100644 --- a/contrib/gcc/install.texi +++ b/contrib/gcc/install.texi @@ -1,10 +1,13 @@ -@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995 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. @c The text of this file appears in the file INSTALL @c in the GCC distribution, as well as in the GCC manual. +Note most of this information is out of date and superceded by the EGCS +install procedures. It is provided for historical reference only. + @ifclear INSTALLONLY @node Installation @chapter Installing GNU CC @@ -64,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 @@ -87,8 +90,7 @@ 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 also use simply @samp{sun3-sunos}, since the version of SunOS is assumed by -default to be version 4. @samp{sun3-bsd} also works, since -@file{configure} knows that the only BSD variant on a Sun 3 is SunOS. +default to be version 4. You can specify a version number after any of the system types, and some of the CPU types. In most cases, the version is irrelevant, and will be @@ -98,7 +100,7 @@ See @ref{Configurations}, for a list of supported configuration names and notes on many of the configurations. You should check the notes in that section before proceeding any further with the installation of GNU CC. -There are four additional options you can specify independently to +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}. @@ -122,10 +124,11 @@ using, try specifying @samp{-v} when you run it. The systems where it makes a difference whether you use GAS are@* @samp{hppa1.0-@var{any}-@var{any}}, @samp{hppa1.1-@var{any}-@var{any}}, @samp{i386-@var{any}-sysv}, @samp{i386-@var{any}-isc},@* -@samp{i860-@var{any}-bsd}, @samp{m68k-bull-sysv}, @samp{m68k-hp-hpux}, -@samp{m68k-sony-bsd},@* -@samp{m68k-altos-sysv}, @samp{m68000-hp-hpux}, @samp{m68000-att-sysv}, -@samp{@var{any}-lynx-lynxos}, and @samp{mips-@var{any}}). +@samp{i860-@var{any}-bsd}, @samp{m68k-bull-sysv},@* +@samp{m68k-hp-hpux}, @samp{m68k-sony-bsd},@* +@samp{m68k-altos-sysv}, @samp{m68000-hp-hpux},@* +@samp{m68000-att-sysv}, @samp{@var{any}-lynx-lynxos}, +and @samp{mips-@var{any}}). On any other system, @samp{--with-gnu-as} has no effect. On the systems listed above (except for the HP-PA, for ISC on the @@ -138,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 @@ -175,6 +178,35 @@ point unit. These systems include @samp{m68k-sun-sunos@var{n}} and @samp{m68k-isi-bsd}. On any other system, @samp{--nfp} currently has no effect, though perhaps there are other systems where it could usefully make a difference. + +@cindex Haifa scheduler +@cindex scheduler, experimental +@item --enable-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 +@samp{--disable-haifa} to disable it in these cases. @code{configure} +will print out whether the Haifa scheduler is enabled when it is run. + +@cindex Objective C threads +@cindex threads, Objective C +@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 +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 @@ -237,24 +269,41 @@ 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. -@strong{Do not} specify @file{/usr} as the @samp{--local-prefix}! The -directory you use for @samp{--local-prefix} @strong{must not} contain +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. + +The purpose of @samp{--prefix} is to specify where to @emph{install GNU +CC}. The local header files in @file{/usr/local/include}---if you put +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{--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 corrections made by the @code{fixincludes} script. +Indications are that people who use this option use it based on +mistaken ideas of what it is for. People use it as if it specified +where to install part of GNU CC. Perhaps they make this assumption +because installing GNU CC creates the directory. + @cindex Bison parser generator @cindex parser generator, Bison @item @@ -300,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}). @@ -383,7 +433,7 @@ linker) in the @file{stage2} subdirectory as you did in the @smallexample make stage2 -make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2" +make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2" @end smallexample @noindent @@ -467,19 +517,22 @@ 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. +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 -search paths. +search paths. It also copies @file{gcc.1} into +@file{/usr/local/man/man1} and info pages into @file{/usr/local/info}. On some systems, this command causes recompilation of some files. This is usually due to bugs in @code{make}. You should either ignore this problem, or use GNU Make. -@cindex @code{alloca} and SunOs +@cindex @code{alloca} and SunOS @strong{Warning: there is a bug in @code{alloca} in the Sun library. To avoid this bug, be sure to install the executables of GNU CC that were compiled by GNU CC. (That is, the executables from stage 2 or 3, not @@ -491,12 +544,103 @@ 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 +integral part of the language. You can find the files associated with +the library in the subdirectory @file{objc}. The GNU Objective-C +Runtime Library requires header files for the target's C library in +order to be compiled,and also requires the header files for the target's +thread library if you want thread support. @xref{Cross Headers, +Cross-Compilers and Header Files, Cross-Compilers and Header Files}, for +discussion about header files issues for cross-compilation. + +When you run @file{configure}, it picks the appropriate Objective-C +thread implementation file for the target platform. In some situations, +you may wish to choose a different back-end as some platforms support +multiple thread implementations or you may wish to disable thread +support completely. You do this by specifying a value for the +@var{OBJC_THREAD_FILE} makefile variable on the command line when you +run make, for example: + +@smallexample +make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2" OBJC_THREAD_FILE=thr-single +@end smallexample + +@noindent +Below is a list of the currently available back-ends. + +@itemize @bullet +@item thr-single +Disable thread support, should work for all platforms. +@item thr-decosf1 +DEC OSF/1 thread support. +@item thr-irix +SGI IRIX thread support. +@item thr-mach +Generic MACH thread support, known to work on NEXTSTEP. +@item thr-os2 +IBM OS/2 thread support. +@item thr-posix +Generix POSIX thread support. +@item thr-pthreads +PCThreads on Linux-based GNU systems. +@item thr-solaris +SUN Solaris thread support. +@item thr-win32 +Microsoft Win32 API thread support. +@end itemize @end enumerate @node Configurations @@ -508,7 +652,7 @@ Here are the possible CPU types: @quotation @c gmicro, alliant, spur and tahoe omitted since they don't work. 1750a, a29k, alpha, arm, c@var{n}, clipper, dsp16xx, elxsi, h8300, -hppa1.0, hppa1.1, i370, i386, i486, i586, i860, i960, m68000, m68k, +hppa1.0, hppa1.1, i370, i386, i486, i586, i860, i960, m32r, m68000, m68k, m88k, mips, mipsel, mips64, mips64el, ns32k, powerpc, powerpcle, pyramid, romp, rs6000, sh, sparc, sparclite, sparc64, vax, we32k. @end quotation @@ -518,7 +662,7 @@ abbreviations are used rather than the longer official names. @c What should be done about merlin, tek*, dolphin? @quotation -acorn, alliant, altos, apollo, att, bull, +acorn, alliant, altos, apollo, apple, att, bull, cbm, convergent, convex, crds, dec, dg, dolphin, elxsi, encore, harris, hitachi, hp, ibm, intergraph, isi, mips, motorola, ncr, next, ns, omron, plexus, @@ -533,8 +677,8 @@ just @samp{@var{cpu}-@var{system}}, if it is not needed. For example, Here is a list of system types: @quotation -386bsd, aix, acis, amigados, aos, aout, bosx, bsd, clix, coff, ctix, cxux, -dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, genix, gnu, gnu/linux, +386bsd, aix, acis, amigaos, aos, aout, aux, bosx, bsd, clix, coff, ctix, cxux, +dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, genix, gnu, linux-gnu, hiux, hpux, iris, irix, isc, luna, lynxos, mach, minix, msdos, mvs, netbsd, newsos, nindy, ns, osf, osfrose, ptx, riscix, riscos, rtu, sco, sim, solaris, sunos, sym, sysv, udi, ultrix, unicos, uniplus, unos, vms, vsta, @@ -577,15 +721,15 @@ mmax, news-3600, news800, news, next, pbd, pc532, pmax, powerpc, powerpcle, ps2, risc-news, rtpc, sun2, sun386i, sun386, sun3, sun4, symmetry, tower-32, tower. -@end quotation +@end quotation @noindent Remember that a machine name specifies both the cpu type and the company name. If you want to install your own homemade configuration files, you can -use @samp{local} as the company name to access them. If you use +use @samp{local} as the company name to access them. If you use configuration @samp{@var{cpu}-local}, the configuration name -without the cpu prefix +without the cpu prefix is used to form the configuration file names. Thus, if you specify @samp{m68k-local}, configuration uses @@ -600,11 +744,11 @@ things you must know: @item 1750a-*-* MIL-STD-1750A processors. -Starting with GCC 2.6.1, the MIL-STD-1750A cross configuration no longer -supports the Tektronix Assembler, but instead produces output for +The MIL-STD-1750A cross configuration produces output for @code{as1750}, an assembler/linker available under the GNU Public -License for the 1750A. Contact @emph{kellogg@@space.otn.dasa.de} for more -details on obtaining @samp{as1750}. A similarly licensed simulator for +License for the 1750A. @code{as1750} can be obtained at +@emph{ftp://ftp.fta-berlin.de/pub/crossgcc/1750gals/}. +A similarly licensed simulator for the 1750A is available from same address. You should ignore a fatal error during the building of libgcc (libgcc is @@ -638,8 +782,7 @@ GNU CC. @item alpha-*-osf1 Systems using processors that implement the DEC Alpha architecture and are running the DEC Unix (OSF/1) operating system, for example the DEC -Alpha AXP systems. (VMS on the Alpha is not currently supported by GNU -CC.) +Alpha AXP systems.CC.) GNU CC writes a @samp{.verstamp} directive to the assembler output file unless it is built as a cross-compiler. It gets the version to use from @@ -683,29 +826,44 @@ To avoid this behavior, specify @samp{-gstabs+} and use GDB instead of DBX. DEC is now aware of this problem with the assembler and hopes to provide a fix shortly. -@item arm +@item arc-*-elf +Argonaut ARC processor. +This configuration is intended for embedded systems. + +@item arm-*-aout Advanced RISC Machines ARM-family processors. These are often used in embedded applications. There are no standard Unix configurations. This configuration corresponds to the basic instruction sequences and will -produce a.out format object modules. +produce @file{a.out} format object modules. You may need to make a variant of the file @file{arm.h} for your particular configuration. +@item arm-*-linuxaout +Any of the ARM family processors running the Linux-based GNU system with +the @file{a.out} binary format (ELF is not yet supported). You must use +version 2.8.1.0.7 or later of the GNU/Linux binutils, which you can download +from @file{sunsite.unc.edu:/pub/Linux/GCC} and other mirror sites for +Linux-based GNU systems. + @item arm-*-riscix -The ARM2 or ARM3 processor running RISC iX, Acorn's port of BSD Unix. If -you are running a version of RISC iX prior to 1.2 then you must specify -the version number during configuration. Note that the assembler -shipped with RISC iX does not support stabs debugging information; a -new version of the assembler, with stabs support included, is now -available from Acorn. +The ARM2 or ARM3 processor running RISC iX, Acorn's port of BSD Unix. +If you are running a version of RISC iX prior to 1.2 then you must +specify the version number during configuration. Note that the +assembler shipped with RISC iX does not support stabs debugging +information; a new version of the assembler, with stabs support +included, is now available from Acorn and via ftp +@file{ftp.acorn.com:/pub/riscix/as+xterm.tar.Z}. To enable stabs +debugging, pass @samp{--with-gnu-as} to configure. + +You will need to install GNU @file{sed} before you can run configure. @item a29k AMD Am29k-family processors. These are normally used in embedded applications. There are no standard Unix configurations. This configuration corresponds to AMD's standard calling sequence and binary interface -and is compatible with other 29k tools. +and is compatible with other 29k tools. You may need to make a variant of the file @file{a29k.h} for your particular configuration. @@ -714,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 @@ -772,11 +931,13 @@ output from GNU CC. @end ignore @item h8300-*-* +Hitachi H8/300 series of processors. + The calling convention and structure layout has changed in release 2.6. All code must be recompiled. The calling convention now passes the first three arguments in function calls in registers. Structures are no longer a multiple of 2 bytes. - + @item hppa*-*-* There are several variants of the HP-PA processor which run a variety of operating systems. GNU CC must be configured to use the correct @@ -791,9 +952,11 @@ will work if you also use GAS and GDB in conjunction with GCC. We 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. +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. @@ -804,25 +967,19 @@ option before building. This port is very preliminary and has many known bugs. We hope to have a higher-quality port for this machine soon. -@item i386-*-linuxoldld -Use this configuration to generate a.out binaries on Linux-based GNU -systems, if you do not have gas/binutils version 2.5.2 or later -installed. This is an obsolete configuration. +@item i386-*-linux-gnuoldld +Use this configuration to generate @file{a.out} binaries on Linux-based +GNU systems if you do not have gas/binutils version 2.5.2 or later +installed. This is an obsolete configuration. -@item i386-*-linuxaout -Use this configuration to generate a.out binaries on Linux-based GNU -systems. This configuration is being superseded. You must use +@item i386-*-linux-gnuaout +Use this configuration to generate @file{a.out} binaries on Linux-based +GNU systems. This configuration is being superseded. You must use gas/binutils version 2.5.2 or later. -@item i386-*-linux-gnulibc1 +@item i386-*-linux-gnu Use this configuration to generate ELF binaries on Linux-based GNU -systems using the Linux libc version 5. You must use gas/binutils -version 2.5.2 or later. - -@item i386-*-linux -Use this configuration to generate ELF binaries on Linux-based GNU -systems using glibc 2. You must use gas/binutils version 2.8.1 or -later. +systems. You must use gas/binutils version 2.5.2 or later. @item i386-*-sco Compilation with RCC is recommended. Also, it may be a good idea to @@ -831,6 +988,33 @@ link with GNU malloc instead of the malloc that comes with the system. @item i386-*-sco3.2v4 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, 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 comes with the system. @@ -843,19 +1027,15 @@ It may be good idea to link with GNU malloc instead of the malloc that comes with the system. @item i386-ibm-aix -You need to use GAS version 2.1 or later, and and LD from +You need to use GAS version 2.1 or later, and LD from GNU binutils version 2.2 or later. @item i386-sequent-bsd -Go to the Berkeley universe before compiling. In addition, you probably -need to create a file named @file{string.h} containing just one line: -@samp{#include }. +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 @@ -868,7 +1048,7 @@ See @ref{Sun Install}, for information on installing GNU CC on Sun systems. @item i[345]86-*-winnt3.5 -This version requires a GAS that has not let been released. Until it +This version requires a GAS that has not yet been released. Until it is, you can get a prebuilt binary version via anonymous ftp from @file{cs.washington.edu:pub/gnat} or @file{cs.nyu.edu:pub/gnat}. You must also use the Microsoft header files from the Windows NT 3.5 SDK. @@ -933,30 +1113,35 @@ LynxOS 2.2 and earlier comes with GNU CC 1.x already installed as 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 produce COFF format object files and executables; otherwise GNU CC will use the -installed tools, which produce a.out format executables. +installed tools, which produce @file{a.out} format executables. + +@item m32r-*-elf +Mitsubishi M32R processor. +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-*-linuxaout -Use this configuration to generate a.out binaries on Linux. This configuration -is being superseded. You must use gas/binutils version 2.5.2 or later. - -@item m68k-*-linux-gnulibc1 -Use this configuration to generate ELF binaries on Linux with the -Linux C library 5.x.x. You must use gas/binutils version 2.8.1 later. - -@item m68k-*-linux -Use this configuration to generate ELF binaries on Linux-based GNU -systems with the GNU C library 2. You must use gas/binutils version -2.8.1 or later. - @item m68k-altos Altos 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-aux +Apple Macintosh running A/UX. +You may configure GCC to use either the system assembler and +linker or the GNU assembler and linker. You should use the GNU configuration +if you can, especially if you also want to use GNU C++. You enabled +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 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. + @item m68k-att-sysv AT&T 3b1, a.k.a. 7300 PC. Special procedures are needed to compile GNU CC with this machine's standard C compiler, due to bugs in that @@ -969,7 +1154,7 @@ the following procedure might work. We are unable to test it. @enumerate @item -Comment out the @samp{#include "config.h"} line on line 37 of +Comment out the @samp{#include "config.h"} line near the start of @file{cccp.c} and do @samp{make cpp}. This makes a preliminary version of GNU cpp. @@ -1001,12 +1186,12 @@ fashion. @end enumerate @item m68k-bull-sysv -Bull DPX/2 series 200 and 300 with BOS-2.00.45 up to BOS-2.01. GNU CC works +Bull DPX/2 series 200 and 300 with BOS-2.00.45 up to BOS-2.01. GNU CC works either with native assembler or GNU assembler. You can use GNU assembler with native coff generation by providing @samp{--with-gnu-as} to the configure script or use GNU assembler with dbx-in-coff encapsulation -by providing @samp{--with-gnu-as --stabs}. For any problem with native -assembler or for availability of the DPX/2 port of GAS, contact +by providing @samp{--with-gnu-as --stabs}. For any problem with native +assembler or for availability of the DPX/2 port of GAS, contact @code{F.Pierresteguy@@frcl.bull.fr}. @item m68k-crds-unox @@ -1053,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 @@ -1203,7 +1388,7 @@ reordering---perhaps GNU CC itself was miscompiled as a result. To enable debugging under Irix 5, you must use GNU as 2.5 or later, and use the @samp{--with-gnu-as} configure option when configuring gcc. -GNU as is distributed as part of the binutils package. +GNU as is distributed as part of the binutils package. @item mips-sony-sysv Sony MIPS NEWS. This works in NEWSOS 5.0.1, but not in 5.0.2 (which @@ -1220,9 +1405,7 @@ and @code{malloc}; you must get the compiled versions of these from GNU Emacs. @item ns32k-sequent -Go to the Berkeley universe before compiling. In addition, you probably -need to create a file named @file{string.h} containing just one line: -@samp{#include }. +Go to the Berkeley universe before compiling. @item ns32k-utek UTEK ns32000 system (``merlin''). The C compiler that comes with this @@ -1248,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. @@ -1277,46 +1462,77 @@ variable and function declarations in the original program. The warnings should not prevent the linker from producing a correct library or runnable executable. +By default, AIX 4.1 produces code that can be used on either Power or +PowerPC processors. + +You can specify a default version for the @samp{-mcpu=}@var{cpu_type} +switch by using the configure option @samp{--with-cpu-}@var{cpu_type}. + @item powerpc-*-elf @itemx powerpc-*-sysv4 PowerPC system in big endian mode, running System V.4. -This configuration is currently under development. +You can specify a default version for the @samp{-mcpu=}@var{cpu_type} +switch by using the configure option @samp{--with-cpu-}@var{cpu_type}. + +@item powerpc-*-linux-gnu +PowerPC system in big endian mode, running the Linux-based GNU system. + +You can specify a default version for the @samp{-mcpu=}@var{cpu_type} +switch by using the configure option @samp{--with-cpu-}@var{cpu_type}. @item powerpc-*-eabiaix Embedded PowerPC system in big endian mode with -mcall-aix selected as -the default. This system is currently under development. +the default. + +You can specify a default version for the @samp{-mcpu=}@var{cpu_type} +switch by using the configure option @samp{--with-cpu-}@var{cpu_type}. @item powerpc-*-eabisim Embedded PowerPC system in big endian mode for use in running under the -PSIM simulator. This system is currently under development. +PSIM simulator. + +You can specify a default version for the @samp{-mcpu=}@var{cpu_type} +switch by using the configure option @samp{--with-cpu-}@var{cpu_type}. @item powerpc-*-eabi Embedded PowerPC system in big endian mode. -This configuration is currently under development. +You can specify a default version for the @samp{-mcpu=}@var{cpu_type} +switch by using the configure option @samp{--with-cpu-}@var{cpu_type}. @item powerpcle-*-elf @itemx powerpcle-*-sysv4 PowerPC system in little endian mode, running System V.4. -This configuration is currently under development. +You can specify a default version for the @samp{-mcpu=}@var{cpu_type} +switch by using the configure option @samp{--with-cpu-}@var{cpu_type}. -@itemx powerpcle-*-sysv4 -Embedded PowerPC system in little endian mode. +@item powerpcle-*-solaris2* +PowerPC system in little endian mode, running Solaris 2.5.1 or higher. -This system is currently under development. +You can specify a default version for the @samp{-mcpu=}@var{cpu_type} +switch by using the configure option @samp{--with-cpu-}@var{cpu_type}. +Beta versions of the Sun 4.0 compiler do not seem to be able to build +GNU CC correctly. There are also problems with the host assembler and +linker that are fixed by using the GNU versions of these tools. @item powerpcle-*-eabisim Embedded PowerPC system in little endian mode for use in running under the PSIM simulator. -This system is currently under development. - @itemx powerpcle-*-eabi Embedded PowerPC system in little endian mode. -This configuration is currently under development. +You can specify a default version for the @samp{-mcpu=}@var{cpu_type} +switch by using the configure option @samp{--with-cpu-}@var{cpu_type}. + +@item powerpcle-*-winnt +@itemx powerpcle-*-pe +PowerPC system in little endian mode running Windows NT. + +You can specify a default version for the @samp{-mcpu=}@var{cpu_type} +switch by using the configure option @samp{--with-cpu-}@var{cpu_type}. @item vax-dec-ultrix Don't try compiling with Vax C (@code{vcc}). It produces incorrect code @@ -1324,7 +1540,7 @@ in some cases (for example, when @code{alloca} is used). Meanwhile, compiling @file{cp/parse.c} with pcc does not work because of an internal table size limitation in that compiler. To avoid this -problem, compile just the GNU C compiler first, and use it to recompile +problem, compile just the GNU C compiler first, and use it to recompile building all the languages that you want to run. @item sparc-sun-* @@ -1348,23 +1564,23 @@ in GNU CC. You can work around this by building @file{cpp} in GNU CC first, then use that instead of the system's preprocessor with the system's C compiler to compile @file{stmt.c}. Here is how: -@example +@smallexample mv /lib/cpp /lib/cpp.att cp cpp /lib/cpp.gnu echo '/lib/cpp.gnu -traditional $@{1+"$@@"@}' > /lib/cpp chmod +x /lib/cpp -@end example +@end smallexample The system's compiler produces bad code for some of the GNU CC optimization files. So you must build the stage 2 compiler without optimization. Then build a stage 3 compiler with optimization. That executable should work. Here are the necessary commands: -@example +@smallexample make LANGUAGES=c CC=stage1/xgcc CFLAGS="-Bstage1/ -g" make stage2 make CC=stage2/xgcc CFLAGS="-Bstage2/ -g -O" -@end example +@end smallexample You may need to raise the ULIMIT setting to build a C++ compiler, as the file @file{cc1plus} is larger than one megabyte. @@ -1451,7 +1667,7 @@ have not all been made to work. GNU CC now has a floating point emulator with which these can work, but each target machine description needs to be updated to take advantage of it. -@item +@item Cross-compilation between machines of different word sizes is somewhat problematic and sometimes does not work. @end itemize @@ -1553,7 +1769,7 @@ supports. If you want to install libraries to use with the cross-compiler, such as a standard C library, put them in the directory -@file{/usr/local/@var{target}/lib}; installation of GNU CC copies all +@file{/usr/local/@var{target}/lib}; installation of GNU CC copies all the files in that subdirectory into the proper place for GNU CC to find them and link with them. Here's an example of copying some libraries from a target machine: @@ -1616,7 +1832,7 @@ library @file{libgcc1.a} that does the job it is expected to do. To compile @file{libgcc1.c} with the cross-compiler itself does not work. The functions in this file are supposed to implement arithmetic operations that GNU CC does not know how to open code for your target -machine. If these functions are compiled with GNU CC itself, they +machine. If these functions are compiled with GNU CC itself, they will compile into infinite recursion. On any given target, most of these functions are not needed. If GNU CC @@ -1630,13 +1846,13 @@ If you are linking with a library that contains functions for multiplication and division, you can tell GNU CC to call them directly by defining the macros @code{MULSI3_LIBCALL}, and the like. These macros need to be defined in the target description macro file. For -some targets, they are defined already. This may be sufficient to +some targets, they are defined already. This may be sufficient to avoid the need for libgcc1.a; if so, you can supply an empty library. Some targets do not have floating point instructions; they need other functions in @file{libgcc1.a}, which do floating arithmetic. Recent versions of GNU CC have a file which emulates floating point. -With a certain amount of work, you should be able to construct a +With a certain amount of work, you should be able to construct a floating point emulator that can be used as @file{libgcc1.a}. Perhaps future versions will contain code to do this automatically and conveniently. That depends on whether someone wants to implement it. @@ -1708,7 +1924,7 @@ machine, the cross-compiler can use them also. Otherwise, you're on your own in finding header files to use when cross-compiling. -When you have found suitable header files, put them in +When you have found suitable header files, put them in the directory @file{/usr/local/@var{target}/include}, before building the cross compiler. Then installation will run fixincludes properly and install the corrected versions of the header files where the compiler will use @@ -1774,16 +1990,20 @@ 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 linked with a special startup file and would not link properly without special pains. -@cindex @code{alloca}, for SunOs +@cindex @code{alloca}, for SunOS There is a bug in @code{alloca} in certain versions of the Sun library. To avoid this bug, install the binaries of GNU CC that were compiled by GNU CC. They use @code{alloca} as a built-in function and never the one @@ -1798,6 +2018,12 @@ it by using the following command to compile GNU CC with Sun CC: make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc" @end example +SunOS 4.1.3 and 4.1.3_U1 have bugs that can cause intermittent core +dumps when compiling GNU CC. A common symptom is an +internal compiler error which does not recur if you run it again. +To fix the problem, install Sun recommended patch 100726 (for SunOS 4.1.3) +or 101508 (for SunOS 4.1.3_U1), or upgrade to a later SunOS release. + @node VMS Install @section Installing GNU CC on VMS @cindex VMS installation @@ -1868,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 @@ -2046,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 @@ -2141,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