]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/doc/install.texi
Revert XFAIL removal.
[thirdparty/gcc.git] / gcc / doc / install.texi
CommitLineData
f42974dc
DW
1\input texinfo.tex @c -*-texinfo-*-
2@c @ifnothtml
3@c %**start of header
4@setfilename install.info
5@settitle Installing GCC
6@setchapternewpage odd
7@c %**end of header
8@c @end ifnothtml
9
10@c Specify title for specific html page
11@ifset indexhtml
12@settitle Installing GCC
13@end ifset
14@ifset specifichtml
15@settitle Host/Target specific installation notes for GCC
16@end ifset
17@ifset downloadhtml
18@settitle Downloading GCC
19@end ifset
20@ifset configurehtml
21@settitle Installing GCC: Configuration
22@end ifset
23@ifset buildhtml
24@settitle Installing GCC: Building
25@end ifset
26@ifset testhtml
27@settitle Installing GCC: Testing
28@end ifset
29@ifset finalinstallhtml
30@settitle Installing GCC: Final installation
31@end ifset
32@ifset binarieshtml
33@settitle Installing GCC: Binaries
34@end ifset
35
36@comment $Id$
37@c Copyright (C) 2001 Free Software Foundation, Inc.
38@c *** Converted to texinfo by Dean Wakerley, dean@wakerley.com
39
40@c Include everything if we're not making html
41@ifnothtml
42@set indexhtml
43@set specifichtml
44@set downloadhtml
45@set configurehtml
46@set buildhtml
47@set testhtml
48@set finalinstallhtml
49@set binarieshtml
50@end ifnothtml
51
52@c Part 2 Summary Description and Copyright
53@ifinfo
54
55Copyright @copyright{} 2001 Free Software Foundation, Inc.
56@end ifinfo
57
58@c Part 3 Titlepage and Copyright
59@titlepage
60@sp 10
61@comment The title is printed in a large font.
62@center @titlefont{Sample Title}
63
64@c The following two commands start the copyright page.
65@page
66vskip 0pt plus 1filll
67Copyright @copyright{} 2001 Free Software Foundation, Inc.
68@end titlepage
69
70@c Part 4 Top node and Master Menu
71@ifinfo
72@node Top, , , (dir)
73@comment node-name, next, Previous, up
74
75@menu
76* Installing GCC:: This document describes the generic installation
77 procedure for GCC as well as detailing some target
78 specific installation instructions.
79
80* Specific:: Host/target specific installation notes for GCC.
81* Binaries:: Where to get pre-compiled binaries.
82
83* Concept Index:: This index has two entries.
84@end menu
85@end ifinfo
86
87@c Part 5 The Body of the Document
88@c ***Installing GCC**********************************************************
89@ifinfo
90@comment node-name, next, previous, up
91@node Installing GCC, Binaries, , Top
92@end ifinfo
93@ifset indexhtml
94@html
95<h1 align="center">Installing GCC</h1>
96@end html
97@ifnothtml
98@chapter Installing GCC
99@end ifnothtml
100
101The latest version of this document is always available at
102@uref{http://gcc.gnu.org/install/,,http://gcc.gnu.org/install/}.
103
104This document describes the generic installation procedure for GCC as well
105as detailing some target specific installation instructions.
106
107GCC includes several components that previously were separate distributions
108with their own installation instructions. This document supersedes all
109package specific installation instructions. We provide the component
110specific installation information in the source distribution for historical
111reference purposes only.
112
113@emph{Before} starting the build/install procedure please check the
114@ifnothtml
115@xref{Specific, host/target specific installation notes}.
116@end ifnothtml
117@ifnotinfo
118@uref{specific.html,,host/target specific installation notes}.
119@end ifnotinfo
120We recommend you browse the entire generic installation instructions before
121you proceed.
122
123The installation procedure itself is broken into five steps.
124
125@ifinfo
126@menu
127* Downloading the source::
128* Configuration::
129* Building::
130* Testing:: (optional)
131* Final install::
132@end menu
133@end ifinfo
134@ifnotinfo
135@enumerate
136@item
137@uref{download.html,,Downloading the source}
138@item
139@uref{configure.html,,Configuration}
140@item
141@uref{build.html,,Building}
142@item
143@uref{test.html,,Testing} (optional)
144@item
145@uref{finalinstall.html,,Final install}
146@end enumerate
147@end ifnotinfo
148
149Please note that GCC does not support `@code{make uninstall}' and probably
150won't do so in the near future as this would open a can of worms. Instead,
151we suggest that you install GCC into a directory of its own and simply
152remove that directory when you do not need that specific version of GCC any longer.
153
154@html
155<hr>
156<p>
157@end html
158@ifhtml
159@uref{./index.html,,Return to the GCC Installation page}
160@end ifhtml
161@end ifset
162
163@c ***Downloading the source**************************************************
164@ifinfo
165@comment node-name, next, previous, up
166@node Downloading the source, Configuration, , Installing GCC
167@end ifinfo
168@ifset downloadhtml
169@html
170<h1 align="center">Downloading GCC</h1>
171@end html
172@ifnothtml
173@chapter Downloading GCC
174@end ifnothtml
175@cindex Downloading GCC
176@cindex Downloading the Source
177
178GCC is distributed via CVS and FTP tarballs compressed with gzip or
179bzip2. It is possible to download a full distribution or specific
180components.
181
182Please refer to our @uref{http://gcc.gnu.org/releases.html,,releases web page}
183for information on how to obtain GCC.
184
185The full distribution includes the C, C++, Objective-C, Fortran, Java,
186and Chill compilers. The full distribution also includes runtime libraries
187for C++, Objective-C and Fortran. In the future the GNU compiler testsuites
188will be included in the full distribution.
189
190If you choose to download specific components, you must download the core
191gcc distribution plus any language specific distributions you wish to
192use. The core distribution includes the C language front-end as well as the
193shared components. Each language has a tarball which includes the language
194front-end as well as the language runtime (when appropriate).
195
196Unpack the core distribution as well as any language specific
197distributions in the same directory.
198
199If you also intend to build binutils (either to upgrade an existing
200installation or for use in place of the corresponding tools of your
201OS), unpack the binutils distribution either in the same directory or
202a separate one. In the latter case, add symbolic links to any
203components of the binutils you intend to build alongside the compiler
204(bfd, binutils, gas, gprof, ld, opcodes,...) to the directory containing
205the GCC sources.
206
207@html
208<hr>
209<p>
210@end html
211@ifhtml
212@uref{./index.html,,Return to the GCC Installation page}
213@end ifhtml
214@end ifset
215
216@c ***Configuration***********************************************************
217@ifinfo
218@comment node-name, next, previous, up
219@node Configuration, Building, Downloading the source, Installing GCC
220@end ifinfo
221@ifset configurehtml
222@html
223<h1 align="center">Installing GCC: Configuration</h1>
224@end html
225@ifnothtml
226@chapter Installing GCC: Configuration
227@end ifnothtml
228@cindex Configuration
229@cindex Installing GCC: Configuration
230
231Like most GNU software, GCC must be configured before it can be built.
232This document describes the recommended configuration procedure
233for both native and cross targets.
234
235We use @emph{srcdir} to refer to the toplevel source directory for
236GCC; we use @emph{objdir} to refer to the toplevel build/object directory.
237
238First, we @strong{highly} recommend that GCC be built into a
239separate directory than the sources which does @strong{not} reside
240within the source tree. This is how we generally build GCC; building
241where @emph{srcdir} == @emph{objdir} should still work, but doesn't
242get extensive testing; building where @emph{objdir} is a subdirectory
243of @emph{srcdir} is unsupported.
244
245Second, when configuring a native system, either ``@command{cc}'' or
246``@command{gcc}'' must be in your path or you must set CC in your
247environment before running configure.
248Otherwise the configuration scripts may fail.
249
250To configure GCC:
251
252@example
253 % mkdir @emph{objdir}
254 % cd @emph{objdir}
255 % @emph{srcdir}/configure @strong{[target] [options]}
256@end example
257
258
259@strong{target specification}
260@itemize @bullet
261@item
262GCC has code to correctly determine the correct value for @strong{target}
263for nearly all native systems. Therefore, we highly recommend you not
264provide a configure target when configuring a native compiler.
265
266@item
267@strong{target} must be specified as @option{--target=}@emph{target}
268when configuring a cross compiler; examples of valid targets would be
269i960-rtems, m68k-coff, sh-elf, etc.
270
271@item
272Specifying just @strong{target} instead of @option{--target=}@emph{target}
273implies that the host defaults to @strong{target}.
274@end itemize
275
276
277@strong{options specification}
278
279Use @strong{options} to override several configure time options for
280GCC. A partial list of supported @option{options}:
281
282@itemize @bullet
283@item
284@option{--prefix=}@emph{dirname} @minus{}@minus{} Specify the toplevel installation
285directory. This is the recommended way to install the tools into a directory
286other than the default. The toplevel installation directory defaults to
287@code{/usr/local}.
288
289We @strong{highly} recommend against @emph{dirname} being the same or a
290subdirectory of @emph{objdir} or vice versa.
291
292These additional options control where certain parts of the distribution
293are installed. Normally you should not need to use these options.
294@itemize @bullet
295@item
296@option{--with-local-prefix=}@emph{dirname} @minus{}@minus{} Specify the installation
297directory for local include files. The default is @code{/usr/local}.
298
299@item
300@option{--with-gxx-include-dir=}@emph{dirname} @minus{}@minus{} Specify the installation
301directory for g++ header files. The default is @command{/usr/local/include/g++}.
302
303@end itemize
304
305@item
306@option{--enable-shared} @minus{}@minus{} Build shared versions of the C++ runtime
307libraries if supported. This is the default on most systems. Use @option{--disable-shared}
308for static libraries. Note that up to the gcc version 2.95.x series, static
309libraries were the default on all systems.
310
311@item
312@option{--with-gnu-as} @minus{}@minus{} Specify that the compiler should assume that the
313assembler it finds is the GNU assembler. However, this does not modify the rules to find an
314assembler and will result in confusion if found assembler is not actually the GNU assembler.
315If you have more than one assembler installed on your system, you may want to use this option
316in connection with @option{--with-as=/path/to/gas}.
317
318@item
319@option{--with-as=@emph{/path/to/as}} @minus{}@minus{} Specify that the compiler should use the
320assembler pointed to by @emph{pathname}, rather than the one found by the standard rules to
321find an assembler, which are:
322@itemize @bullet
323@item
324Check the @emph{$exec_prefix/lib/gcc-lib/$target/$version} directory, where @emph{$exec_prefix}
325defaults to @emph{$prefix} which defaults to @file{/usr/local} unless overridden by the
326@option{--prefix=/pathname} switch described above. @emph{$target} is the target system triple,
327such as @emph{sparc-sun-solaris2.7}, and @emph{$version} denotes the GCC version, such as 2.95.2.
328@item
329Check operating system specific directories (e.g. @file{/usr/ccs/bin} on Sun Solaris).
330@end itemize
331Note that these rules do not check for the value of @emph{$PATH}. You may want to use
332@option{--with-as} if no assembler is installed in the directories listed above, or if you have
333multiple assemblers installed and want to choose one that is not found by the above rules.
334
335@item
336@option{--with-gnu-ld} @minus{}@minus{} Same as @option{--with-gnu-as} but for linker.
337
338@item
339@option{--with-ld=@emph{/path/to/ld}} @minus{}@minus{} Same as @option{--with-as}, but for the
340linker.
341
342@item
343@option{--with-stabs} @minus{}@minus{} Specify that stabs debugging information should be used
344instead of whatever format the host normally uses. Normally GCC uses the
345same debug format as the host system.
346
347@item
348@option{--enable-multilib} @minus{}@minus{} Specify that multiple target libraries
349should be built to support different target variants, calling conventions,
350etc. This is the default.
351
352@item
353@option{--enable-threads} @minus{}@minus{} Specify that the target supports threads.
354This affects the Objective-C compiler and runtime library, and exception
355handling for other languages like C++ and Java.
356
357@item
358@option{--enable-threads=}@emph{lib} @minus{}@minus{} Specify that @emph{lib} is the thread
359support library. This affects the Objective-C compiler and runtime library,
360and exception handling for other languages like C++ and Java.
361
362@item
363@option{--with-cpu=}@emph{cpu} @minus{}@minus{} Specify which cpu variant the
364compiler should generate code for by default. This is currently
365only supported on the some ports, specifically arm, powerpc, and
366SPARC. If configure does not recognize the model name (e.g. arm700,
367603e, or ultrasparc) you provide, please check the configure script
368for a complete list of supported models.
369
370@item
371@option{--enable-target-optspace} @minus{}@minus{} Specify that target libraries
372should be optimized for code space instead of code speed. This is the
373default for the m32r platform.
374
375@item
376@option{--enable-cpp} @minus{}@minus{} Specify that a shell script which emulates
377traditional cpp functionality should be installed.
378
379@item
380@option{--enable-cpplib} @minus{}@minus{} Specify that the functionality of
381CPP should be integrated into the compiler itself. This option is
382not supported by snapshots since November 2000. In snapshots where
383it is supported, it is not enabled by default, except for snapshots
384very close to November 2000.
385
386@item
387@option{--without-fast-fixincludes} @minus{}@minus{} Specify that the old, slower
388method of fixing the system header files should be used.
389EGCS 1.1.x and older releases default to the slow version. GCC 2.95 and
390newer releases will default to the fast version.
391
392@item
393@option{--enable-version-specific-runtime-libs} @minus{}@minus{} Specify that runtime
394libraries should be installed in the compiler specific subdirectory
395(@option{$@{libsubdir@}}) rather than the usual places.
396In addition, libstdc++'s include files will be installed in
397@option{$@{libsubdir@}/include/g++} unless you overruled it by using
398@option{--with-gxx-include-dir=}@emph{dirname}.
399Using this option is particularly useful if you intend to use several
400versions of GCC in parallel. This is currently supported by @option{libf2c}
401and @option{libstdc++}.
402
403@item
404@option{--enable-languages=}@emph{lang1}@option{,}@emph{lang2}@option{,...}
405@minus{}@minus{} Specify that only a particular subset of compilers and their runtime libraries
406should be built. For a list of valid values for @emph{lang}@option{x} you can issue
407the following command in the @option{gcc} directory of your GCC source tree:@*
408@command{grep language= */config-lang.in}@*
409Currently, you can use any of the following: @code{c++}, @code{f77}, @code{java} and @code{objc}.
410@code{CHILL} is not currently maintained, and will almost
411certainly fail to compile. Note that this switch does not work with
412EGCS 1.1.2 or older versions of egcs. It is supported in GCC 2.95
413and newer versions.@*
414If you do not pass this flag, all languages available in the @code{gcc} sub-tree
415will be configured. Re-defining LANGUAGES when calling @command{make bootstrap}
416@strong{*does not*} work anymore, as those language sub-directories might not have been
417configured!
418
419@item
420@option{--disable-libgcj} @minus{}@minus{} Specify that the run-time libraries
421used by GCJ should not be built. This is useful in case you intend
422to use GCJ with some other run-time, or you're going to install it
423separately, or it just happens not to build on your particular
424machine. In general, if the Java front-end is enabled, the GCJ
425libraries will be enabled too, unless they're known to not work on
426the target platform. If GCJ is enabled but libgcj isn't built, you
427may need to port it; in this case, before modifying the top-level
428configure.in so that libgcj is enabled by default on this platform,
429you may use @option{--enable-libgcj} to override the default.
430
431@item
432@option{--with-dwarf2} @minus{}@minus{} Specify that the compiler should use DWARF2
433debugging information as the default.
434@end itemize
435
436Some options which only apply to building cross compilers:
437@itemize @bullet
438@item
439@option{--with-headers=}@emph{dir} @minus{}@minus{} Specifies a directory which has
440target include files.
441@emph{This options is required} when building a cross
442compiler, if @code{$@{prefix@}/$@{target@}/sys-include} doesn't pre-exist.
443These include files will be copied into the @code{gcc} install directory.
444Fixincludes will be run on these files to make them compatible with @command{gcc}.
445@item
446@option{--with-libs=}@emph{``dir1 dir2 ... dirN''} @minus{}@minus{} Specifies a list of
447directories which contain the target runtime libraries. These libraries will
448be copied into the @code{gcc} install directory.
449@item
450@option{--with-newlib} @minus{}@minus{} Specifies that ``newlib'' is being used as the target
451C library. This causes @code{__eprintf} to be omitted from libgcc.a on the
452assumption that it will be provided by newlib.
453@end itemize
454
455Note that each @option{--enable} option has a corresponding @option{--disable} option and
456that each @option{--with} option has a corresponding @option{--without} option.
457
458@html
459<hr>
460<p>
461@end html
462@ifhtml
463@uref{./index.html,,Return to the GCC Installation page}
464@end ifhtml
465@end ifset
466
467@c ***Building****************************************************************
468@ifinfo
469@comment node-name, next, previous, up
470@node Building, Testing, Configuration, Installing GCC
471@end ifinfo
472@ifset buildhtml
473@html
474<h1 align="center">Installing GCC: Building</h1>
475@end html
476@ifnothtml
477@chapter Building
478@end ifnothtml
479@cindex Installing GCC: Building
480
481Now that GCC is configured, you are ready to build the compiler and
482runtime libraries.
483
484We @strong{highly} recommend that GCC be built using GNU make;
485other versions may work, then again they might not.
486
487(For example, many broken versions of make will fail if you use the
488recommended setup where @emph{objdir} is different from @emph{srcdir}.)
489
490
491@section Building a native compiler
492
493For a native build issue the command `@code{make bootstrap}'. This
494will build the entire GCC system, which includes the following steps:
495
496@itemize @bullet
497@item
498Build host tools necessary to build the compiler such as texinfo, bison,
499gperf.
500
501@item
502Build target tools for use by the compiler such as binutils (bfd,
503binutils, gas, gprof, ld, and opcodes)@*
504if they have been individually linked
505or moved into the top level GCC source tree before configuring.
506
507@item
508Perform a 3-stage bootstrap of the compiler.
509
510@item
511Perform a comparison test of the stage2 and stage3 compilers.
512
513@item
514Build runtime libraries using the stage3 compiler from the previous step.
515
516@end itemize
517
518If you are short on disk space you might consider `@code{make
519bootstrap-lean}' instead. This is identical to `@code{make
520bootstrap}' except that object files from the stage1 and
521stage2 of the 3-stage bootstrap of the compiler are deleted as
522soon as they are no longer needed.
523
524
525If you want to save additional space during the bootstrap and in
526the final installation as well, you can build the compiler binaries
527without debugging information with ``@code{make CFLAGS='-O' LIBCFLAGS='-g
528-O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap}''. This will save
529roughly 40% of disk space both for the bootstrap and the final installation.
530(Libraries will still contain debugging information.)
531
532If you used the flag @code{--enable-languages=...} to restrict
533the compilers to be built, only those you've actually enabled will be
534built. This will of course only build those runtime libraries, for
535which the particular compiler has been built. Please note,
536that re-defining LANGUAGES when calling `@code{make bootstrap}'
537@strong{*does not*} work anymore!
538
539
540@section Building a cross compiler
541
542We recommend reading the
543@uref{http://www.objsw.com/CrossGCC/,,crossgcc FAQ}
544for information about building cross compilers.
545
546When building a cross compiler, it is not generally possible to do a
5473-stage bootstrap of the compiler. This makes for an interesting problem
548as parts of GCC can only be built with GCC.
549
550To build a cross compiler, we first recommend building and installing a
551native compiler. You can then use the native GCC compiler to build the
552cross compiler.
553
554Assuming you have already installed a native copy of GCC and configured
555your cross compiler, issue the command `@code{make}', which performs the
556following steps:
557
558@itemize @bullet
559@item
560Build host tools necessary to build the compiler such as texinfo, bison,
561gperf.
562
563@item
564Build target tools for use by the compiler such as binutils (bfd,
565binutils, gas, gprof, ld, and opcodes)
566if they have been individually linked or moved into the top level GCC source
567tree before configuring.
568
569@item
570Build the compiler (single stage only).
571
572@item
573Build runtime libraries using the compiler from the previous step.
574@end itemize
575
576Note that if an error occurs in any step the make process will exit.
577
578@section Building in parallel
579
580If you have a multiprocessor system you can use `@code{make bootstrap
581MAKE="make -j 2" -j 2}' or just `@code{make -j 2 bootstrap}'
582for GNU Make 3.79 and above instead of just `@code{make bootstrap}'
583when building GCC. You can use a bigger number instead of two if
584you like. In most cases, it won't help to use a number bigger than
585the number of processors in your machine.
586
587@html
588<hr>
589<p>
590@end html
591@ifhtml
592@uref{./index.html,,Return to the GCC Installation page}
593@end ifhtml
594@end ifset
595
596@c ***Testing*****************************************************************
597@ifinfo
598@comment node-name, next, previous, up
599@node Testing, Final install, Building, Installing GCC
600@end ifinfo
601@ifset testhtml
602@html
603<h1 align="center">Installing GCC: Testing</h1>
604@end html
605@ifnothtml
606@chapter Installing GCC: Testing
607@end ifnothtml
608@cindex Testing
609@cindex Installing GCC: Testing
610@cindex Testsuite
611
612@strong{Please note that this is only applicable
613to current development versions of GCC and GCC 3.0 or later.
614GCC 2.95.x does not come with a testsuite.}
615
616Before you install GCC, you might wish to run the testsuite. This
617step is optional and may require you to download additional software.
618
619First, you must have @uref{download.html,,downloaded the testsuites}.
620The full distribution contains testsuites; only if you downloaded the
621``core'' compiler plus any front ends, you do not have the testsuites.
622
623Second, you must have a @uref{http://www.gnu.org/software/dejagnu/,,current version of DejaGnu} installed;
624dejagnu 1.3 is not sufficient.
625
626Now you may need specific preparations:
627
628@itemize @bullet
629@item
630In order to run the libio tests on targets which do not fully
631support Unix/POSIX commands (e.g. Cygwin), the references to the dbz
632directory have to be deleted from @code{libio/configure.in}.
633
634@item
635The following environment variables must be set appropriately, as in
636the following example (which assumes that DejaGnu has been installed
637under @code{/usr/local}):
638
639@example
640 TCL_LIBRARY = /usr/local/share/tcl8.0
641 DEJAGNULIBS = /usr/local/share/dejagnu
642@end example
643
644On systems such as Cygwin, these paths are required to be actual
645paths, not mounts or links; presumably this is due to some lack of
646portability in the DejaGnu code.
647
648@end itemize
649
650Finally, you can run the testsuite (which may take a long time):
651@example
652 cd @emph{objdir}; make -k check
653@end example
654
655The testing process will try to test as many components in the GCC
656distribution as possible, including the C, C++ and Fortran compilers as
657well as the C++ runtime libraries.
658
659@section How can I run the test suite on selected tests?
660
661As a first possibility to cut down the number of tests that are run it is
662possible to use `@code{make check-gcc}' or `@code{make check-g++}'
663in the gcc subdirectory of the object directory. To further cut down the
664tests the following is possible:
665
666@example
667 make check-gcc RUNTESTFLAGS="execute.exp <other options>"
668@end example
669
670This will run all gcc execute tests in the testsuite.
671
672@example
673 make check-g++ RUNTESTFLAGS="old-deja.exp=9805* <other options>"
674@end example
675
676This will run the g++ "old-deja" tests in the testsuite where the filename
677matches 9805*.
678
679The *.exp files are located in the testsuite directories of the GCC
680source, the most important ones being compile.exp, execute.exp, dg.exp
681and old-deja.exp. To get a list of the possible *.exp files, pipe the
682output of `@code{make check}' into a file and look at the
683"@code{Running ... .exp}" lines.
684
685@section How to interpret test results
686
687After the testsuite has run you'll find various *.sum and *.log
688files in the testsuite subdirectories. The *.log files contain a
689detailed log of the compiler invocations and the corresponding
690results, the *.sum files summarize the results. These summaries list
691all the tests that have been run with a corresponding status code:
692
693@itemize @bullet
694@item
695PASS: the test passed as expected
696@item
697XPASS: the test unexpectedly passed
698@item
699FAIL: the test unexpectedly failed
700@item
701XFAIL: the test failed as expected
702@item
703UNSUPPORTED: the test is not supported on this platform
704@item
705ERROR: the testsuite detected an error
706@item
707WARNING: the testsuite detected a possible problem
708@end itemize
709
710It is normal for some tests to report unexpected failures. At the current time
711our testing harness does not allow fine grained control over whether or not a
712test is expected to fail. We expect to fix this problem in future releases.
713
714
715@section Submitting test results
716
717If you want to report the results to the GCC project, use the
718@code{contrib/test_summary} shell script. Start it in the @emph{objdir} with
719
720@example
721 @emph{srcdir}/contrib/test_summary -p your_commentary.txt -m gcc-testresults@@gcc.gnu.org |sh
722@end example
723
724This script uses the @code{Mail} program to send the results, so
725make sure it is in your @env{PATH}. The file @file{your_commentary.txt} is
726prepended to the testsuite summary and should contain any special
727remarks you have on your results or your build environment. Please
728do not edit the testsuite result block or the subject line, as these
729messages are automatically parsed and presented at the
730@uref{http://gcc.gnu.org/testresults/,,GCC testresults} web
731page. Here you can also gather information on how specific tests
732behave on different platforms and compare them with your results. A
733few failing testcases are possible even on released versions and you
734should look here first if you think your results are unreasonable.
735
736@end ifset
737
738@c ***Final install***********************************************************
739@ifinfo
740@comment node-name, next, previous, up
741@node Final install, , Testing, Installing GCC
742@end ifinfo
743@ifset finalinstallhtml
744@html
745<h1 align="center">Installing GCC: Final installation</h1>
746@end html
747@ifnothtml
748@chapter Installing GCC: Final installation
749@end ifnothtml
750
751Now that GCC has been built and tested, you can install it with
752`@command{cd @emph{objdir}; make install}' for a native compiler or
753`@command{cd @emph{objdir}; make install LANGUAGES="c c++"}' for
754a cross compiler (note installing cross compilers will be easier in the
755next release!).
756
757That step completes the installation of GCC; user level binaries can
758be found in @code{@emph{prefix}/bin} where @code{@emph{prefix}} is the value you specified
759with the @option{--prefix} to configure (or @file{/usr/local} by default).
760
761If you don't mind, please quickly review the
762@uref{http://gcc.gnu.org/gcc-2.95/buildstat.html,,build status page}.
763If your system is not listed, send a note to
764@uref{mailto:gcc@@gcc.gnu.org,,gcc@@gcc.gnu.org} indicating
765that you successfully built and installed GCC.
766
767Include the output from running @code{@emph{srcdir}/config.guess}. (Do not
768send us the config.guess file itself, just the output from running
769it!)
770
771If you find a bug, please report it following our
772@uref{../bugs.html,,bug reporting guidelines}.
773
774@html
775<hr>
776<p>
777@end html
778@ifhtml
779@uref{./index.html,,Return to the GCC Installation page}
780@end ifhtml
781@end ifset
782
783@c ***Binaries****************************************************************
784@ifinfo
785@comment node-name, next, previous, up
786@node Binaries, Specific, Installing GCC, Top
787@end ifinfo
788@ifset binarieshtml
789@html
790<h1 align="center">Installing GCC: Binaries</h1>
791@end html
792@ifnothtml
793@chapter Installing GCC: Binaries
794@end ifnothtml
795@cindex Binaries
796@cindex Installing GCC: Binaries
797
798We are often asked about pre-compiled versions of GCC. While we cannot
799provide these for all platforms, below you'll find links to binaries for
800various platforms where creating them by yourself is not easy due to various
801reasons.
802
803Please note that we did not create these binaries, nor do we
804support them. If you have any problems installing them, please
805contact their makers.
806
807@itemize
808@item
809@uref{http://www-frec.bull.com/docs/download.htm,,AIX};
810
811@item
812DOS - @uref{http://www.delorie.com/djgpp/,,DJGPP};
813
814@item
815@uref{http://hpux.cae.wisc.edu/,,HP-UX Porting Center};
816
817@item
818@uref{http://www.sco.com/skunkware/devtools/index.html#gcc,,SCO OpenServer/Unixware};
819
820@item
821Solaris (SPARC, Intel) - @uref{http://www.sunfreeware.com/,,Sunfreeware};
822
823@item
824SGI - @uref{http://freeware.sgi.com/,,SGI Freeware};
825
826@item
827Windows 95, 98, and NT:
828@itemize
829@item
830The @uref{http://sources.redhat.com/cygwin/,,Cygwin} project;
831@item
832@uref{http://www.xraylith.wisc.edu/~khan/software/gnu-win32/,,GNU Win32}
833related projects by Mumit Khan.
834@end itemize
835
836@item
837@uref{ftp://ftp.thewrittenword.com/packages/free/by-name/gcc-2.95.2/,,The
838Written Word} offers binaries for Solaris 2.5.1, 2.6, 2.7/SPARC, 2.7/Intel,
839IRIX 6.2, 6.5, Digital UNIX 4.0D, HP-UX 10.20, and HP-UX 11.00.
840
841@item
842Hitachi H8/300[HS] -
843@uref{http://h8300-hms.sourceforge.net/,,GNU Development Tools for the
844Hitachi H8/300[HS] Series}
845
846@end itemize
847
848In addition to those specific offerings, you can get a binary
849distribution CD-ROM from the
850@uref{http://www.fsf.org/order/order.html,,Free Software Foundation}.
851It contains binaries for a number of platforms, and
852includes not only GCC, but other stuff as well. The current CD does
853not contain the latest version of GCC, but it should allow
854bootstrapping the compiler. An updated version of that disk is in the
855works.
856
857@html
858<hr>
859<p>
860@end html
861@ifhtml
862@uref{./index.html,,Return to the GCC Installation page}
863@end ifhtml
864@end ifset
865
866@c ***Specific****************************************************************
867@ifinfo
868@comment node-name, next, previous, up
869@node Specific, Concept Index, Binaries, Top
870@end ifinfo
871@ifset specifichtml
872@html
873<h1 align="center">Host/target specific installation notes for GCC</h1>
874@end html
875@ifnothtml
876@chapter Host/target specific installation notes for GCC
877@end ifnothtml
878@cindex Specific
879@cindex Specific installation notes
880@cindex Target specific installation
881@cindex Host specific installation
882@cindex Target specific installation notes
883
884Please read this document carefully @emph{before} installing the
885GNU Compiler Collection on your machine.
886
887@itemize
888@item
889@uref{#alpha*-dec-linux*,,alpha*-dec-linux*}
890@item
891@uref{#alpha*-dec-osf*,,alpha*-dec-osf*}
892@item
893@uref{#avr,,avr}
894@item
895@uref{#dos,,DOS}
896@item
897@uref{#h8300-hms,,h8300-hms}
898@item
899@uref{#hppa*-hp-hpux*,,hppa*-hp-hpux*}
900@item
901@uref{#hppa*-hp-hpux9,,hppa*-hp-hpux9}
902@item
903@uref{#hppa*-hp-hpux10,,hppa*-hp-hpux10}
904@item
905@uref{#hppa*-hp-hpux11,,hppa*-hp-hpux11}
906@item
907@uref{#*-*-linux-gnu,,*-*-linux-gnu}
908@item
909@uref{#ix86-*-linux*,,i?86-*-linux*}
910@item
911@uref{#ix86-*-sco3.2v5*,,i?86-*-sco3.2v5*}
912@item
913@uref{#ix86-*-solaris*,,i?86-*-solaris*}
914@item
915@uref{#ix86-*-udk,,i?86-*-udk}
916@item
917@uref{#*-ibm-aix*,,*-ibm-aix*}
918@item
919@uref{#m68k-*-nextstep*,,m68k-*-nextstep*}
920@item
921@uref{#m68k-sun-sunos4.1.1,,m68k-sun-sunos4.1.1}
922@item
923@uref{#mips*-sgi-irix[45],,mips*-sgi-irix[45]}
924@item
925@uref{#mips*-sgi-irix6,,mips*-sgi-irix6}
926@item
927@uref{#powerpc-*-linux-gnu*,,powerpc-*-linux-gnu*}
928@item
929@uref{#*-*-solaris*,,*-*-solaris*}
930@item
931@uref{#sparc-sun-solaris*,,sparc-sun-solaris*}
932@item
933@uref{#sparc-sun-solaris2.7,,sparc-sun-solaris2.7}
934@item
935@uref{#*-sun-solaris2.8,,*-sun-solaris2.8}
936@item
937@uref{#sunv5,,Sun V5.0 Compiler Bugs}
938@item
939@uref{#sparc-sun-sunos*,,sparc-sun-sunos*}
940@item
941@uref{#sparc-unknown-linux-gnulibc1,,sparc-unknown-linux-gnulibc1}
942@item
943@uref{#sparc64-*-*,,sparc64-*-*}
944@item
945@uref{#windows,,Microsoft Windows}
946@item
947@uref{#os2,,OS/2}
948@item
949@uref{#older,,Older systems}
950@end itemize
951
952@itemize
953@item
954@uref{#elf_targets,,all ELF targets} (SVR4, Solaris, etc.)
955@end itemize
956
957
958@html
959<!-- -------- host/target specific issues start here ---------------- -->
960<hr>
961<h3><a name="alpha*-dec-linux*">alpha*-dec-linux*</a></h3>
962@end html
963
964We strongly recommend to upgrade to binutils 2.10 (or newer).
965
966The following error:
967@example
968 Error: macro requires $at register while noat in effect
969@end example
970
971indicates that you should upgrade to a newer version of
972the assembler, 2.9 or later. If you can not upgrade the assembler, the
973compiler option "-Wa,-m21164a" may work around this problem.
974
975@html
976</p>
977<hr>
978<h3><a name="alpha*-dec-osf*">alpha*-dec-osf*</a></h3>
979@end html
980
981If you install a shared libstdc++ and, when you link a non-trivial C++
982program (for example, @code{gcc/testsuite/g++.other/delete3.C}),
983the linker reports a couple of errors about multiply-defined symbols
984(for example, @code{nothrow}, @code{__throw} and
985@code{terminate(void)}), you've probably got a linker bug, for
986which there's no known fix. The officially recommended work-around is
987to remove the shared libstdc++.
988
989An alternative solution is to arrange that all symbols from
990@code{libgcc} get copied to the shared @code{libstdc++};
991see detailed solution below. (Surprising as it may seem, this does
992indeed fix the problem!) @emph{Beware} that this may bring you
993binary-compatibility problems in the future, if you don't use the same
994work-around next time you build @code{libstdc++}: if programs
995start to depend on @code{libstdc++} to provide symbols that used
996to be only in @code{libgcc}, you must arrange that
997@code{libstdc++} keeps providing them, otherwise the programs
998will have to be relinked.
999
1000The magic spell is to add @code{-Wl,-all,-lgcc,-none} to the
1001definition of macro @code{SHDEPS} in
1002@code{libstdc++/config/dec-osf.ml} @emph{before}
1003@code{alpha*-dec-osf*/libstdc++/Makefile} is created (a
1004@uref{dec-osf-shlibstdc++.patch,,patch}
1005that does just that is available). If the Makefile already exists, run
1006@code{./config.status} within directory
1007@code{alpha*-dec-osf*/libstdc++} (and
1008@code{alpha*-dec-osf*/ieee/libstdc++}, if it also exists).
1009Remove any existing @code{libstdc++.so*} from such directories,
1010and run @code{make all-target-libstdc++} in the top-level
1011directory, then @code{make install-target-libstdc++}.
1012
1013If you have already removed the build tree, you may just remove
1014@code{libstdc++.so.2.10.0} from the install tree and re-create
1015it with the command
1016@code{gcc -shared -o libstdc++.so.2.10.0 -Wl,-all,-lstdc++,-lgcc,-none -lm}.
1017If the @code{ieee}
1018sub-directory exists, repeat this command in it, with the additional
1019flag @code{-mieee}.
1020
1021@html
1022</p>
1023<hr>
1024<h3><a name="avr">avr</a></h3>
1025@end html
1026
1027Use `@command{configure} @option{--target=avr}
1028@option{--enable-languages="c"}' to configure GCC.
1029
1030Further installation notes and other useful information about AVR tools
1031can also be obtained from:
1032
1033@itemize @bullet
1034@item
1035@uref{http://home.overta.ru/users/denisc,,http://home.overta.ru/users/denisc}
1036@item
1037@uref{http://www.itnet.pl/amelektr/avr,,http://www.itnet.pl/amelektr/avr}
1038@end itemize
1039
1040We strongly recommend to upgrade to binutils 2.11
1041(or a current snapshot until 2.11 has been released).
1042
1043The following error:
1044@example
1045 Error: register required
1046@end example
1047
1048indicates that you should upgrade to a newer version of the binutils.
1049
1050@html
1051</p>
1052<hr>
1053<h3><a name="dos">DOS</a></h3>
1054@end html
1055
1056Please have a look at our @uref{binaries.html,,binaries page}.
1057
1058@html
1059</p>
1060<hr>
1061<h3><a name="h8300-hms">h8300-hms</a></h3>
1062@end html
1063
1064Please have a look at our @uref{binaries.html,,binaries page}.
1065
1066@html
1067</p>
1068<hr>
1069<h3><a name="hppa*-hp-hpux*">hppa*-hp-hpux*</a></h3>
1070@end html
1071
1072We @emph{highly} recommend using gas/binutils-2.8 or newer on all hppa
1073platforms; you may encounter a variety of problems when using the HP
1074assembler.
1075
1076Specifically, @option{-g} does not work on HP-UX (since that system
1077uses a peculiar debugging format which GCC does not know about), unless you
1078use GAS and GDB and configure GCC with the @option{--with-gnu-as}
1079option.
1080
1081If you wish to use pa-risc 2.0 architecture support, you must use either
1082the HP assembler or a recent
1083@uref{ftp://sources.redhat.com/pub/binutils/snapshots,,snapshot of gas}.
1084
1085More specific information to hppa*-hp-hpux* targets follows.
1086
1087@html
1088</p>
1089<hr>
1090<h3><a name="hppa*-hp-hpux9">hppa*-hp-hpux9</a></h3>
1091@end html
1092
1093The HP assembler has major problems on this platform. We've tried to work
1094around the worst of the problems. However, those workarounds may be causing
1095linker crashes in some circumstances; the workarounds also probably prevent
1096shared libraries from working. Use the GNU assembler to avoid these problems.
1097
1098
1099The configuration scripts for GCC will also trigger a bug in the hpux9
1100shell. To avoid this problem set CONFIG_SHELL to @file{/bin/ksh} and SHELL
1101to @file{/bin/ksh} in your environment.
1102
1103
1104@html
1105</p>
1106<hr>
1107<h3><a name="hppa*-hp-hpux10">hppa*-hp-hpux10</a></h3>
1108@end html
1109
1110For hpux10.20, we @emph{highly} recommend you pick up the latest sed patch
1111@code{PHCO_19798} from HP. HP has two sites which provide patches free of
1112charge:
1113
1114@itemize @bullet
1115@item
1116@html
1117<a href="http://us-support.external.hp.com">US, Canada, Asia-Pacific, and
1118Latin-America</a>
1119@end html
1120@ifnothtml
1121@uref{http://us-support.external.hp.com,,}US, Canada, Asia-Pacific, and
1122Latin-America
1123@end ifnothtml
1124@item
1125@uref{http://europe-support.external.hp.com,,Europe}
1126@end itemize
1127
1128The HP assembler on these systems is much better than the hpux9 assembler,
1129but still has some problems. Most notably the assembler inserts timestamps
1130into each object file it creates, causing the 3-stage comparison test to fail
1131during a `@code{make bootstrap}'. You should be able to continue by
1132saying `@code{make all}' after getting the failure from `@code{make
1133bootstrap}'.
1134
1135
1136@html
1137</p>
1138<hr>
1139<h3><a name="hppa*-hp-hpux11">hppa*-hp-hpux11</a></h3>
1140@end html
1141
1142GCC 2.95.2 does not support HP-UX 11, and it cannot generate 64-bit
1143object files. Current (as of late 2000) snapshots and GCC 3.0 do support
1144HP-UX 11.
1145
1146
1147@html
1148</p>
1149<hr>
1150<h3><a name="*-*-linux-gnu">*-*-linux-gnu</a></h3>
1151@end html
1152
1153If you use glibc 2.2 (or 2.1.9x), GCC 2.95.2 won't install
1154out-of-the-box. You'll get compile errors while building libstdc++.
1155The patch @uref{glibc-2.2.patch,,glibc-2.2.patch}, that is to be
1156applied in the GCC source tree, fixes the compatibility problems.
1157
1158@html
1159</p>
1160<hr>
1161<h3><a name="ix86-*-linux*">i?86-*-linux*</a></h3>
1162@end html
1163
1164You will need binutils-2.9.1.0.15 or newer for exception handling to work.
1165
1166If you receive Signal 11 errors when building on GNU/Linux, then it is
1167possible you have a hardware problem. Further information on this can be
1168found on @uref{http://www.bitwizard.nl/sig11/,,www.bitwizard.nl}.
1169
1170@html
1171</p>
1172<hr>
1173<h3><a name="ix86-*-sco3.2v5*">i?86-*-sco3.2v5*</a></h3>
1174@end html
1175
1176Unlike earlier versions of GCC, the ability to generate COFF with this
1177target is no longer provided.
1178
1179Earlier versions of GCC emitted Dwarf-1 when generating ELF to allow
1180the system debugger to be used. That support was too burdensome to
1181maintain. GCC now emits only dwarf-2 for this target. This means you
1182may use either the UDK debugger or GDB to debug programs built by this
1183version of GCC.
1184
1185If you are building languages other than C, you must follow the instructions
1186about invoking `@code{make bootstrap}' because the native OpenServer
1187compiler will build a @code{cc1plus} that will not correctly parse many
1188valid C++ programs including those in @code{libgcc.a}.
1189@strong{You must do a `@code{make bootstrap}' if you are building with the
1190native compiler.}
1191
1192Use of the `@option{-march-pentiumpro}' flag can result in
1193unrecognized opcodes when using the native assembler on OS versions before
11945.0.6. (Support for P6 opcodes was added to the native ELF assembler in
1195that version.) While it's rather rare to see these emitted by GCC yet,
1196errors of the basic form:
1197
1198@example
1199 /usr/tmp/ccaNlqBc.s:22:unknown instruction: fcomip
1200 /usr/tmp/ccaNlqBc.s:50:unknown instruction: fucomip
1201@end example
1202
1203are symptoms of this problem. You may work around this by not
1204building affected files with that flag, by using the GNU assembler, or
1205by using the assembler provided with the current version of the OS.
1206Users of GNU assembler should see the note below for hazards on doing
1207so.
1208
1209The native SCO assembler that is provided with the OS at no
1210charge is normally required. If, however, you must be able to use
1211the GNU assembler (perhaps you're compiling code with asms that
1212require GAS syntax) you may configure this package using the flags
1213@option{--with-gnu-as}. You must use a recent version of GNU
1214binutils; versions past 2.9.1 seem to work well.
1215
1216In general, the @option{--with-gnu-as} option isn't as well tested
1217as the native assembler.
1218
1219Look in @file{gcc/config/i386/sco5.h} (search for "messy") for
1220additional OpenServer-specific flags.
1221
1222Systems based on OpenServer before 5.0.4 (`@code{uname -X}'
1223will tell you what you're running) require TLS597 from ftp.sco.com/TLS
1224for C++ constructors and destructors to work right.
1225
1226The system linker in (at least) 5.0.4 and 5.0.5 will sometimes
1227do the wrong thing for a construct that GCC will emit for PIC
1228code. This can be seen as execution testsuite failures when using
1229-fPIC on 921215-1.c, 931002-1.c, nestfunc-1.c, and gcov-1.c.
1230For 5.0.5, an updated linker that will cure this problem is
1231available. You must install both
1232@uref{ftp://ftp.sco.com/Supplements/rs505a/,,ftp://ftp.sco.com/Supplements/rs505a/}
1233and @uref{ftp://ftp.sco.com/SLS/,,OSS499A}.
1234
1235The dynamic linker in OpenServer 5.0.5 (earlier versions may show
1236the same problem) aborts on certain g77-compiled programs. It's particularly
1237likely to be triggered by building Fortran code with the @option{-fPIC} flag.
1238Although it's conceivable that the error could be triggered by other
1239code, only G77-compiled code has been observed to cause this abort.
1240If you are getting core dumps immediately upon execution of your
1241g77 program - and especially if it's compiled with -fPIC - try applying
1242@uref{sco_osr5_g77.patch,,@code{`sco_osr5_g77.patch'}} to your libf2c and
1243rebuilding GCC.
1244Affected faults, when analyzed in a debugger, will show a stack
1245backtrace with a fault occurring in @code{rtld()} and the program
1246running as @code{/usr/lib/ld.so.1}. This problem has been reported to SCO
1247engineering and will hopefully be addressed in later releases.
1248
1249
1250@html
1251</p>
1252<hr>
1253<h3><a name="ix86-*-solaris*">i?86-*-solaris*</a></h3>
1254@end html
1255
1256GCC 2.95.2, when configured to use the GNU assembler, would invoke
1257it with the @code{-s} switch, that GNU as up to 2.9.5.0.12 does
1258not support. If you'd rather not use a newer GNU as nor the native
1259assembler, you'll need the patch
1260@uref{x86-sol2-gas.patch,,@code{`x86-sol2-gas.patch'}}.
1261
1262
1263@html
1264</p>
1265<hr>
1266<h3><a name="ix86-*-udk">i?86-*-udk</a></h3>
1267@end html
1268
1269This target emulates the SCO Universal Development Kit and requires that
1270package be installed. (If it is installed, you will have a
1271@file{/udk/usr/ccs/bin/cc } file present.) It's very much like the
1272@code{i?86-*-unixware7*} target
1273but is meant to be used when hosting on a system where UDK isn't the
1274default compiler such as OpenServer 5 or Unixware 2. This target will
1275generate binaries that will run on OpenServer, Unixware 2, or Unixware 7,
1276with the same warnings and caveats as the SCO UDK.
1277
1278You can stage1 with either your native compiler or with UDK. If you
1279don't do a full bootstrap when initially building with your native compiler
1280you will have an utterly unusable pile of bits as your reward.
1281
1282This target is a little tricky to build because we have to distinguish
1283it from the native tools (so it gets headers, startups, and libraries
1284from the right place) while making the tools not think we're actually
1285building a cross compiler. The easiest way to do this is with a configure
1286command like this:
1287
1288@command{ CC=/udk/usr/ccs/bin/cc <i>/your/path/to/</i>gcc/configure
1289--host=i686-pc-udk --target=i686-pc-udk --program-prefix=udk-}
1290
1291@emph{You should substitute 'i686' in the above command with the appropriate
1292processor for your host.}
1293
1294You should follow this with a `@command{make bootstrap}' then
1295`@command{make install}'. You can then access the UDK-targeted GCC
1296tools by adding @code{udk-} before the commonly known name. For example, to
1297invoke the C compiler, you would use `@code{udk-gcc}'. They will coexist
1298peacefully with any native-target GCC tools you may have installed.
1299
1300
1301@html
1302</p>
1303<hr>
1304<h3><a name="*-ibm-aix*">*-ibm-aix*</a></h3>
1305<!-- rs6000-ibm-aix*, powerpc-ibm-aix* -->
1306@end html
1307
1308AIX Make frequently has problems with GCC makefiles. GNU Make 3.76 or
1309newer is recommended to build on this platform.
1310
1311Errors involving "alloca" when building GCC generally are due
1312to an incorrect definition of @command{CC} in the Makefile or mixing files
1313compiled with the native C compiler and GCC. During the stage1 phase of
1314the build, the native AIX compiler @strong{must} be invoked as "cc"
1315(not "xlc"). Once @command{configure} has been informed of
1316"xlc", one needs to use "make distclean" to remove the
1317configure cache files and ensure that @command{$CC} environment variable
1318does not provide a definition that will confuse @command{configure}.
1319If this error occurs during stage2 or later, then the problem most likely
1320is the version of Make (see above).
1321
1322Some versions of the AIX binder (linker) can fail with a relocation
1323overflow severe error when the @option{-bbigtoc} option is used to link
1324GCC-produced object files into an executable that overflows the TOC. A fix
1325for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND -BBIGTOC) is
1326available from IBM Customer Support and from its
1327@uref{http://service.boulder.ibm.com/,,service.boulder.ibm.com}
1328website as PTF U455193.
1329
1330Binutils does not support AIX 4.3 (at least through release 2.9).
1331GNU as and GNU ld will not work properly and one should not configure GCC
1332to use those GNU utilities. Use the native AIX tools which do interoperate
1333with GCC.
1334
1335AIX 4.3 utilizes a new "large format" archive to support both
133632-bit and 64-bit object modules. The routines provided in AIX 4.3.0 and
1337AIX 4.3.1 to parse archive libraries did not handle the new format correctly.
1338These routines are used by GCC and result in error messages during linking
1339such as "not a COFF file". The version of the routines shipped
1340with AIX 4.3.1 should work for a 32-bit environment. The @option{-g} option
1341of the archive command may be used to create archives of 32-bit objects
1342using the original "small format". A correct version of the routines is
1343shipped with AIX 4.3.2.
1344
1345The initial assembler shipped with AIX 4.3.0 generates incorrect object
1346files. A fix for APAR IX74254 (64BIT DISASSEMBLED OUTPUT FROM COMPILER FAILS
1347TO ASSEMBLE/BIND) is available from IBM Customer Support and from its
1348@uref{http://service.boulder.ibm.com/,,service.boulder.ibm.com}
1349website as PTF U453956. This fix is incorporated in AIX 4.3.1 and above.
1350
1351The AIX 4.3.2.1 linker (bos.rte.bind_cmds Level 4.3.2.1) will dump core
1352with a segmentation fault when invoked by any version of GCC. A fix for
1353APAR IX87327 is available from IBM Customer Support and from its
1354@uref{http://service.boulder.ibm.com/,,service.boulder.ibm.com}
1355website as PTF U461879. This fix is incorporated in AIX 4.3.3 and above.
1356
1357
1358@html
1359</p>
1360<hr>
1361<h3><a name="m68k-*-nextstep*">m68k-*-nextstep*</a></h3>
1362@end html
1363
1364You absolutely @strong{must} use GNU sed and GNU make on this platform.
1365
1366
1367On NEXTSTEP 3.x where x < 3 the build of GCC will abort during
1368stage1 with an error message like this:
1369
1370@example
1371 _eh
1372 /usr/tmp/ccbbsZ0U.s:987:Unknown pseudo-op: .section
1373 /usr/tmp/ccbbsZ0U.s:987:Rest of line ignored. 1st junk character
1374 valued 95 (_).
1375@end example
1376
1377The reason for this is the fact that NeXT's assembler for these
1378versions of the operating system does not support the .section
1379pseudo op that's needed for full C++ exception functionality.
1380
1381As NeXT's assembler is a derived work from GNU as, a free
1382replacement that does can be obtained at
1383@uref{ftp://ftp.next.peak.org:/next-ftp/next/apps/devtools/as.3.3.NIHS.s.tar.gz,,ftp://ftp.next.peak.org:/next-ftp/next/apps/devtools/as.3.3.NIHS.s.tar.gz}.
1384
1385If you try to build the integrated C++ & C++ runtime libraries on this system
1386you will run into trouble with include files. The way to get around this is
1387to use the following sequence. Note you must have write permission to
1388the directory @emph{prefix} you specified in the configuration process of GCC
1389for this sequence to work.
1390
1391@example
1392 cd bld-gcc
1393 make all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1394 cd gcc
1395 make bootstrap
1396 make install-headers-tar
1397 cd ..
1398 make bootstrap3
1399@end example
1400
1401
1402@html
1403</p>
1404<hr>
1405<h3><a name="m68k-sun-sunos4.1.1">m68k-sun-sunos4.1.1</a></h3>
1406@end html
1407
1408It is reported that you may need the GNU assembler on this platform.
1409
1410
1411@html
1412</p>
1413<hr>
1414<h3><a name="mips*-sgi-irix[45]">mips*-sgi-irix[45]</a></h3>
1415@end html
1416
1417You must use GAS on these platforms, as the native assembler can not handle
1418the code for exception handling support. Either of these messages indicates
1419that you are using the MIPS assembler when instead you should be using GAS:
1420
1421@samp{ as0: Error: ./libgcc2.c, line 1:Badly delimited numeric literal
1422 .4byte $LECIE1-$LSCIE1
1423 as0: Error: ./libgcc2.c, line 1:malformed statement}
1424
1425or:
1426
1427@samp{ as0: Error: /src/bld-gcc/gcc/libgcc2.c, line 1:undefined symbol in expression
1428 .word $LECIE1-$LSCIE1}
1429
1430These systems don't have ranlib, which various components in GCC need; you
1431should be able to avoid this problem by installing GNU binutils, which includes
1432a functional ranlib for this system.
1433
1434You may get the following warning on irix4 platforms, it can be safely
1435ignored.
1436@example
1437 warning: foo.o does not have gp tables for all its sections.
1438@end example
1439
1440When building GCC, the build process loops rebuilding cc1 over and
1441over again. This happens on mips-sgi-irix5.2, and possibly other platforms.@*
1442It has been reported that this is a known bug in the make shipped with
1443IRIX 5.2. We recommend you use GNU make instead of the vendor supplied
1444make program; however, you may have success with "smake" on IRIX 5.2 if
1445you do not have GNU make available.
1446
1447See @uref{http://reality.sgi.com/ariel/freeware/,,http://reality.sgi.com/ariel/freeware} for more information about
1448using GCC on IRIX platforms.
1449
1450
1451@html
1452</p>
1453<hr>
1454<h3><a name="mips*-sgi-irix6">mips*-sgi-irix6</a></h3>
1455@end html
1456
1457You must @emph{not} use GAS on irix6 platforms; doing so will only
1458cause problems.
1459
1460These systems don't have ranlib, which various components in GCC need; you
1461should be able to avoid this problem by making a dummy script called ranlib
1462which just exits with zero status and placing it in your path.
1463
1464If you are using Irix cc as your bootstrap compiler, you must
1465ensure that the N32 ABI is in use. To test this, compile a simple C
1466file with @command{cc} and then run @command{file} on the
1467resulting object file. The output should look like:
1468
1469@example
1470@code{ test.o: ELF N32 MSB ...}
1471@end example
1472
1473If you see:
1474@example
1475@code{ test.o: ELF 32-bit MSB}
1476@end example
1477
1478then your version of @command{cc} uses the O32 ABI default. You
1479should set the environment variable @command{CC} to 'cc -n32'
1480before configuring GCC.
1481
1482GCC does not currently support generating O32 ABI binaries in the
1483mips-sgi-irix6 configurations. It used to be possible to create a GCC
1484with O32 ABI only support by configuring it for the mips-sgi-irix5
1485target. See the link below for details.
1486
1487GCC does not correctly pass/return structures which are
1488smaller than 16 bytes and which are not 8 bytes. The problem is very
1489involved and difficult to fix. It affects a number of other targets also,
1490but IRIX 6 is affected the most, because it is a 64 bit target, and 4 byte
1491structures are common. The exact problem is that structures are being padded
1492at the wrong end, e.g. a 4 byte structure is loaded into the lower 4 bytes
1493of the register when it should be loaded into the upper 4 bytes of the
1494register.
1495
1496GCC is consistent with itself, but not consistent with the SGI C compiler
1497(and the SGI supplied runtime libraries), so the only failures that can
1498happen are when there are library functions that take/return such
1499structures. There are very few such library functions. I can only recall
1500seeing two of them: inet_ntoa, and semctl.
1501
1502See @uref{http://reality.sgi.com/ariel/freeware/,,http://reality.sgi.com/ariel/freeware} for more information about
1503using GCC on IRIX platforms.
1504
1505
1506@html
1507</p>
1508<hr>
1509<h3><a name="powerpc-*-linux-gnu*">powerpc-*-linux-gnu*</a></h3>
1510@end html
1511
1512You will need
1513@uref{ftp://ftp.varesearch.com/pub/support/hjl/binutils,,binutils-2.9.4.0.8}
1514or newer for a working GCC. It is strongly recommended to recompile binutils
1515if you initially built it with gcc-2.7.2.x.
1516
1517
1518@html
1519</p>
1520<hr>
1521<h3><a name="*-*-solaris*">*-*-solaris*</a></h3>
1522@end html
1523
1524Starting with Solaris, Sun does not ship a C compiler any more. To
1525bootstrap and install GCC you first have to install a pre-built
1526compiler, see our @uref{binaries.html,,binaries page} for
1527details.
1528
1529Sun as 4.X is broken in that it cannot cope with long symbol names.
1530A typical error message might look similar to the following:
1531
1532@samp{/usr/ccs/bin/as: "/var/tmp/ccMsw135.s", line 11041:
1533error: can't compute value of an expression involving an external symbol.}
1534
1535This is Sun bug 4237974. See the @uref{../faq.html#squangle,,How to work around too long C++
1536symbol names?} FAQ entry for further information and a workaround. This is fixed with patch
1537108908-02 and has been fixed in later (5.x) versions of the assembler.
1538
1539Sun make in all known Solaris 1 (SunOS 4) and Solaris 2 releases has a
1540broken @emph{VPATH} mechanism, which means you must either:
1541@itemize @bullet
1542@item
1543Use GNU make (recommended), @emph{or:}
1544@item
1545Always build in the source directory, @emph{or:}
1546@item
1547@emph{(For GCC 2.95.1 only)}
1548apply the patches mentioned at
1549@uref{http://www.gnu.org/software/gcc/extensions.html#sun-make,,
1550http://www.gnu.org/software/gcc/extensions.html#sun-make}.
1551@end itemize
1552
1553
1554@html
1555<p>
1556<hr>
1557<h3><a name="sparc-sun-solaris*">sparc-sun-solaris*</a></h3>
1558@end html
1559
1560binutils 2.9.1 has known bugs on this platform. We recommend to use
1561binutils 2.10 or the vendor tools (Sun as, Sun ld).
1562
1563Unfortunately, C++ shared libraries, including libstdc++, won't work
1564properly if assembled with Sun as: the linker will complain about
1565relocations in read-only sections, in the definition of virtual
1566tables. Also, Sun as fails to process long symbols resulting from
1567mangling template-heavy C++ function names.
1568
1569
1570@html
1571</p>
1572<hr>
1573<h3><a name="sparc-sun-solaris2.7">sparc-sun-solaris2.7</a></h3>
1574@end html
1575
1576Sun patch 107058-01 (1999-01-13) for SPARC Solaris 7 triggers a bug in
1577the dynamic linker. This problem (Sun bug 4210064) affects GCC 2.8
1578and later, including all EGCS releases. Sun formerly recommended
1579107058-01 for all Solaris 7 users, but around 1999-09-01 it started to
1580recommend it only for people who use Sun's compilers.
1581
1582Here are some workarounds to this problem:
1583@itemize @bullet
1584@item
1585Do not install Sun patch 107058-01 until after Sun releases a
1586complete patch for bug 4210064. This is the simplest course to take,
1587unless you must also use Sun's C compiler. Unfortunately 107058-01
1588is preinstalled on some new Solaris-based hosts, so you may have to
1589back it out.
1590
1591@item
1592Copy the original, unpatched Solaris 7
1593@command{/usr/ccs/bin/as} into
1594@command{/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/as},
1595adjusting the latter name to fit your local conventions and software
1596version numbers.
1597
1598@item
1599Install Sun patch 106950-03 (1999-05-25) or later. Nobody with
1600both 107058-01 and 106950-03 installed has reported the bug with GCC
1601and Sun's dynamic linker. This last course of action is riskiest,
1602for two reasons. First, you must install 106950 on all hosts that
1603run code generated by GCC; it doesn't suffice to install it only on
1604the hosts that run GCC itself. Second, Sun says that 106950-03 is
1605only a partial fix for bug 4210064, but Sun doesn't know whether the
1606partial fix is adequate for GCC. Revision -08 or later should fix
1607the bug, but (as of 1999-10-06) it is still being tested.
1608@end itemize
1609
1610
1611@html
1612<p>
1613<hr>
1614<h3><a name="*-sun-solaris2.8">*-sun-solaris2.8</a></h3>
1615<!-- ripped from the same FAQ that I answered -->
1616@end html
1617
1618Sun bug 4296832 turns up when compiling X11 headers with GCC 2.95 or
1619newer: g++ will complain that types are missing. These headers assume
1620that omitting the type means 'int'; this assumption worked for C89 but
1621is wrong for C++, and is now wrong for C99 also.
1622
1623g++ accepts such (illegal) constructs with the option @option{-fpermissive}; it
1624will assume that any missing type is 'int' (as defined by C89).
1625
1626For Solaris 8, t<h3><a name="older"></a>Older systems</h3>\r
1627\r
1628<p>GCC contains support files for many older (1980s and early\r
16291990s) Unix variants. For the most part, support for these systems\r
1630has not been deliberately removed, but it has not been maintained for\r
1631several years and may suffer from bitrot. Support from some systems\r
1632has been removed from GCC 3: fx80, ns32-ns-genix, pyramid, tahoe,\r
1633gmicro, spur; most of these targets had not been updated since GCC\r
1634version 1.</p>\r
1635\r
1636<p>Support for older systems as targets for cross-compilation is less\r
1637problematic than support for them as hosts for GCC; if an\r
1638enthusiast wishes to make such a target work again\r
1639(including resurrecting any of the targets that never worked with GCC\r
16402, starting from the last CVS version before they were removed),\r
1641patches <a href="../contribute.html">following the usual\r
1642requirements</a> would be likely to be accepted, since they should not\r
1643affect the support for more modern targets.</p>\r
1644\r
1645<p>Support for old systems as hosts for GCC can cause problems if the\r
1646workarounds for compiler, library and operating system bugs affect the\r
1647cleanliness or maintainability of the rest of GCC. In some cases, to\r
1648bring GCC up on such a system, if still possible with current GCC, may\r
1649require first installing an old version of GCC which did work on that\r
1650system, and using it to compile a more recent GCC, to avoid bugs in\r
1651the vendor compiler. Old releases of GCC 1 and GCC 2 are available in\r
1652the old-releases directory on the <a href="../mirrors.html">GCC mirror\r
1653sites</a>. Header bugs may generally be avoided using\r
1654<code>fixincludes</code>, but bugs or deficiencies in libraries and\r
1655the operating system may still cause problems.</p>\r
1656\r
1657<p>For some systems, old versions of GNU binutils may also be useful,\r
1658and are available from pub/binutils/old-releases on <a\r
1659href="http://sources.redhat.com/mirrors.html">sources.redhat.com\r
1660mirror sites</a>.</p>\r
1661\r
1662<p>Some of the information on specific systems above relates to\r
1663such older systems, but much of the information\r
1664about GCC on such systems (which may no longer be applicable to\r
1665current GCC) is to be found in the GCC texinfo manual.</p>\r
1666\r
1667<hr>\r
1668his is fixed by revision 24 or later of patch 108652
1669(for SPARCs) or 108653 (for Intels).
1670
1671
1672@html
1673<p>
1674<hr>
1675<h3><a name="sunv5">Sun V5.0 Compiler Bugs</a></h3>
1676@end html
1677
1678The Sun V5.0 compilers are known to mis-compile GCC 2.95 and GCC 2.95.1,
1679which in turn causes GCC to fail its bootstrap comparison test.
1680GCC 2.95.2 has a workaround.
1681
1682
1683@html
1684</p>
1685<hr>
1686<h3><a name="sparc-sun-sunos*">sparc-sun-sunos*</a></h3>
1687@end html
1688
1689A bug in the SunOS4 linker will cause it to crash when linking
1690-fPIC compiled objects (and will therefore not allow you to build
1691shared libraries).
1692
1693To fix this problem you can either use the most recent version of
1694binutils or get the latest SunOS4 linker patch (patch ID 100170-10)
1695from Sun's patch site.
1696
1697
1698@html
1699</p>
1700<hr>
1701<h3><a name="sparc-unknown-linux-gnulibc1">sparc-unknown-linux-gnulibc1</a></h3>
1702@end html
1703
1704It has been reported that you might need
1705@uref{ftp://ftp.yggdrasil.com/private/hjl,,binutils-2.8.1.0.23}
1706for this platform, too.
1707
1708
1709@html
1710</p>
1711<hr>
1712<h3><a name="sparc64-*-*">sparc64-*-*</a></h3>
1713@end html
1714
1715GCC version 2.95 is not able to compile code correctly for
1716@code{sparc64} targets. Users of the Linux kernel, at least,
171712~can use the @code{sparc32} program to start up a new shell
1718invocation with an environment that causes @command{configure} to
1719recognize (via @command{uname -a}) the system as @command{sparc-*-*} instead.
1720
1721
1722@html
1723</p>
1724<hr>
1725<h3><a name="windows"></a>Microsoft Windows (32 bit)</h3>
1726@end html
1727
1728A port of GCC 2.95.x is included with the
1729@uref{http://www.cygwin.com/,,Cygwin environment}.
1730
1731Current (as of early 2001) snapshots of GCC will build under Cygwin
1732without modification.
1733
1734@html
1735</p>
1736<hr>
1737<h3><a name="os2"></a>OS/2</h3>
1738@end html
1739
1740GCC does not currently support OS/2. However, Andrew Zabolotny has been
1741working on a generic OS/2 port with pgcc. The current code code can be found
1742at @uref{http://www.goof.com/pcg/os2/,,http://www.goof.com/pcg/os2/}.
1743
1744An older copy of GCC 2.8.1 is included with the EMX tools available at
1745@uref{ftp://ftp.leo.org/pub/comp/os/os2/leo/devtools/emx+gcc/,,
1746ftp://ftp.leo.org/pub/comp/os/os2/leo/devtools/emx+gcc/}.
1747
1748@html
1749</p>
1750<hr>
1751<h3><a name="older"></a>Older systems</h3>
1752@end html
1753
1754GCC contains support files for many older (1980s and early
17551990s) Unix variants. For the most part, support for these systems
1756has not been deliberately removed, but it has not been maintained for
1757several years and may suffer from bitrot. Support from some systems
1758has been removed from GCC 3: fx80, ns32-ns-genix, pyramid, tahoe,
1759gmicro, spur; most of these targets had not been updated since GCC
1760version 1.
1761
1762Support for older systems as targets for cross-compilation is less
1763problematic than support for them as hosts for GCC; if an enthusiast
1764wishes to make such a target work again (including resurrecting any
1765of the targets that never worked with GCC 2, starting from the last
1766CVS version before they were removed), patches
1767@uref{../contribute.html,,following the usual requirements}
1768would be likely to be accepted, since they should not affect the
1769support for more modern targets.
1770
1771Support for old systems as hosts for GCC can cause problems if the
1772workarounds for compiler, library and operating system bugs affect the
1773cleanliness or maintainability of the rest of GCC. In some cases, to
1774bring GCC up on such a system, if still possible with current GCC, may
1775require first installing an old version of GCC which did work on that
1776system, and using it to compile a more recent GCC, to avoid bugs in
1777the vendor compiler. Old releases of GCC 1 and GCC 2 are available in
1778the old-releases directory on the
1779@uref{../mirrors.html,,GCC mirror sites}. Header bugs may generally
1780be avoided using @code{fixincludes}, but bugs or deficiencies in libraries and
1781the operating system may still cause problems.
1782
1783For some systems, old versions of GNU binutils may also be useful,
1784and are available from pub/binutils/old-releases on
1785@uref{http://sources.redhat.com/mirrors.html,,sources.redhat.com mirror sites}.
1786
1787Some of the information on specific systems above relates to
1788such older systems, but much of the information
1789about GCC on such systems (which may no longer be applicable to
1790current GCC) is to be found in the GCC texinfo manual.
1791
1792@html
1793</p>
1794<hr>
1795<h3><a name="elf_targets">all ELF targets (SVR4, Solaris, etc.)</a></h3>
1796@end html
1797
1798C++ support is significantly better on ELF targets if you use the GNU
1799linker; duplicate copies of inlines, vtables and template instantiations
1800will be discarded automatically.
1801
1802
1803@html
1804</p>
1805<hr>
1806<p>
1807@end html
1808@ifhtml
1809@uref{./index.html,,Return to the GCC Installation page}
1810@end ifhtml
1811@end ifset
1812
1813@c ***************************************************************************
1814@c Part 6 The End of the Document
1815@ifinfo
1816@comment node-name, next, previous, up
1817@node Concept Index, , Specific, Top
1818@end ifinfo
1819
1820@ifinfo
1821@unnumbered Concept Index
1822
1823@printindex cp
1824
1825@contents
1826@end ifinfo
1827@bye