]> gcc.gnu.org Git - gcc.git/blame - gcc/install.texi
* Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
[gcc.git] / gcc / install.texi
CommitLineData
c85f7c16 1@c Copyright (C) 1988,89,92,93,94,95,96,97,1998 Free Software Foundation, Inc.
2284f91b
DE
2@c This is part of the GCC manual.
3@c For copying conditions, see the file gcc.texi.
4
5@c The text of this file appears in the file INSTALL
6@c in the GCC distribution, as well as in the GCC manual.
7
f2d76545
JL
8Note most of this information is out of date and superceded by the EGCS
9install procedures. It is provided for historical reference only.
10
2284f91b
DE
11@ifclear INSTALLONLY
12@node Installation
13@chapter Installing GNU CC
14@end ifclear
15@cindex installing GNU CC
16
17@menu
18* Configurations:: Configurations Supported by GNU CC.
19* Other Dir:: Compiling in a separate directory (not where the source is).
20* Cross-Compiler:: Building and installing a cross-compiler.
21* Sun Install:: See below for installation on the Sun.
22* VMS Install:: See below for installation on VMS.
23* Collect2:: How @code{collect2} works; how it finds @code{ld}.
24* Header Dirs:: Understanding the standard header file directories.
25@end menu
26
27Here is the procedure for installing GNU CC on a Unix system. See
28@ref{VMS Install}, for VMS systems. In this section we assume you
29compile in the same directory that contains the source files; see
30@ref{Other Dir}, to find out how to compile in a separate directory on Unix
31systems.
32
33You cannot install GNU C by itself on MSDOS; it will not compile under
34any MSDOS compiler except itself. You need to get the complete
35compilation package DJGPP, which includes binaries as well as sources,
36and includes all the necessary compilation tools and libraries.
37
38@enumerate
39@item
40If you have built GNU CC previously in the same directory for a
41different target machine, do @samp{make distclean} to delete all files
42that might be invalid. One of the files this deletes is
43@file{Makefile}; if @samp{make distclean} complains that @file{Makefile}
44does not exist, it probably means that the directory is already suitably
45clean.
46
47@item
48On a System V release 4 system, make sure @file{/usr/bin} precedes
49@file{/usr/ucb} in @code{PATH}. The @code{cc} command in
50@file{/usr/ucb} uses libraries which have bugs.
51
52@item
53Specify the host, build and target machine configurations. You do this
54by running the file @file{configure}.
55
56The @dfn{build} machine is the system which you are using, the
57@dfn{host} machine is the system where you want to run the resulting
58compiler (normally the build machine), and the @dfn{target} machine is
59the system for which you want the compiler to generate code.
60
61If you are building a compiler to produce code for the machine it runs
62on (a native compiler), you normally do not need to specify any operands
63to @file{configure}; it will try to guess the type of machine you are on
64and use that as the build, host and target machines. So you don't need
65to specify a configuration when building a native compiler unless
66@file{configure} cannot figure out what your configuration is or guesses
67wrong.
68
69In those cases, specify the build machine's @dfn{configuration name}
e5e809f4
JL
70with the @samp{--host} option; the host and target will default to be
71the same as the host machine. (If you are building a cross-compiler,
2284f91b
DE
72see @ref{Cross-Compiler}.)
73
74Here is an example:
75
76@smallexample
77./configure --build=sparc-sun-sunos4.1
78@end smallexample
79
80A configuration name may be canonical or it may be more or less
81abbreviated.
82
83A canonical configuration name has three parts, separated by dashes.
84It looks like this: @samp{@var{cpu}-@var{company}-@var{system}}.
85(The three parts may themselves contain dashes; @file{configure}
86can figure out which dashes serve which purpose.) For example,
87@samp{m68k-sun-sunos4.1} specifies a Sun 3.
88
89You can also replace parts of the configuration by nicknames or aliases.
90For example, @samp{sun3} stands for @samp{m68k-sun}, so
91@samp{sun3-sunos4.1} is another way to specify a Sun 3. You can also
92use simply @samp{sun3-sunos}, since the version of SunOS is assumed by
93default to be version 4.
94
95You can specify a version number after any of the system types, and some
96of the CPU types. In most cases, the version is irrelevant, and will be
97ignored. So you might as well specify the version if you know it.
98
99See @ref{Configurations}, for a list of supported configuration names and
100notes on many of the configurations. You should check the notes in that
101section before proceeding any further with the installation of GNU CC.
102
103There are four additional options you can specify independently to
104describe variant hardware and software configurations. These are
105@samp{--with-gnu-as}, @samp{--with-gnu-ld}, @samp{--with-stabs} and
106@samp{--nfp}.
107
108@table @samp
109@item --with-gnu-as
110If you will use GNU CC with the GNU assembler (GAS), you should declare
111this by using the @samp{--with-gnu-as} option when you run
112@file{configure}.
113
114Using this option does not install GAS. It only modifies the output of
115GNU CC to work with GAS. Building and installing GAS is up to you.
116
117Conversely, if you @emph{do not} wish to use GAS and do not specify
118@samp{--with-gnu-as} when building GNU CC, it is up to you to make sure
119that GAS is not installed. GNU CC searches for a program named
120@code{as} in various directories; if the program it finds is GAS, then
121it runs GAS. If you are not sure where GNU CC finds the assembler it is
122using, try specifying @samp{-v} when you run it.
123
124The systems where it makes a difference whether you use GAS are@*
125@samp{hppa1.0-@var{any}-@var{any}}, @samp{hppa1.1-@var{any}-@var{any}},
126@samp{i386-@var{any}-sysv}, @samp{i386-@var{any}-isc},@*
127@samp{i860-@var{any}-bsd}, @samp{m68k-bull-sysv},@*
128@samp{m68k-hp-hpux}, @samp{m68k-sony-bsd},@*
129@samp{m68k-altos-sysv}, @samp{m68000-hp-hpux},@*
130@samp{m68000-att-sysv}, @samp{@var{any}-lynx-lynxos},
131and @samp{mips-@var{any}}).
132On any other system, @samp{--with-gnu-as} has no effect.
133
134On the systems listed above (except for the HP-PA, for ISC on the
135386, and for @samp{mips-sgi-irix5.*}), if you use GAS, you should also
136use the GNU linker (and specify @samp{--with-gnu-ld}).
137
138@item --with-gnu-ld
139Specify the option @samp{--with-gnu-ld} if you plan to use the GNU
140linker with GNU CC.
141
142This option does not cause the GNU linker to be installed; it just
143modifies the behavior of GNU CC to work with the GNU linker.
ace62b49
JL
144@c Specifically, it inhibits the installation of @code{collect2}, a program
145@c which otherwise serves as a front-end for the system's linker on most
146@c configurations.
2284f91b
DE
147
148@item --with-stabs
149On MIPS based systems and on Alphas, you must specify whether you want
150GNU CC to create the normal ECOFF debugging format, or to use BSD-style
151stabs passed through the ECOFF symbol table. The normal ECOFF debug
152format cannot fully handle languages other than C. BSD stabs format can
153handle other languages, but it only works with the GNU debugger GDB.
154
155Normally, GNU CC uses the ECOFF debugging format by default; if you
156prefer BSD stabs, specify @samp{--with-stabs} when you configure GNU
157CC.
158
159No matter which default you choose when you configure GNU CC, the user
160can use the @samp{-gcoff} and @samp{-gstabs+} options to specify explicitly
161the debug format for a particular compilation.
162
163@samp{--with-stabs} is meaningful on the ISC system on the 386, also, if
164@samp{--with-gas} is used. It selects use of stabs debugging
165information embedded in COFF output. This kind of debugging information
166supports C++ well; ordinary COFF debugging information does not.
167
168@samp{--with-stabs} is also meaningful on 386 systems running SVR4. It
169selects use of stabs debugging information embedded in ELF output. The
170C++ compiler currently (2.6.0) does not support the DWARF debugging
171information normally used on 386 SVR4 platforms; stabs provide a
172workable alternative. This requires gas and gdb, as the normal SVR4
173tools can not generate or interpret stabs.
174
175@item --nfp
176On certain systems, you must specify whether the machine has a floating
177point unit. These systems include @samp{m68k-sun-sunos@var{n}} and
178@samp{m68k-isi-bsd}. On any other system, @samp{--nfp} currently has no
179effect, though perhaps there are other systems where it could usefully
180make a difference.
181
9101297d
DL
182@cindex Haifa scheduler
183@cindex scheduler, experimental
184@item --enable-haifa
04afd9d6 185@itemx --disable-haifa
9101297d
DL
186Use @samp{--enable-haifa} to enable use of an experimental instruction
187scheduler (from IBM Haifa). This may or may not produce better code.
188Some targets on which it is known to be a win enable it by default; use
189@samp{--disable-haifa} to disable it in these cases. @code{configure}
190will print out whether the Haifa scheduler is enabled when it is run.
191
2284f91b
DE
192@cindex Objective C threads
193@cindex threads, Objective C
6d8ccdbb 194@item --enable-threads=@var{type}
861bb6c1
JL
195Certain systems, notably Linux-based GNU systems, can't be relied on to
196supply a threads facility for the Objective C runtime and so will
197default to single-threaded runtime. They may, however, have a library
198threads implementation available, in which case threads can be enabled
199with this option by supplying a suitable @var{type}, probably
200@samp{posix}. The possibilities for @var{type} are @samp{single},
201@samp{posix}, @samp{win32}, @samp{solaris}, @samp{irix} and @samp{mach}.
2284f91b
DE
202@end table
203
204The @file{configure} script searches subdirectories of the source
205directory for other compilers that are to be integrated into GNU CC.
206The GNU compiler for C++, called G++ is in a subdirectory named
207@file{cp}. @file{configure} inserts rules into @file{Makefile} to build
208all of those compilers.
209
210Here we spell out what files will be set up by @code{configure}. Normally
211you need not be concerned with these files.
212
213@itemize @bullet
214@item
215@ifset INTERNALS
216A file named @file{config.h} is created that contains a @samp{#include}
217of the top-level config file for the machine you will run the compiler
218on (@pxref{Config}). This file is responsible for defining information
219about the host machine. It includes @file{tm.h}.
220@end ifset
221@ifclear INTERNALS
222A file named @file{config.h} is created that contains a @samp{#include}
223of the top-level config file for the machine you will run the compiler
224on (@pxref{Config,,The Configuration File, gcc.info, Using and Porting
225GCC}). This file is responsible for defining information about the host
226machine. It includes @file{tm.h}.
227@end ifclear
228
229The top-level config file is located in the subdirectory @file{config}.
230Its name is always @file{xm-@var{something}.h}; usually
231@file{xm-@var{machine}.h}, but there are some exceptions.
232
233If your system does not support symbolic links, you might want to
234set up @file{config.h} to contain a @samp{#include} command which
235refers to the appropriate file.
236
237@item
238A file named @file{tconfig.h} is created which includes the top-level config
239file for your target machine. This is used for compiling certain
240programs to run on that machine.
241
242@item
243A file named @file{tm.h} is created which includes the
244machine-description macro file for your target machine. It should be in
245the subdirectory @file{config} and its name is often
246@file{@var{machine}.h}.
247
248@item
249The command file @file{configure} also constructs the file
250@file{Makefile} by adding some text to the template file
251@file{Makefile.in}. The additional text comes from files in the
252@file{config} directory, named @file{t-@var{target}} and
253@file{x-@var{host}}. If these files do not exist, it means nothing
254needs to be added for a given target or host.
255@end itemize
256
257@item
258The standard directory for installing GNU CC is @file{/usr/local/lib}.
259If you want to install its files somewhere else, specify
260@samp{--prefix=@var{dir}} when you run @file{configure}. Here @var{dir}
261is a directory name to use instead of @file{/usr/local} for all purposes
262with one exception: the directory @file{/usr/local/include} is searched
263for header files no matter where you install the compiler. To override
e5e809f4
JL
264this name, use the @code{--with-local-prefix} option below. The directory
265you specify need not exist, but its parent directory must exist.
2284f91b
DE
266
267@item
e5e809f4 268Specify @samp{--with-local-prefix=@var{dir}} if you want the compiler to
2284f91b
DE
269search directory @file{@var{dir}/include} for locally installed header
270files @emph{instead} of @file{/usr/local/include}.
271
e5e809f4 272You should specify @samp{--with-local-prefix} @strong{only} if your site has
2284f91b
DE
273a different convention (not @file{/usr/local}) for where to put
274site-specific files.
275
e5e809f4 276The default value for @samp{--with-local-prefix} is @file{/usr/local}
2284f91b
DE
277regardless of the value of @samp{--prefix}. Specifying @samp{--prefix}
278has no effect on which directory GNU CC searches for local header files.
279This may seem counterintuitive, but actually it is logical.
280
281The purpose of @samp{--prefix} is to specify where to @emph{install GNU
282CC}. The local header files in @file{/usr/local/include}---if you put
283any in that directory---are not part of GNU CC. They are part of other
284programs---perhaps many others. (GNU CC installs its own header files
285in another directory which is based on the @samp{--prefix} value.)
286
e5e809f4
JL
287@strong{Do not} specify @file{/usr} as the @samp{--with-local-prefix}! The
288directory you use for @samp{--with-local-prefix} @strong{must not} contain
2284f91b
DE
289any of the system's standard header files. If it did contain them,
290certain programs would be miscompiled (including GNU Emacs, on certain
291targets), because this would override and nullify the header file
292corrections made by the @code{fixincludes} script.
293
294Indications are that people who use this option use it based on
295mistaken ideas of what it is for. People use it as if it specified
296where to install part of GNU CC. Perhaps they make this assumption
297because installing GNU CC creates the directory.
298
299@cindex Bison parser generator
300@cindex parser generator, Bison
301@item
302Make sure the Bison parser generator is installed. (This is
303unnecessary if the Bison output files @file{c-parse.c} and
304@file{cexp.c} are more recent than @file{c-parse.y} and @file{cexp.y}
305and you do not plan to change the @samp{.y} files.)
306
307Bison versions older than Sept 8, 1988 will produce incorrect output
308for @file{c-parse.c}.
309
310@item
311If you have chosen a configuration for GNU CC which requires other GNU
312tools (such as GAS or the GNU linker) instead of the standard system
313tools, install the required tools in the build directory under the names
314@file{as}, @file{ld} or whatever is appropriate. This will enable the
315compiler to find the proper tools for compilation of the program
316@file{enquire}.
317
318Alternatively, you can do subsequent compilation using a value of the
319@code{PATH} environment variable such that the necessary GNU tools come
320before the standard system tools.
321
322@item
323Build the compiler. Just type @samp{make LANGUAGES=c} in the compiler
324directory.
325
326@samp{LANGUAGES=c} specifies that only the C compiler should be
327compiled. The makefile normally builds compilers for all the supported
328languages; currently, C, C++ and Objective C. However, C is the only
329language that is sure to work when you build with other non-GNU C
330compilers. In addition, building anything but C at this stage is a
331waste of time.
332
333In general, you can specify the languages to build by typing the
334argument @samp{LANGUAGES="@var{list}"}, where @var{list} is one or more
335words from the list @samp{c}, @samp{c++}, and @samp{objective-c}. If
336you have any additional GNU compilers as subdirectories of the GNU CC
337source directory, you may also specify their names in this list.
338
339Ignore any warnings you may see about ``statement not reached'' in
340@file{insn-emit.c}; they are normal. Also, warnings about ``unknown
341escape sequence'' are normal in @file{genopinit.c} and perhaps some
342other files. Likewise, you should ignore warnings about ``constant is
343so large that it is unsigned'' in @file{insn-emit.c} and
344@file{insn-recog.c} and a warning about a comparison always being zero
345in @file{enquire.o}. Any other compilation errors may represent bugs in
346the port to your machine or operating system, and
347@ifclear INSTALLONLY
348should be investigated and reported (@pxref{Bugs}).
349@end ifclear
350@ifset INSTALLONLY
351should be investigated and reported.
352@end ifset
353
354Some commercial compilers fail to compile GNU CC because they have bugs
355or limitations. For example, the Microsoft compiler is said to run out
356of macro space. Some Ultrix compilers run out of expression space; then
357you need to break up the statement where the problem happens.
358
359@item
360If you are building a cross-compiler, stop here. @xref{Cross-Compiler}.
361
362@cindex stage1
363@item
364Move the first-stage object files and executables into a subdirectory
365with this command:
366
367@smallexample
368make stage1
369@end smallexample
370
371The files are moved into a subdirectory named @file{stage1}.
372Once installation is complete, you may wish to delete these files
373with @code{rm -r stage1}.
374
375@item
376If you have chosen a configuration for GNU CC which requires other GNU
377tools (such as GAS or the GNU linker) instead of the standard system
378tools, install the required tools in the @file{stage1} subdirectory
379under the names @file{as}, @file{ld} or whatever is appropriate. This
380will enable the stage 1 compiler to find the proper tools in the
381following stage.
382
383Alternatively, you can do subsequent compilation using a value of the
384@code{PATH} environment variable such that the necessary GNU tools come
385before the standard system tools.
386
387@item
388Recompile the compiler with itself, with this command:
389
390@smallexample
391make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O2"
392@end smallexample
393
394This is called making the stage 2 compiler.
395
396The command shown above builds compilers for all the supported
397languages. If you don't want them all, you can specify the languages to
398build by typing the argument @samp{LANGUAGES="@var{list}"}. @var{list}
399should contain one or more words from the list @samp{c}, @samp{c++},
400@samp{objective-c}, and @samp{proto}. Separate the words with spaces.
401@samp{proto} stands for the programs @code{protoize} and
402@code{unprotoize}; they are not a separate language, but you use
403@code{LANGUAGES} to enable or disable their installation.
404
405If you are going to build the stage 3 compiler, then you might want to
406build only the C language in stage 2.
407
408Once you have built the stage 2 compiler, if you are short of disk
409space, you can delete the subdirectory @file{stage1}.
410
411On a 68000 or 68020 system lacking floating point hardware,
412unless you have selected a @file{tm.h} file that expects by default
413that there is no such hardware, do this instead:
414
415@smallexample
416make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O2 -msoft-float"
417@end smallexample
418
419@item
420If you wish to test the compiler by compiling it with itself one more
421time, install any other necessary GNU tools (such as GAS or the GNU
422linker) in the @file{stage2} subdirectory as you did in the
423@file{stage1} subdirectory, then do this:
424
425@smallexample
426make stage2
427make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2"
428@end smallexample
429
430@noindent
431This is called making the stage 3 compiler. Aside from the @samp{-B}
432option, the compiler options should be the same as when you made the
433stage 2 compiler. But the @code{LANGUAGES} option need not be the
434same. The command shown above builds compilers for all the supported
435languages; if you don't want them all, you can specify the languages to
436build by typing the argument @samp{LANGUAGES="@var{list}"}, as described
437above.
438
439If you do not have to install any additional GNU tools, you may use the
440command
441
442@smallexample
443make bootstrap LANGUAGES=@var{language-list} BOOT_CFLAGS=@var{option-list}
444@end smallexample
445
446@noindent
447instead of making @file{stage1}, @file{stage2}, and performing
448the two compiler builds.
449
450@item
451Then compare the latest object files with the stage 2 object
452files---they ought to be identical, aside from time stamps (if any).
453
454On some systems, meaningful comparison of object files is impossible;
455they always appear ``different.'' This is currently true on Solaris and
456some systems that use ELF object file format. On some versions of Irix
457on SGI machines and DEC Unix (OSF/1) on Alpha systems, you will not be
458able to compare the files without specifying @file{-save-temps}; see the
459description of individual systems above to see if you get comparison
460failures. You may have similar problems on other systems.
461
462Use this command to compare the files:
463
464@smallexample
465make compare
466@end smallexample
467
468This will mention any object files that differ between stage 2 and stage
4693. Any difference, no matter how innocuous, indicates that the stage 2
470compiler has compiled GNU CC incorrectly, and is therefore a potentially
471@ifclear INSTALLONLY
472serious bug which you should investigate and report (@pxref{Bugs}).
473@end ifclear
474@ifset INSTALLONLY
475serious bug which you should investigate and report.
476@end ifset
477
478If your system does not put time stamps in the object files, then this
479is a faster way to compare them (using the Bourne shell):
480
481@smallexample
482for file in *.o; do
483cmp $file stage2/$file
484done
485@end smallexample
486
487If you have built the compiler with the @samp{-mno-mips-tfile} option on
488MIPS machines, you will not be able to compare the files.
489
490@item
491Install the compiler driver, the compiler's passes and run-time support
492with @samp{make install}. Use the same value for @code{CC},
493@code{CFLAGS} and @code{LANGUAGES} that you used when compiling the
494files that are being installed. One reason this is necessary is that
495some versions of Make have bugs and recompile files gratuitously when
496you do this step. If you use the same variable values, those files will
497be recompiled properly.
498
499For example, if you have built the stage 2 compiler, you can use the
500following command:
501
502@smallexample
503make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES="@var{list}"
504@end smallexample
505
506@noindent
507This copies the files @file{cc1}, @file{cpp} and @file{libgcc.a} to
508files @file{cc1}, @file{cpp} and @file{libgcc.a} in the directory
509@file{/usr/local/lib/gcc-lib/@var{target}/@var{version}}, which is where
510the compiler driver program looks for them. Here @var{target} is the
e5e809f4
JL
511canonicalized form of target machine type specified when you ran
512@file{configure}, and @var{version} is the version number of GNU CC.
513This naming scheme permits various versions and/or cross-compilers to
514coexist. It also copies the executables for compilers for other
515languages (e.g., @file{cc1plus} for C++) to the same directory.
2284f91b
DE
516
517This also copies the driver program @file{xgcc} into
518@file{/usr/local/bin/gcc}, so that it appears in typical execution
519search paths. It also copies @file{gcc.1} into
520@file{/usr/local/man/man1} and info pages into @file{/usr/local/info}.
521
522On some systems, this command causes recompilation of some files. This
523is usually due to bugs in @code{make}. You should either ignore this
524problem, or use GNU Make.
525
526@cindex @code{alloca} and SunOS
527@strong{Warning: there is a bug in @code{alloca} in the Sun library. To
528avoid this bug, be sure to install the executables of GNU CC that were
529compiled by GNU CC. (That is, the executables from stage 2 or 3, not
530stage 1.) They use @code{alloca} as a built-in function and never the
531one in the library.}
532
533(It is usually better to install GNU CC executables from stage 2 or 3,
534since they usually run faster than the ones compiled with some other
535compiler.)
536
537@item
c85f7c16
JL
538@cindex C++ runtime library
539@cindex @code{libstdc++}
2284f91b 540If you're going to use C++, it's likely that you need to also install
c85f7c16
JL
541a C++ runtime library. Just as GNU C does not
542distribute a C runtime library, it also does not include a C++ runtime
2284f91b 543library. All I/O functionality, special class libraries, etc., are
c85f7c16
JL
544provided by the C++ runtime library.
545
e5e809f4
JL
546The standard C++ runtime library for GNU CC is called @samp{libstdc++}.
547An obsolescent library @samp{libg++} may also be available, but it's
548necessary only for older software that hasn't been converted yet; if
549you don't know whether you need @samp{libg++} then you probably don't
550need it.
551
552Here's one way to build and install @samp{libstdc++} for GNU CC:
c85f7c16
JL
553
554@itemize @bullet
555@item
556Build and install GNU CC, so that invoking @samp{gcc} obtains the GNU CC
557that was just built.
558
559@item
560Obtain a copy of a compatible @samp{libstdc++} distribution. For
561example, the @samp{libstdc++-2.8.0.tar.gz} distribution should be
562compatible with GCC 2.8.0. GCC distributors normally distribute
563@samp{libstdc++} as well.
564
565@item
566Set the @samp{CXX} environment variable to @samp{gcc} while running the
567@samp{libstdc++} distribution's @file{configure} command. Use the same
568@file{configure} options that you used when you invoked GCC's
569@file{configure} command.
570
571@item
572Invoke @samp{make} to build the C++ runtime.
573
574@item
575Invoke @samp{make install} to install the C++ runtime.
576
577@end itemize
578
579To summarize, after building and installing GNU CC, invoke the following
580shell commands in the topmost directory of the C++ library distribution.
581For @var{configure-options}, use the same options that
582you used to configure GNU CC.
583
584@example
585$ CXX=gcc ./configure @var{configure-options}
586$ make
587$ make install
588@end example
2284f91b
DE
589
590@item
591GNU CC includes a runtime library for Objective-C because it is an
592integral part of the language. You can find the files associated with
593the library in the subdirectory @file{objc}. The GNU Objective-C
594Runtime Library requires header files for the target's C library in
595order to be compiled,and also requires the header files for the target's
596thread library if you want thread support. @xref{Cross Headers,
597Cross-Compilers and Header Files, Cross-Compilers and Header Files}, for
598discussion about header files issues for cross-compilation.
599
600When you run @file{configure}, it picks the appropriate Objective-C
601thread implementation file for the target platform. In some situations,
602you may wish to choose a different back-end as some platforms support
603multiple thread implementations or you may wish to disable thread
604support completely. You do this by specifying a value for the
605@var{OBJC_THREAD_FILE} makefile variable on the command line when you
606run make, for example:
607
608@smallexample
609make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2" OBJC_THREAD_FILE=thr-single
610@end smallexample
611
612@noindent
613Below is a list of the currently available back-ends.
614
615@itemize @bullet
616@item thr-single
617Disable thread support, should work for all platforms.
618@item thr-decosf1
619DEC OSF/1 thread support.
620@item thr-irix
621SGI IRIX thread support.
622@item thr-mach
623Generic MACH thread support, known to work on NEXTSTEP.
624@item thr-os2
625IBM OS/2 thread support.
626@item thr-posix
627Generix POSIX thread support.
628@item thr-pthreads
629PCThreads on Linux-based GNU systems.
630@item thr-solaris
631SUN Solaris thread support.
632@item thr-win32
633Microsoft Win32 API thread support.
634@end itemize
635@end enumerate
636
637@node Configurations
638@section Configurations Supported by GNU CC
639@cindex configurations supported by GNU CC
640
641Here are the possible CPU types:
642
643@quotation
644@c gmicro, alliant, spur and tahoe omitted since they don't work.
6451750a, a29k, alpha, arm, c@var{n}, clipper, dsp16xx, elxsi, h8300,
65376d28 646hppa1.0, hppa1.1, i370, i386, i486, i586, i860, i960, m32r, m68000, m68k,
2284f91b
DE
647m88k, mips, mipsel, mips64, mips64el, ns32k, powerpc, powerpcle,
648pyramid, romp, rs6000, sh, sparc, sparclite, sparc64, vax, we32k.
649@end quotation
650
651Here are the recognized company names. As you can see, customary
652abbreviations are used rather than the longer official names.
653
654@c What should be done about merlin, tek*, dolphin?
655@quotation
656acorn, alliant, altos, apollo, apple, att, bull,
657cbm, convergent, convex, crds, dec, dg, dolphin,
658elxsi, encore, harris, hitachi, hp, ibm, intergraph, isi,
659mips, motorola, ncr, next, ns, omron, plexus,
660sequent, sgi, sony, sun, tti, unicom, wrs.
661@end quotation
662
663The company name is meaningful only to disambiguate when the rest of
664the information supplied is insufficient. You can omit it, writing
665just @samp{@var{cpu}-@var{system}}, if it is not needed. For example,
666@samp{vax-ultrix4.2} is equivalent to @samp{vax-dec-ultrix4.2}.
667
668Here is a list of system types:
669
670@quotation
0c82f6bf 671386bsd, aix, acis, amigaos, aos, aout, aux, bosx, bsd, clix, coff, ctix, cxux,
861bb6c1 672dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, genix, gnu, linux-gnu,
2284f91b
DE
673hiux, hpux, iris, irix, isc, luna, lynxos, mach, minix, msdos, mvs,
674netbsd, newsos, nindy, ns, osf, osfrose, ptx, riscix, riscos, rtu, sco, sim,
675solaris, sunos, sym, sysv, udi, ultrix, unicos, uniplus, unos, vms, vsta,
676vxworks, winnt, xenix.
677@end quotation
678
679@noindent
680You can omit the system type; then @file{configure} guesses the
681operating system from the CPU and company.
682
683You can add a version number to the system type; this may or may not
684make a difference. For example, you can write @samp{bsd4.3} or
685@samp{bsd4.4} to distinguish versions of BSD. In practice, the version
686number is most needed for @samp{sysv3} and @samp{sysv4}, which are often
687treated differently.
688
689If you specify an impossible combination such as @samp{i860-dg-vms},
690then you may get an error message from @file{configure}, or it may
691ignore part of the information and do the best it can with the rest.
692@file{configure} always prints the canonical name for the alternative
693that it used. GNU CC does not support all possible alternatives.
694
695Often a particular model of machine has a name. Many machine names are
696recognized as aliases for CPU/company combinations. Thus, the machine
697name @samp{sun3}, mentioned above, is an alias for @samp{m68k-sun}.
698Sometimes we accept a company name as a machine name, when the name is
699popularly used for a particular machine. Here is a table of the known
700machine names:
701
702@quotation
7033300, 3b1, 3b@var{n}, 7300, altos3068, altos,
704apollo68, att-7300, balance,
705convex-c@var{n}, crds, decstation-3100,
706decstation, delta, encore,
707fx2800, gmicro, hp7@var{nn}, hp8@var{nn},
708hp9k2@var{nn}, hp9k3@var{nn}, hp9k7@var{nn},
709hp9k8@var{nn}, iris4d, iris, isi68,
710m3230, magnum, merlin, miniframe,
711mmax, news-3600, news800, news, next,
712pbd, pc532, pmax, powerpc, powerpcle, ps2, risc-news,
713rtpc, sun2, sun386i, sun386, sun3,
714sun4, symmetry, tower-32, tower.
715@end quotation
716
717@noindent
718Remember that a machine name specifies both the cpu type and the company
719name.
720If you want to install your own homemade configuration files, you can
721use @samp{local} as the company name to access them. If you use
722configuration @samp{@var{cpu}-local}, the configuration name
723without the cpu prefix
724is used to form the configuration file names.
725
726Thus, if you specify @samp{m68k-local}, configuration uses
727files @file{m68k.md}, @file{local.h}, @file{m68k.c},
728@file{xm-local.h}, @file{t-local}, and @file{x-local}, all in the
729directory @file{config/m68k}.
730
731Here is a list of configurations that have special treatment or special
732things you must know:
733
734@table @samp
735@item 1750a-*-*
736MIL-STD-1750A processors.
737
738The MIL-STD-1750A cross configuration produces output for
739@code{as1750}, an assembler/linker available under the GNU Public
740License for the 1750A. @code{as1750} can be obtained at
741@emph{ftp://ftp.fta-berlin.de/pub/crossgcc/1750gals/}.
742A similarly licensed simulator for
743the 1750A is available from same address.
744
745You should ignore a fatal error during the building of libgcc (libgcc is
746not yet implemented for the 1750A.)
747
748The @code{as1750} assembler requires the file @file{ms1750.inc}, which is
749found in the directory @file{config/1750a}.
750
751GNU CC produced the same sections as the Fairchild F9450 C Compiler,
752namely:
753
754@table @code
755@item Normal
756The program code section.
757
758@item Static
759The read/write (RAM) data section.
760
761@item Konst
762The read-only (ROM) constants section.
763
764@item Init
765Initialization section (code to copy KREL to SREL).
766@end table
767
768The smallest addressable unit is 16 bits (BITS_PER_UNIT is 16). This
769means that type `char' is represented with a 16-bit word per character.
770The 1750A's "Load/Store Upper/Lower Byte" instructions are not used by
771GNU CC.
772
773@item alpha-*-osf1
774Systems using processors that implement the DEC Alpha architecture and
775are running the DEC Unix (OSF/1) operating system, for example the DEC
956d6950 776Alpha AXP systems.CC.)
2284f91b
DE
777
778GNU CC writes a @samp{.verstamp} directive to the assembler output file
779unless it is built as a cross-compiler. It gets the version to use from
780the system header file @file{/usr/include/stamp.h}. If you install a
781new version of DEC Unix, you should rebuild GCC to pick up the new version
782stamp.
783
784Note that since the Alpha is a 64-bit architecture, cross-compilers from
78532-bit machines will not generate code as efficient as that generated
786when the compiler is running on a 64-bit machine because many
787optimizations that depend on being able to represent a word on the
788target in an integral value on the host cannot be performed. Building
789cross-compilers on the Alpha for 32-bit machines has only been tested in
790a few cases and may not work properly.
791
792@code{make compare} may fail on old versions of DEC Unix unless you add
793@samp{-save-temps} to @code{CFLAGS}. On these systems, the name of the
794assembler input file is stored in the object file, and that makes
795comparison fail if it differs between the @code{stage1} and
796@code{stage2} compilations. The option @samp{-save-temps} forces a
797fixed name to be used for the assembler input file, instead of a
798randomly chosen name in @file{/tmp}. Do not add @samp{-save-temps}
799unless the comparisons fail without that option. If you add
800@samp{-save-temps}, you will have to manually delete the @samp{.i} and
801@samp{.s} files after each series of compilations.
802
803GNU CC now supports both the native (ECOFF) debugging format used by DBX
804and GDB and an encapsulated STABS format for use only with GDB. See the
805discussion of the @samp{--with-stabs} option of @file{configure} above
806for more information on these formats and how to select them.
807
808There is a bug in DEC's assembler that produces incorrect line numbers
809for ECOFF format when the @samp{.align} directive is used. To work
810around this problem, GNU CC will not emit such alignment directives
811while writing ECOFF format debugging information even if optimization is
812being performed. Unfortunately, this has the very undesirable
813side-effect that code addresses when @samp{-O} is specified are
814different depending on whether or not @samp{-g} is also specified.
815
816To avoid this behavior, specify @samp{-gstabs+} and use GDB instead of
817DBX. DEC is now aware of this problem with the assembler and hopes to
818provide a fix shortly.
819
e9a25f70
JL
820@item arc-*-elf
821Argonaut ARC processor.
822This configuration is intended for embedded systems.
823
861bb6c1 824@item arm-*-aout
2284f91b
DE
825Advanced RISC Machines ARM-family processors. These are often used in
826embedded applications. There are no standard Unix configurations.
827This configuration corresponds to the basic instruction sequences and will
861bb6c1 828produce @file{a.out} format object modules.
2284f91b
DE
829
830You may need to make a variant of the file @file{arm.h} for your particular
831configuration.
832
861bb6c1
JL
833@item arm-*-linuxaout
834Any of the ARM family processors running the Linux-based GNU system with
835the @file{a.out} binary format (ELF is not yet supported). You must use
956d6950 836version 2.8.1.0.7 or later of the GNU/Linux binutils, which you can download
861bb6c1
JL
837from @file{sunsite.unc.edu:/pub/Linux/GCC} and other mirror sites for
838Linux-based GNU systems.
839
2284f91b 840@item arm-*-riscix
14cd4d23
JL
841The ARM2 or ARM3 processor running RISC iX, Acorn's port of BSD Unix.
842If you are running a version of RISC iX prior to 1.2 then you must
843specify the version number during configuration. Note that the
844assembler shipped with RISC iX does not support stabs debugging
845information; a new version of the assembler, with stabs support
846included, is now available from Acorn and via ftp
847@file{ftp.acorn.com:/pub/riscix/as+xterm.tar.Z}. To enable stabs
848debugging, pass @samp{--with-gnu-as} to configure.
849
850You will need to install GNU @file{sed} before you can run configure.
2284f91b
DE
851
852@item a29k
853AMD Am29k-family processors. These are normally used in embedded
854applications. There are no standard Unix configurations.
855This configuration
856corresponds to AMD's standard calling sequence and binary interface
857and is compatible with other 29k tools.
858
859You may need to make a variant of the file @file{a29k.h} for your
860particular configuration.
861
862@item a29k-*-bsd
863AMD Am29050 used in a system running a variant of BSD Unix.
864
865@item decstation-*
e5e809f4
JL
866MIPS-based DECstations can support three different personalities:
867Ultrix, DEC OSF/1, and OSF/rose. (Alpha-based DECstation products have
868a configuration name beginning with @samp{alpha-dec}.) To configure GCC
869for these platforms use the following configurations:
2284f91b
DE
870
871@table @samp
872@item decstation-ultrix
873Ultrix configuration.
874
875@item decstation-osf1
876Dec's version of OSF/1.
877
878@item decstation-osfrose
879Open Software Foundation reference port of OSF/1 which uses the
880OSF/rose object file format instead of ECOFF. Normally, you
881would not select this configuration.
882@end table
883
884The MIPS C compiler needs to be told to increase its table size
885for switch statements with the @samp{-Wf,-XNg1500} option in
886order to compile @file{cp/parse.c}. If you use the @samp{-O2}
887optimization option, you also need to use @samp{-Olimit 3000}.
888Both of these options are automatically generated in the
889@file{Makefile} that the shell script @file{configure} builds.
890If you override the @code{CC} make variable and use the MIPS
891compilers, you may need to add @samp{-Wf,-XNg1500 -Olimit 3000}.
892
893@item elxsi-elxsi-bsd
894The Elxsi's C compiler has known limitations that prevent it from
895compiling GNU C. Please contact @code{mrs@@cygnus.com} for more details.
896
897@item dsp16xx
898A port to the AT&T DSP1610 family of processors.
899
900@ignore
901@item fx80
902Alliant FX/8 computer. Note that the standard installed C compiler in
903Concentrix 5.0 has a bug which prevent it from compiling GNU CC
904correctly. You can patch the compiler bug as follows:
905
906@smallexample
907cp /bin/pcc ./pcc
908adb -w ./pcc - << EOF
90915f6?w 6610
910EOF
911@end smallexample
912
913Then you must use the @samp{-ip12} option when compiling GNU CC
914with the patched compiler, as shown here:
915
916@smallexample
917make CC="./pcc -ip12" CFLAGS=-w
918@end smallexample
919
920Note also that Alliant's version of DBX does not manage to work with the
921output from GNU CC.
922@end ignore
923
924@item h8300-*-*
e9a25f70
JL
925Hitachi H8/300 series of processors.
926
2284f91b
DE
927The calling convention and structure layout has changed in release 2.6.
928All code must be recompiled. The calling convention now passes the
929first three arguments in function calls in registers. Structures are no
930longer a multiple of 2 bytes.
931
932@item hppa*-*-*
933There are several variants of the HP-PA processor which run a variety
934of operating systems. GNU CC must be configured to use the correct
935processor type and operating system, or GNU CC will not function correctly.
936The easiest way to handle this problem is to @emph{not} specify a target
937when configuring GNU CC, the @file{configure} script will try to automatically
938determine the right processor type and operating system.
939
940@samp{-g} does not work on HP-UX, since that system uses a peculiar
941debugging format which GNU CC does not know about. However, @samp{-g}
942will work if you also use GAS and GDB in conjunction with GCC. We
943highly recommend using GAS for all HP-PA configurations.
944
945You should be using GAS-2.6 (or later) along with GDB-4.16 (or later). These
946can be retrieved from all the traditional GNU ftp archive sites.
947
948GAS will need to be installed into a directory before @code{/bin},
949@code{/usr/bin}, and @code{/usr/ccs/bin} in your search path. You
950should install GAS before you build GNU CC.
951
952To enable debugging, you must configure GNU CC with the @samp{--with-gnu-as}
953option before building.
954
955@item i370-*-*
956This port is very preliminary and has many known bugs. We hope to
957have a higher-quality port for this machine soon.
958
861bb6c1
JL
959@item i386-*-linux-gnuoldld
960Use this configuration to generate @file{a.out} binaries on Linux-based
961GNU systems if you do not have gas/binutils version 2.5.2 or later
962installed. This is an obsolete configuration.
2284f91b 963
861bb6c1
JL
964@item i386-*-linux-gnuaout
965Use this configuration to generate @file{a.out} binaries on Linux-based
966GNU systems. This configuration is being superseded. You must use
967gas/binutils version 2.5.2 or later.
2284f91b 968
861bb6c1
JL
969@item i386-*-linux-gnu
970Use this configuration to generate ELF binaries on Linux-based GNU
971systems. You must use gas/binutils version 2.5.2 or later.
2284f91b
DE
972
973@item i386-*-sco
974Compilation with RCC is recommended. Also, it may be a good idea to
975link with GNU malloc instead of the malloc that comes with the system.
976
977@item i386-*-sco3.2v4
978Use this configuration for SCO release 3.2 version 4.
979
980@item i386-*-sco3.2v5*
e9a25f70
JL
981Use this for the SCO OpenServer Release family including 5.0.0, 5.0.2,
9825.0.4, Internet FastStart 1.0, and Internet FastStart 1.1.
983
3a0120cf
JL
984GNU CC can generate either ELF or COFF binaries. ELF is the default.
985To get COFF output, you must specify @samp{-mcoff}) on the command line.
986
987For 5.0.0 and 5.0.2, you must install TLS597 from ftp.sco.com/TLS.
9885.0.4 and later do not require this patch.
2284f91b 989
e9a25f70
JL
990@emph{NOTE:} You must follow the instructions about invoking
991@samp{make bootstrap} because the native OpenServer compiler builds
992a @file{cc1plus} that will not correctly parse many valid C++ programs.
993You must do a @samp{make bootstrap} if you are building with the native
994compiler.
995
2284f91b
DE
996@item i386-*-isc
997It may be a good idea to link with GNU malloc instead of the malloc that
998comes with the system.
999
1000In ISC version 4.1, @file{sed} core dumps when building
1001@file{deduced.h}. Use the version of @file{sed} from version 4.0.
1002
1003@item i386-*-esix
1004It may be good idea to link with GNU malloc instead of the malloc that
1005comes with the system.
1006
1007@item i386-ibm-aix
1008You need to use GAS version 2.1 or later, and LD from
1009GNU binutils version 2.2 or later.
1010
1011@item i386-sequent-bsd
956d6950 1012Go to the Berkeley universe before compiling.
2284f91b
DE
1013
1014@item i386-sequent-ptx1*
1015Sequent DYNIX/ptx 1.x.
1016
1017@item i386-sequent-ptx2*
1018Sequent DYNIX/ptx 2.x.
1019
1020@item i386-sun-sunos4
1021You may find that you need another version of GNU CC to begin
1022bootstrapping with, since the current version when built with the
1023system's own compiler seems to get an infinite loop compiling part of
1024@file{libgcc2.c}. GNU CC version 2 compiled with GNU CC (any version)
1025seems not to have this problem.
1026
1027See @ref{Sun Install}, for information on installing GNU CC on Sun
1028systems.
1029
1030@item i[345]86-*-winnt3.5
e9a25f70 1031This version requires a GAS that has not yet been released. Until it
2284f91b
DE
1032is, you can get a prebuilt binary version via anonymous ftp from
1033@file{cs.washington.edu:pub/gnat} or @file{cs.nyu.edu:pub/gnat}. You
1034must also use the Microsoft header files from the Windows NT 3.5 SDK.
1035Find these on the CDROM in the @file{/mstools/h} directory dated 9/4/94. You
1036must use a fixed version of Microsoft linker made especially for NT 3.5,
1037which is also is available on the NT 3.5 SDK CDROM. If you do not have
1038this linker, can you also use the linker from Visual C/C++ 1.0 or 2.0.
1039
1040Installing GNU CC for NT builds a wrapper linker, called @file{ld.exe},
1041which mimics the behaviour of Unix @file{ld} in the specification of
1042libraries (@samp{-L} and @samp{-l}). @file{ld.exe} looks for both Unix
1043and Microsoft named libraries. For example, if you specify
1044@samp{-lfoo}, @file{ld.exe} will look first for @file{libfoo.a}
1045and then for @file{foo.lib}.
1046
1047You may install GNU CC for Windows NT in one of two ways, depending on
1048whether or not you have a Unix-like shell and various Unix-like
1049utilities.
1050
1051@enumerate
1052@item
1053If you do not have a Unix-like shell and few Unix-like utilities, you
1054will use a DOS style batch script called @file{configure.bat}. Invoke
1055it as @code{configure winnt} from an MSDOS console window or from the
1056program manager dialog box. @file{configure.bat} assumes you have
1057already installed and have in your path a Unix-like @file{sed} program
1058which is used to create a working @file{Makefile} from @file{Makefile.in}.
1059
1060@file{Makefile} uses the Microsoft Nmake program maintenance utility and
1061the Visual C/C++ V8.00 compiler to build GNU CC. You need only have the
1062utilities @file{sed} and @file{touch} to use this installation method,
1063which only automatically builds the compiler itself. You must then
1064examine what @file{fixinc.winnt} does, edit the header files by hand and
1065build @file{libgcc.a} manually.
1066
1067@item
1068The second type of installation assumes you are running a Unix-like
1069shell, have a complete suite of Unix-like utilities in your path, and
1070have a previous version of GNU CC already installed, either through
1071building it via the above installation method or acquiring a pre-built
1072binary. In this case, use the @file{configure} script in the normal
1073fashion.
1074@end enumerate
1075
1076@item i860-intel-osf1
1077This is the Paragon.
1078@ifset INSTALLONLY
1079If you have version 1.0 of the operating system, you need to take
1080special steps to build GNU CC due to peculiarities of the system. Newer
1081system versions have no problem. See the section `Installation Problems'
1082in the GNU CC Manual.
1083@end ifset
1084@ifclear INSTALLONLY
1085If you have version 1.0 of the operating system,
1086see @ref{Installation Problems}, for special things you need to do to
1087compensate for peculiarities in the system.
1088@end ifclear
1089
1090@item *-lynx-lynxos
1091LynxOS 2.2 and earlier comes with GNU CC 1.x already installed as
1092@file{/bin/gcc}. You should compile with this instead of @file{/bin/cc}.
1093You can tell GNU CC to use the GNU assembler and linker, by specifying
1094@samp{--with-gnu-as --with-gnu-ld} when configuring. These will produce
1095COFF format object files and executables; otherwise GNU CC will use the
861bb6c1 1096installed tools, which produce @file{a.out} format executables.
2284f91b 1097
65376d28 1098@item m32r-*-elf
e9a25f70
JL
1099Mitsubishi M32R processor.
1100This configuration is intended for embedded systems.
65376d28 1101
2284f91b
DE
1102@item m68000-hp-bsd
1103HP 9000 series 200 running BSD. Note that the C compiler that comes
03340df4 1104with this system cannot compile GNU CC; contact @code{law@@cygnus.com}
2284f91b
DE
1105to get binaries of GNU CC for bootstrapping.
1106
1107@item m68k-altos
1108Altos 3068. You must use the GNU assembler, linker and debugger.
1109Also, you must fix a kernel bug. Details in the file @file{README.ALTOS}.
1110
1111@item m68k-apple-aux
1112Apple Macintosh running A/UX.
1113You may configure GCC to use either the system assembler and
1114linker or the GNU assembler and linker. You should use the GNU configuration
1115if you can, especially if you also want to use GNU C++. You enabled
1116that configuration with + the @samp{--with-gnu-as} and @samp{--with-gnu-ld}
1117options to @code{configure}.
1118
1119Note the C compiler that comes
e5e809f4 1120with this system cannot compile GNU CC. You can find binaries of GNU CC
2284f91b
DE
1121for bootstrapping on @code{jagubox.gsfc.nasa.gov}.
1122You will also a patched version of @file{/bin/ld} there that
1123raises some of the arbitrary limits found in the original.
1124
1125@item m68k-att-sysv
1126AT&T 3b1, a.k.a. 7300 PC. Special procedures are needed to compile GNU
1127CC with this machine's standard C compiler, due to bugs in that
1128compiler. You can bootstrap it more easily with
1129previous versions of GNU CC if you have them.
1130
1131Installing GNU CC on the 3b1 is difficult if you do not already have
1132GNU CC running, due to bugs in the installed C compiler. However,
1133the following procedure might work. We are unable to test it.
1134
1135@enumerate
1136@item
e9a25f70 1137Comment out the @samp{#include "config.h"} line near the start of
2284f91b
DE
1138@file{cccp.c} and do @samp{make cpp}. This makes a preliminary version
1139of GNU cpp.
1140
1141@item
1142Save the old @file{/lib/cpp} and copy the preliminary GNU cpp to that
1143file name.
1144
1145@item
1146Undo your change in @file{cccp.c}, or reinstall the original version,
1147and do @samp{make cpp} again.
1148
1149@item
1150Copy this final version of GNU cpp into @file{/lib/cpp}.
1151
1152@findex obstack_free
1153@item
1154Replace every occurrence of @code{obstack_free} in the file
1155@file{tree.c} with @code{_obstack_free}.
1156
1157@item
1158Run @code{make} to get the first-stage GNU CC.
1159
1160@item
1161Reinstall the original version of @file{/lib/cpp}.
1162
1163@item
1164Now you can compile GNU CC with itself and install it in the normal
1165fashion.
1166@end enumerate
1167
1168@item m68k-bull-sysv
1169Bull DPX/2 series 200 and 300 with BOS-2.00.45 up to BOS-2.01. GNU CC works
1170either with native assembler or GNU assembler. You can use
1171GNU assembler with native coff generation by providing @samp{--with-gnu-as} to
1172the configure script or use GNU assembler with dbx-in-coff encapsulation
1173by providing @samp{--with-gnu-as --stabs}. For any problem with native
1174assembler or for availability of the DPX/2 port of GAS, contact
1175@code{F.Pierresteguy@@frcl.bull.fr}.
1176
1177@item m68k-crds-unox
1178Use @samp{configure unos} for building on Unos.
1179
1180The Unos assembler is named @code{casm} instead of @code{as}. For some
1181strange reason linking @file{/bin/as} to @file{/bin/casm} changes the
1182behavior, and does not work. So, when installing GNU CC, you should
1183install the following script as @file{as} in the subdirectory where
1184the passes of GCC are installed:
1185
1186@example
1187#!/bin/sh
1188casm $*
1189@end example
1190
1191The default Unos library is named @file{libunos.a} instead of
1192@file{libc.a}. To allow GNU CC to function, either change all
1193references to @samp{-lc} in @file{gcc.c} to @samp{-lunos} or link
1194@file{/lib/libc.a} to @file{/lib/libunos.a}.
1195
1196@cindex @code{alloca}, for Unos
1197When compiling GNU CC with the standard compiler, to overcome bugs in
1198the support of @code{alloca}, do not use @samp{-O} when making stage 2.
1199Then use the stage 2 compiler with @samp{-O} to make the stage 3
1200compiler. This compiler will have the same characteristics as the usual
1201stage 2 compiler on other systems. Use it to make a stage 4 compiler
1202and compare that with stage 3 to verify proper compilation.
1203
1204(Perhaps simply defining @code{ALLOCA} in @file{x-crds} as described in
1205the comments there will make the above paragraph superfluous. Please
1206inform us of whether this works.)
1207
1208Unos uses memory segmentation instead of demand paging, so you will need
1209a lot of memory. 5 Mb is barely enough if no other tasks are running.
1210If linking @file{cc1} fails, try putting the object files into a library
1211and linking from that library.
1212
1213@item m68k-hp-hpux
1214HP 9000 series 300 or 400 running HP-UX. HP-UX version 8.0 has a bug in
1215the assembler that prevents compilation of GNU CC. To fix it, get patch
1216PHCO_4484 from HP.
1217
1218In addition, if you wish to use gas @samp{--with-gnu-as} you must use
1219gas version 2.1 or later, and you must use the GNU linker version 2.1 or
1220later. Earlier versions of gas relied upon a program which converted the
1221gas output into the native HP/UX format, but that program has not been
1222kept up to date. gdb does not understand that native HP/UX format, so
1223you must use gas if you wish to use gdb.
1224
1225@item m68k-sun
1226Sun 3. We do not provide a configuration file to use the Sun FPA by
1227default, because programs that establish signal handlers for floating
1228point traps inherently cannot work with the FPA.
1229
1230See @ref{Sun Install}, for information on installing GNU CC on Sun
1231systems.
1232
1233@item m88k-*-svr3
1234Motorola m88k running the AT&T/Unisoft/Motorola V.3 reference port.
1235These systems tend to use the Green Hills C, revision 1.8.5, as the
1236standard C compiler. There are apparently bugs in this compiler that
1237result in object files differences between stage 2 and stage 3. If this
1238happens, make the stage 4 compiler and compare it to the stage 3
1239compiler. If the stage 3 and stage 4 object files are identical, this
1240suggests you encountered a problem with the standard C compiler; the
1241stage 3 and 4 compilers may be usable.
1242
1243It is best, however, to use an older version of GNU CC for bootstrapping
1244if you have one.
1245
1246@item m88k-*-dgux
1247Motorola m88k running DG/UX. To build 88open BCS native or cross
1248compilers on DG/UX, specify the configuration name as
1249@samp{m88k-*-dguxbcs} and build in the 88open BCS software development
1250environment. To build ELF native or cross compilers on DG/UX, specify
1251@samp{m88k-*-dgux} and build in the DG/UX ELF development environment.
1252You set the software development environment by issuing
1253@samp{sde-target} command and specifying either @samp{m88kbcs} or
1254@samp{m88kdguxelf} as the operand.
1255
1256If you do not specify a configuration name, @file{configure} guesses the
1257configuration based on the current software development environment.
1258
1259@item m88k-tektronix-sysv3
1260Tektronix XD88 running UTekV 3.2e. Do not turn on
1261optimization while building stage1 if you bootstrap with
1262the buggy Green Hills compiler. Also, The bundled LAI
1263System V NFS is buggy so if you build in an NFS mounted
1264directory, start from a fresh reboot, or avoid NFS all together.
1265Otherwise you may have trouble getting clean comparisons
1266between stages.
1267
1268@item mips-mips-bsd
1269MIPS machines running the MIPS operating system in BSD mode. It's
1270possible that some old versions of the system lack the functions
1271@code{memcpy}, @code{memcmp}, and @code{memset}. If your system lacks
1272these, you must remove or undo the definition of
1273@code{TARGET_MEM_FUNCTIONS} in @file{mips-bsd.h}.
1274
1275The MIPS C compiler needs to be told to increase its table size
1276for switch statements with the @samp{-Wf,-XNg1500} option in
1277order to compile @file{cp/parse.c}. If you use the @samp{-O2}
1278optimization option, you also need to use @samp{-Olimit 3000}.
1279Both of these options are automatically generated in the
1280@file{Makefile} that the shell script @file{configure} builds.
1281If you override the @code{CC} make variable and use the MIPS
1282compilers, you may need to add @samp{-Wf,-XNg1500 -Olimit 3000}.
1283
1284@item mips-mips-riscos*
1285The MIPS C compiler needs to be told to increase its table size
1286for switch statements with the @samp{-Wf,-XNg1500} option in
1287order to compile @file{cp/parse.c}. If you use the @samp{-O2}
1288optimization option, you also need to use @samp{-Olimit 3000}.
1289Both of these options are automatically generated in the
1290@file{Makefile} that the shell script @file{configure} builds.
1291If you override the @code{CC} make variable and use the MIPS
1292compilers, you may need to add @samp{-Wf,-XNg1500 -Olimit 3000}.
1293
1294MIPS computers running RISC-OS can support four different
1295personalities: default, BSD 4.3, System V.3, and System V.4
1296(older versions of RISC-OS don't support V.4). To configure GCC
1297for these platforms use the following configurations:
1298
1299@table @samp
1300@item mips-mips-riscos@code{rev}
1301Default configuration for RISC-OS, revision @code{rev}.
1302
1303@item mips-mips-riscos@code{rev}bsd
1304BSD 4.3 configuration for RISC-OS, revision @code{rev}.
1305
1306@item mips-mips-riscos@code{rev}sysv4
1307System V.4 configuration for RISC-OS, revision @code{rev}.
1308
1309@item mips-mips-riscos@code{rev}sysv
1310System V.3 configuration for RISC-OS, revision @code{rev}.
1311@end table
1312
1313The revision @code{rev} mentioned above is the revision of
1314RISC-OS to use. You must reconfigure GCC when going from a
1315RISC-OS revision 4 to RISC-OS revision 5. This has the effect of
1316avoiding a linker
1317@ifclear INSTALLONLY
1318bug (see @ref{Installation Problems}, for more details).
1319@end ifclear
1320@ifset INSTALLONLY
1321bug.
1322@end ifset
1323
1324@item mips-sgi-*
1325In order to compile GCC on an SGI running IRIX 4, the "c.hdr.lib"
1326option must be installed from the CD-ROM supplied from Silicon Graphics.
1327This is found on the 2nd CD in release 4.0.1.
1328
1329In order to compile GCC on an SGI running IRIX 5, the "compiler_dev.hdr"
1330subsystem must be installed from the IDO CD-ROM supplied by Silicon
1331Graphics.
1332
1333@code{make compare} may fail on version 5 of IRIX unless you add
1334@samp{-save-temps} to @code{CFLAGS}. On these systems, the name of the
1335assembler input file is stored in the object file, and that makes
1336comparison fail if it differs between the @code{stage1} and
1337@code{stage2} compilations. The option @samp{-save-temps} forces a
1338fixed name to be used for the assembler input file, instead of a
1339randomly chosen name in @file{/tmp}. Do not add @samp{-save-temps}
1340unless the comparisons fail without that option. If you do you
1341@samp{-save-temps}, you will have to manually delete the @samp{.i} and
1342@samp{.s} files after each series of compilations.
1343
1344The MIPS C compiler needs to be told to increase its table size
1345for switch statements with the @samp{-Wf,-XNg1500} option in
1346order to compile @file{cp/parse.c}. If you use the @samp{-O2}
1347optimization option, you also need to use @samp{-Olimit 3000}.
1348Both of these options are automatically generated in the
1349@file{Makefile} that the shell script @file{configure} builds.
1350If you override the @code{CC} make variable and use the MIPS
1351compilers, you may need to add @samp{-Wf,-XNg1500 -Olimit 3000}.
1352
1353On Irix version 4.0.5F, and perhaps on some other versions as well,
1354there is an assembler bug that reorders instructions incorrectly. To
1355work around it, specify the target configuration
1356@samp{mips-sgi-irix4loser}. This configuration inhibits assembler
1357optimization.
1358
1359In a compiler configured with target @samp{mips-sgi-irix4}, you can turn
1360off assembler optimization by using the @samp{-noasmopt} option. This
1361compiler option passes the option @samp{-O0} to the assembler, to
1362inhibit reordering.
1363
1364The @samp{-noasmopt} option can be useful for testing whether a problem
1365is due to erroneous assembler reordering. Even if a problem does not go
1366away with @samp{-noasmopt}, it may still be due to assembler
1367reordering---perhaps GNU CC itself was miscompiled as a result.
1368
1369To enable debugging under Irix 5, you must use GNU as 2.5 or later,
1370and use the @samp{--with-gnu-as} configure option when configuring gcc.
1371GNU as is distributed as part of the binutils package.
1372
1373@item mips-sony-sysv
1374Sony MIPS NEWS. This works in NEWSOS 5.0.1, but not in 5.0.2 (which
1375uses ELF instead of COFF). Support for 5.0.2 will probably be provided
1376soon by volunteers. In particular, the linker does not like the
1377code generated by GCC when shared libraries are linked in.
1378
1379@item ns32k-encore
1380Encore ns32000 system. Encore systems are supported only under BSD.
1381
1382@item ns32k-*-genix
1383National Semiconductor ns32000 system. Genix has bugs in @code{alloca}
1384and @code{malloc}; you must get the compiled versions of these from GNU
1385Emacs.
1386
1387@item ns32k-sequent
956d6950 1388Go to the Berkeley universe before compiling.
2284f91b
DE
1389
1390@item ns32k-utek
1391UTEK ns32000 system (``merlin''). The C compiler that comes with this
1392system cannot compile GNU CC; contact @samp{tektronix!reed!mason} to get
1393binaries of GNU CC for bootstrapping.
1394
1395@item romp-*-aos
1396@itemx romp-*-mach
1397The only operating systems supported for the IBM RT PC are AOS and
1398MACH. GNU CC does not support AIX running on the RT. We recommend you
1399compile GNU CC with an earlier version of itself; if you compile GNU CC
1400with @code{hc}, the Metaware compiler, it will work, but you will get
1401mismatches between the stage 2 and stage 3 compilers in various files.
1402These errors are minor differences in some floating-point constants and
1403can be safely ignored; the stage 3 compiler is correct.
1404
1405@item rs6000-*-aix
1406@itemx powerpc-*-aix
1407Various early versions of each release of the IBM XLC compiler will not
1408bootstrap GNU CC. Symptoms include differences between the stage2 and
1409stage3 object files, and errors when compiling @file{libgcc.a} or
1410@file{enquire}. Known problematic releases include: xlc-1.2.1.8,
1411xlc-1.3.0.0 (distributed with AIX 3.2.5), and xlc-1.3.0.19. Both
1412xlc-1.2.1.28 and xlc-1.3.0.24 (PTF 432238) are known to produce working
1413versions of GNU CC, but most other recent releases correctly bootstrap
1da4b26c
DE
1414GNU CC.
1415
1416Release 4.3.0 of AIX and ones prior to AIX 3.2.4 include a version of
2284f91b
DE
1417the IBM assembler which does not accept debugging directives: assembler
1418updates are available as PTFs. Also, if you are using AIX 3.2.5 or
1419greater and the GNU assembler, you must have a version modified after
1420October 16th, 1995 in order for the GNU C compiler to build. See the
1da4b26c 1421file @file{README.RS6000} for more details on any of these problems.
2284f91b
DE
1422
1423GNU CC does not yet support the 64-bit PowerPC instructions.
1424
1425Objective C does not work on this architecture because it makes assumptions
1426that are incompatible with the calling conventions.
1427
1428AIX on the RS/6000 provides support (NLS) for environments outside of
1429the United States. Compilers and assemblers use NLS to support
1430locale-specific representations of various objects including
1431floating-point numbers ("." vs "," for separating decimal fractions).
1432There have been problems reported where the library linked with GNU CC
1433does not produce the same floating-point formats that the assembler
1434accepts. If you have this problem, set the LANG environment variable to
1435"C" or "En_US".
1436
1437Due to changes in the way that GNU CC invokes the binder (linker) for AIX
14384.1, you may now receive warnings of duplicate symbols from the link step
1439that were not reported before. The assembly files generated by GNU CC for
1440AIX have always included multiple symbol definitions for certain global
1441variable and function declarations in the original program. The warnings
1442should not prevent the linker from producing a correct library or runnable
1443executable.
1444
1445By default, AIX 4.1 produces code that can be used on either Power or
1446PowerPC processors.
1447
1448You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
1449switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
1450
1451@item powerpc-*-elf
1452@itemx powerpc-*-sysv4
1453PowerPC system in big endian mode, running System V.4.
1454
1455You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
1456switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
1457
861bb6c1
JL
1458@item powerpc-*-linux-gnu
1459PowerPC system in big endian mode, running the Linux-based GNU system.
2284f91b
DE
1460
1461You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
1462switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
1463
1464@item powerpc-*-eabiaix
1465Embedded PowerPC system in big endian mode with -mcall-aix selected as
1466the default.
1467
1468You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
1469switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
1470
1471@item powerpc-*-eabisim
1472Embedded PowerPC system in big endian mode for use in running under the
1473PSIM simulator.
1474
1475You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
1476switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
1477
1478@item powerpc-*-eabi
1479Embedded PowerPC system in big endian mode.
1480
1481You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
1482switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
1483
1484@item powerpcle-*-elf
1485@itemx powerpcle-*-sysv4
1486PowerPC system in little endian mode, running System V.4.
1487
1488You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
1489switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
1490
1491@item powerpcle-*-solaris2*
1492PowerPC system in little endian mode, running Solaris 2.5.1 or higher.
1493
1494You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
1495switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
1496Beta versions of the Sun 4.0 compiler do not seem to be able to build
1497GNU CC correctly. There are also problems with the host assembler and
1498linker that are fixed by using the GNU versions of these tools.
1499
1500@item powerpcle-*-eabisim
1501Embedded PowerPC system in little endian mode for use in running under
1502the PSIM simulator.
1503
1504@itemx powerpcle-*-eabi
1505Embedded PowerPC system in little endian mode.
1506
1507You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
1508switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
1509
1510@item powerpcle-*-winnt
1511@itemx powerpcle-*-pe
1512PowerPC system in little endian mode running Windows NT.
1513
1514You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
1515switch by using the configure option @samp{--with-cpu-}@var{cpu_type}.
1516
1517@item vax-dec-ultrix
1518Don't try compiling with Vax C (@code{vcc}). It produces incorrect code
1519in some cases (for example, when @code{alloca} is used).
1520
1521Meanwhile, compiling @file{cp/parse.c} with pcc does not work because of
1522an internal table size limitation in that compiler. To avoid this
1523problem, compile just the GNU C compiler first, and use it to recompile
1524building all the languages that you want to run.
1525
1526@item sparc-sun-*
2284f91b
DE
1527See @ref{Sun Install}, for information on installing GNU CC on Sun
1528systems.
1529
1530@item vax-dec-vms
1531See @ref{VMS Install}, for details on how to install GNU CC on VMS.
1532
1533@item we32k-*-*
1534These computers are also known as the 3b2, 3b5, 3b20 and other similar
1535names. (However, the 3b1 is actually a 68000; see
1536@ref{Configurations}.)
1537
1538Don't use @samp{-g} when compiling with the system's compiler. The
1539system's linker seems to be unable to handle such a large program with
1540debugging information.
1541
1542The system's compiler runs out of capacity when compiling @file{stmt.c}
1543in GNU CC. You can work around this by building @file{cpp} in GNU CC
1544first, then use that instead of the system's preprocessor with the
1545system's C compiler to compile @file{stmt.c}. Here is how:
1546
1547@smallexample
1548mv /lib/cpp /lib/cpp.att
1549cp cpp /lib/cpp.gnu
1550echo '/lib/cpp.gnu -traditional $@{1+"$@@"@}' > /lib/cpp
1551chmod +x /lib/cpp
1552@end smallexample
1553
1554The system's compiler produces bad code for some of the GNU CC
1555optimization files. So you must build the stage 2 compiler without
1556optimization. Then build a stage 3 compiler with optimization.
1557That executable should work. Here are the necessary commands:
1558
1559@smallexample
1560make LANGUAGES=c CC=stage1/xgcc CFLAGS="-Bstage1/ -g"
1561make stage2
1562make CC=stage2/xgcc CFLAGS="-Bstage2/ -g -O"
1563@end smallexample
1564
1565You may need to raise the ULIMIT setting to build a C++ compiler,
1566as the file @file{cc1plus} is larger than one megabyte.
1567@end table
1568
1569@node Other Dir
1570@section Compilation in a Separate Directory
1571@cindex other directory, compilation in
1572@cindex compilation in a separate directory
1573@cindex separate directory, compilation in
1574
1575If you wish to build the object files and executables in a directory
1576other than the one containing the source files, here is what you must
1577do differently:
1578
1579@enumerate
1580@item
1581Make sure you have a version of Make that supports the @code{VPATH}
1582feature. (GNU Make supports it, as do Make versions on most BSD
1583systems.)
1584
1585@item
1586If you have ever run @file{configure} in the source directory, you must undo
1587the configuration. Do this by running:
1588
1589@example
1590make distclean
1591@end example
1592
1593@item
1594Go to the directory in which you want to build the compiler before
1595running @file{configure}:
1596
1597@example
1598mkdir gcc-sun3
1599cd gcc-sun3
1600@end example
1601
1602On systems that do not support symbolic links, this directory must be
1603on the same file system as the source code directory.
1604
1605@item
1606Specify where to find @file{configure} when you run it:
1607
1608@example
1609../gcc/configure @dots{}
1610@end example
1611
1612This also tells @code{configure} where to find the compiler sources;
1613@code{configure} takes the directory from the file name that was used to
1614invoke it. But if you want to be sure, you can specify the source
1615directory with the @samp{--srcdir} option, like this:
1616
1617@example
1618../gcc/configure --srcdir=../gcc @var{other options}
1619@end example
1620
1621The directory you specify with @samp{--srcdir} need not be the same
1622as the one that @code{configure} is found in.
1623@end enumerate
1624
1625Now, you can run @code{make} in that directory. You need not repeat the
1626configuration steps shown above, when ordinary source files change. You
1627must, however, run @code{configure} again when the configuration files
1628change, if your system does not support symbolic links.
1629
1630@node Cross-Compiler
1631@section Building and Installing a Cross-Compiler
1632@cindex cross-compiler, installation
1633
1634GNU CC can function as a cross-compiler for many machines, but not all.
1635
1636@itemize @bullet
1637@item
1638Cross-compilers for the Mips as target using the Mips assembler
1639currently do not work, because the auxiliary programs
1640@file{mips-tdump.c} and @file{mips-tfile.c} can't be compiled on
1641anything but a Mips. It does work to cross compile for a Mips
1642if you use the GNU assembler and linker.
1643
1644@item
1645Cross-compilers between machines with different floating point formats
1646have not all been made to work. GNU CC now has a floating point
1647emulator with which these can work, but each target machine description
1648needs to be updated to take advantage of it.
1649
1650@item
1651Cross-compilation between machines of different word sizes is
1652somewhat problematic and sometimes does not work.
1653@end itemize
1654
1655Since GNU CC generates assembler code, you probably need a
1656cross-assembler that GNU CC can run, in order to produce object files.
1657If you want to link on other than the target machine, you need a
1658cross-linker as well. You also need header files and libraries suitable
1659for the target machine that you can install on the host machine.
1660
1661@menu
1662* Steps of Cross:: Using a cross-compiler involves several steps
1663 that may be carried out on different machines.
1664* Configure Cross:: Configuring a cross-compiler.
1665* Tools and Libraries:: Where to put the linker and assembler, and the C library.
1666* Cross Headers:: Finding and installing header files
1667 for a cross-compiler.
1668* Cross Runtime:: Supplying arithmetic runtime routines (@file{libgcc1.a}).
1669* Build Cross:: Actually compiling the cross-compiler.
1670@end menu
1671
1672@node Steps of Cross
1673@subsection Steps of Cross-Compilation
1674
1675To compile and run a program using a cross-compiler involves several
1676steps:
1677
1678@itemize @bullet
1679@item
1680Run the cross-compiler on the host machine to produce assembler files
1681for the target machine. This requires header files for the target
1682machine.
1683
1684@item
1685Assemble the files produced by the cross-compiler. You can do this
1686either with an assembler on the target machine, or with a
1687cross-assembler on the host machine.
1688
1689@item
1690Link those files to make an executable. You can do this either with a
1691linker on the target machine, or with a cross-linker on the host
1692machine. Whichever machine you use, you need libraries and certain
1693startup files (typically @file{crt@dots{}.o}) for the target machine.
1694@end itemize
1695
1696It is most convenient to do all of these steps on the same host machine,
1697since then you can do it all with a single invocation of GNU CC. This
1698requires a suitable cross-assembler and cross-linker. For some targets,
1699the GNU assembler and linker are available.
1700
1701@node Configure Cross
1702@subsection Configuring a Cross-Compiler
1703
1704To build GNU CC as a cross-compiler, you start out by running
1705@file{configure}. Use the @samp{--target=@var{target}} to specify the
1706target type. If @file{configure} was unable to correctly identify the
1707system you are running on, also specify the @samp{--build=@var{build}}
1708option. For example, here is how to configure for a cross-compiler that
1709produces code for an HP 68030 system running BSD on a system that
1710@file{configure} can correctly identify:
1711
1712@smallexample
1713./configure --target=m68k-hp-bsd4.3
1714@end smallexample
1715
1716@node Tools and Libraries
1717@subsection Tools and Libraries for a Cross-Compiler
1718
1719If you have a cross-assembler and cross-linker available, you should
1720install them now. Put them in the directory
1721@file{/usr/local/@var{target}/bin}. Here is a table of the tools
1722you should put in this directory:
1723
1724@table @file
1725@item as
1726This should be the cross-assembler.
1727
1728@item ld
1729This should be the cross-linker.
1730
1731@item ar
1732This should be the cross-archiver: a program which can manipulate
1733archive files (linker libraries) in the target machine's format.
1734
1735@item ranlib
1736This should be a program to construct a symbol table in an archive file.
1737@end table
1738
1739The installation of GNU CC will find these programs in that directory,
1740and copy or link them to the proper place to for the cross-compiler to
1741find them when run later.
1742
1743The easiest way to provide these files is to build the Binutils package
1744and GAS. Configure them with the same @samp{--host} and @samp{--target}
1745options that you use for configuring GNU CC, then build and install
1746them. They install their executables automatically into the proper
1747directory. Alas, they do not support all the targets that GNU CC
1748supports.
1749
1750If you want to install libraries to use with the cross-compiler, such as
1751a standard C library, put them in the directory
1752@file{/usr/local/@var{target}/lib}; installation of GNU CC copies
1753all the files in that subdirectory into the proper place for GNU CC to
1754find them and link with them. Here's an example of copying some
1755libraries from a target machine:
1756
1757@example
1758ftp @var{target-machine}
1759lcd /usr/local/@var{target}/lib
1760cd /lib
1761get libc.a
1762cd /usr/lib
1763get libg.a
1764get libm.a
1765quit
1766@end example
1767
1768@noindent
1769The precise set of libraries you'll need, and their locations on
1770the target machine, vary depending on its operating system.
1771
1772@cindex start files
1773Many targets require ``start files'' such as @file{crt0.o} and
1774@file{crtn.o} which are linked into each executable; these too should be
1775placed in @file{/usr/local/@var{target}/lib}. There may be several
1776alternatives for @file{crt0.o}, for use with profiling or other
1777compilation options. Check your target's definition of
1778@code{STARTFILE_SPEC} to find out what start files it uses.
1779Here's an example of copying these files from a target machine:
1780
1781@example
1782ftp @var{target-machine}
1783lcd /usr/local/@var{target}/lib
1784prompt
1785cd /lib
1786mget *crt*.o
1787cd /usr/lib
1788mget *crt*.o
1789quit
1790@end example
1791
1792@node Cross Runtime
1793@subsection @file{libgcc.a} and Cross-Compilers
1794
1795Code compiled by GNU CC uses certain runtime support functions
1796implicitly. Some of these functions can be compiled successfully with
1797GNU CC itself, but a few cannot be. These problem functions are in the
1798source file @file{libgcc1.c}; the library made from them is called
1799@file{libgcc1.a}.
1800
1801When you build a native compiler, these functions are compiled with some
1802other compiler--the one that you use for bootstrapping GNU CC.
1803Presumably it knows how to open code these operations, or else knows how
1804to call the run-time emulation facilities that the machine comes with.
1805But this approach doesn't work for building a cross-compiler. The
1806compiler that you use for building knows about the host system, not the
1807target system.
1808
1809So, when you build a cross-compiler you have to supply a suitable
1810library @file{libgcc1.a} that does the job it is expected to do.
1811
1812To compile @file{libgcc1.c} with the cross-compiler itself does not
1813work. The functions in this file are supposed to implement arithmetic
1814operations that GNU CC does not know how to open code for your target
1815machine. If these functions are compiled with GNU CC itself, they
1816will compile into infinite recursion.
1817
1818On any given target, most of these functions are not needed. If GNU CC
1819can open code an arithmetic operation, it will not call these functions
1820to perform the operation. It is possible that on your target machine,
1821none of these functions is needed. If so, you can supply an empty
1822library as @file{libgcc1.a}.
1823
1824Many targets need library support only for multiplication and division.
1825If you are linking with a library that contains functions for
1826multiplication and division, you can tell GNU CC to call them directly
1827by defining the macros @code{MULSI3_LIBCALL}, and the like. These
1828macros need to be defined in the target description macro file. For
1829some targets, they are defined already. This may be sufficient to
1830avoid the need for libgcc1.a; if so, you can supply an empty library.
1831
1832Some targets do not have floating point instructions; they need other
1833functions in @file{libgcc1.a}, which do floating arithmetic.
1834Recent versions of GNU CC have a file which emulates floating point.
1835With a certain amount of work, you should be able to construct a
1836floating point emulator that can be used as @file{libgcc1.a}. Perhaps
1837future versions will contain code to do this automatically and
1838conveniently. That depends on whether someone wants to implement it.
1839
1840Some embedded targets come with all the necessary @file{libgcc1.a}
1841routines written in C or assembler. These targets build
1842@file{libgcc1.a} automatically and you do not need to do anything
1843special for them. Other embedded targets do not need any
1844@file{libgcc1.a} routines since all the necessary operations are
1845supported by the hardware.
1846
1847If your target system has another C compiler, you can configure GNU CC
1848as a native compiler on that machine, build just @file{libgcc1.a} with
1849@samp{make libgcc1.a} on that machine, and use the resulting file with
1850the cross-compiler. To do this, execute the following on the target
1851machine:
1852
1853@example
1854cd @var{target-build-dir}
1855./configure --host=sparc --target=sun3
1856make libgcc1.a
1857@end example
1858
1859@noindent
1860And then this on the host machine:
1861
1862@example
1863ftp @var{target-machine}
1864binary
1865cd @var{target-build-dir}
1866get libgcc1.a
1867quit
1868@end example
1869
1870Another way to provide the functions you need in @file{libgcc1.a} is to
1871define the appropriate @code{perform_@dots{}} macros for those
1872functions. If these definitions do not use the C arithmetic operators
1873that they are meant to implement, you should be able to compile them
1874with the cross-compiler you are building. (If these definitions already
1875exist for your target file, then you are all set.)
1876
1877To build @file{libgcc1.a} using the perform macros, use
1878@samp{LIBGCC1=libgcc1.a OLDCC=./xgcc} when building the compiler.
1879Otherwise, you should place your replacement library under the name
1880@file{libgcc1.a} in the directory in which you will build the
1881cross-compiler, before you run @code{make}.
1882
1883@node Cross Headers
1884@subsection Cross-Compilers and Header Files
1885
1886If you are cross-compiling a standalone program or a program for an
1887embedded system, then you may not need any header files except the few
1888that are part of GNU CC (and those of your program). However, if you
1889intend to link your program with a standard C library such as
1890@file{libc.a}, then you probably need to compile with the header files
1891that go with the library you use.
1892
1893The GNU C compiler does not come with these files, because (1) they are
1894system-specific, and (2) they belong in a C library, not in a compiler.
1895
1896If the GNU C library supports your target machine, then you can get the
1897header files from there (assuming you actually use the GNU library when
1898you link your program).
1899
1900If your target machine comes with a C compiler, it probably comes with
1901suitable header files also. If you make these files accessible from the host
1902machine, the cross-compiler can use them also.
1903
1904Otherwise, you're on your own in finding header files to use when
1905cross-compiling.
1906
1907When you have found suitable header files, put them in the directory
1908@file{/usr/local/@var{target}/include}, before building the cross
1909compiler. Then installation will run fixincludes properly and install
1910the corrected versions of the header files where the compiler will use
1911them.
1912
1913Provide the header files before you build the cross-compiler, because
1914the build stage actually runs the cross-compiler to produce parts of
1915@file{libgcc.a}. (These are the parts that @emph{can} be compiled with
1916GNU CC.) Some of them need suitable header files.
1917
1918Here's an example showing how to copy the header files from a target
1919machine. On the target machine, do this:
1920
1921@example
1922(cd /usr/include; tar cf - .) > tarfile
1923@end example
1924
1925Then, on the host machine, do this:
1926
1927@example
1928ftp @var{target-machine}
1929lcd /usr/local/@var{target}/include
1930get tarfile
1931quit
1932tar xf tarfile
1933@end example
1934
1935@node Build Cross
1936@subsection Actually Building the Cross-Compiler
1937
1938Now you can proceed just as for compiling a single-machine compiler
1939through the step of building stage 1. If you have not provided some
1940sort of @file{libgcc1.a}, then compilation will give up at the point
1941where it needs that file, printing a suitable error message. If you
1942do provide @file{libgcc1.a}, then building the compiler will automatically
1943compile and link a test program called @file{libgcc1-test}; if you get
1944errors in the linking, it means that not all of the necessary routines
1945in @file{libgcc1.a} are available.
1946
1947You must provide the header file @file{float.h}. One way to do this is
1948to compile @file{enquire} and run it on your target machine. The job of
1949@file{enquire} is to run on the target machine and figure out by
1950experiment the nature of its floating point representation.
1951@file{enquire} records its findings in the header file @file{float.h}.
1952If you can't produce this file by running @file{enquire} on the target
1953machine, then you will need to come up with a suitable @file{float.h} in
1954some other way (or else, avoid using it in your programs).
1955
1956Do not try to build stage 2 for a cross-compiler. It doesn't work to
1957rebuild GNU CC as a cross-compiler using the cross-compiler, because
1958that would produce a program that runs on the target machine, not on the
1959host. For example, if you compile a 386-to-68030 cross-compiler with
1960itself, the result will not be right either for the 386 (because it was
1961compiled into 68030 code) or for the 68030 (because it was configured
1962for a 386 as the host). If you want to compile GNU CC into 68030 code,
1963whether you compile it on a 68030 or with a cross-compiler on a 386, you
1964must specify a 68030 as the host when you configure it.
1965
1966To install the cross-compiler, use @samp{make install}, as usual.
1967
1968@node Sun Install
1969@section Installing GNU CC on the Sun
1970@cindex Sun installation
1971@cindex installing GNU CC on the Sun
1972
e5e809f4 1973On Solaris, do not use the linker or other tools in
2284f91b
DE
1974@file{/usr/ucb} to build GNU CC. Use @code{/usr/ccs/bin}.
1975
e5e809f4
JL
1976If the assembler reports @samp{Error: misaligned data} when bootstrapping,
1977you are probably using an obsolete version of the GNU assembler. Upgrade
1978to the latest version of GNU @code{binutils}, or use the Solaris assembler.
1979
2284f91b
DE
1980Make sure the environment variable @code{FLOAT_OPTION} is not set when
1981you compile @file{libgcc.a}. If this option were set to @code{f68881}
1982when @file{libgcc.a} is compiled, the resulting code would demand to be
1983linked with a special startup file and would not link properly without
1984special pains.
1985
1986@cindex @code{alloca}, for SunOS
1987There is a bug in @code{alloca} in certain versions of the Sun library.
1988To avoid this bug, install the binaries of GNU CC that were compiled by
1989GNU CC. They use @code{alloca} as a built-in function and never the one
1990in the library.
1991
1992Some versions of the Sun compiler crash when compiling GNU CC. The
1993problem is a segmentation fault in cpp. This problem seems to be due to
1994the bulk of data in the environment variables. You may be able to avoid
1995it by using the following command to compile GNU CC with Sun CC:
1996
1997@example
1998make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc"
1999@end example
2000
2001SunOS 4.1.3 and 4.1.3_U1 have bugs that can cause intermittent core
2002dumps when compiling GNU CC. A common symptom is an
2003internal compiler error which does not recur if you run it again.
2004To fix the problem, install Sun recommended patch 100726 (for SunOS 4.1.3)
2005or 101508 (for SunOS 4.1.3_U1), or upgrade to a later SunOS release.
2006
2007@node VMS Install
2008@section Installing GNU CC on VMS
2009@cindex VMS installation
2010@cindex installing GNU CC on VMS
2011
2012The VMS version of GNU CC is distributed in a backup saveset containing
2013both source code and precompiled binaries.
2014
2015To install the @file{gcc} command so you can use the compiler easily, in
2016the same manner as you use the VMS C compiler, you must install the VMS CLD
2017file for GNU CC as follows:
2018
2019@enumerate
2020@item
2021Define the VMS logical names @samp{GNU_CC} and @samp{GNU_CC_INCLUDE}
2022to point to the directories where the GNU CC executables
2023(@file{gcc-cpp.exe}, @file{gcc-cc1.exe}, etc.) and the C include files are
2024kept respectively. This should be done with the commands:@refill
2025
2026@smallexample
2027$ assign /system /translation=concealed -
2028 disk:[gcc.] gnu_cc
2029$ assign /system /translation=concealed -
2030 disk:[gcc.include.] gnu_cc_include
2031@end smallexample
2032
2033@noindent
2034with the appropriate disk and directory names. These commands can be
2035placed in your system startup file so they will be executed whenever
2036the machine is rebooted. You may, if you choose, do this via the
2037@file{GCC_INSTALL.COM} script in the @file{[GCC]} directory.
2038
2039@item
2040Install the @file{GCC} command with the command line:
2041
2042@smallexample
2043$ set command /table=sys$common:[syslib]dcltables -
2044 /output=sys$common:[syslib]dcltables gnu_cc:[000000]gcc
2045$ install replace sys$common:[syslib]dcltables
2046@end smallexample
2047
2048@item
2049To install the help file, do the following:
2050
2051@smallexample
2052$ library/help sys$library:helplib.hlb gcc.hlp
2053@end smallexample
2054
2055@noindent
2056Now you can invoke the compiler with a command like @samp{gcc /verbose
2057file.c}, which is equivalent to the command @samp{gcc -v -c file.c} in
2058Unix.
2059@end enumerate
2060
2061If you wish to use GNU C++ you must first install GNU CC, and then
2062perform the following steps:
2063
2064@enumerate
2065@item
2066Define the VMS logical name @samp{GNU_GXX_INCLUDE} to point to the
2067directory where the preprocessor will search for the C++ header files.
2068This can be done with the command:@refill
2069
2070@smallexample
2071$ assign /system /translation=concealed -
2072 disk:[gcc.gxx_include.] gnu_gxx_include
2073@end smallexample
2074
2075@noindent
2076with the appropriate disk and directory name. If you are going to be
c85f7c16
JL
2077using a C++ runtime library, this is where its install procedure will install
2078its header files.
2284f91b
DE
2079
2080@item
2081Obtain the file @file{gcc-cc1plus.exe}, and place this in the same
2082directory that @file{gcc-cc1.exe} is kept.
2083
2084The GNU C++ compiler can be invoked with a command like @samp{gcc /plus
2085/verbose file.cc}, which is equivalent to the command @samp{g++ -v -c
2086file.cc} in Unix.
2087@end enumerate
2088
2089We try to put corresponding binaries and sources on the VMS distribution
2090tape. But sometimes the binaries will be from an older version than the
2091sources, because we don't always have time to update them. (Use the
2092@samp{/version} option to determine the version number of the binaries and
2093compare it with the source file @file{version.c} to tell whether this is
2094so.) In this case, you should use the binaries you get to recompile the
2095sources. If you must recompile, here is how:
2096
2097@enumerate
2098@item
2099Execute the command procedure @file{vmsconfig.com} to set up the files
2100@file{tm.h}, @file{config.h}, @file{aux-output.c}, and @file{md.}, and
2101to create files @file{tconfig.h} and @file{hconfig.h}. This procedure
2102also creates several linker option files used by @file{make-cc1.com} and
2103a data file used by @file{make-l2.com}.@refill
2104
2105@smallexample
2106$ @@vmsconfig.com
2107@end smallexample
2108
2109@item
2110Setup the logical names and command tables as defined above. In
2111addition, define the VMS logical name @samp{GNU_BISON} to point at the
2112to the directories where the Bison executable is kept. This should be
2113done with the command:@refill
2114
2115@smallexample
2116$ assign /system /translation=concealed -
2117 disk:[bison.] gnu_bison
2118@end smallexample
2119
2120You may, if you choose, use the @file{INSTALL_BISON.COM} script in the
2121@file{[BISON]} directory.
2122
2123@item
2124Install the @samp{BISON} command with the command line:@refill
2125
2126@smallexample
2127$ set command /table=sys$common:[syslib]dcltables -
2128 /output=sys$common:[syslib]dcltables -
2129 gnu_bison:[000000]bison
2130$ install replace sys$common:[syslib]dcltables
2131@end smallexample
2132
2133@item
2134Type @samp{@@make-gcc} to recompile everything (alternatively, submit
2135the file @file{make-gcc.com} to a batch queue). If you wish to build
2136the GNU C++ compiler as well as the GNU CC compiler, you must first edit
2137@file{make-gcc.com} and follow the instructions that appear in the
2138comments.@refill
2139
2140@item
2141In order to use GCC, you need a library of functions which GCC compiled code
2142will call to perform certain tasks, and these functions are defined in the
2143file @file{libgcc2.c}. To compile this you should use the command procedure
2144@file{make-l2.com}, which will generate the library @file{libgcc2.olb}.
2145@file{libgcc2.olb} should be built using the compiler built from
2146the same distribution that @file{libgcc2.c} came from, and
2147@file{make-gcc.com} will automatically do all of this for you.
2148
2149To install the library, use the following commands:@refill
2150
2151@smallexample
2152$ library gnu_cc:[000000]gcclib/delete=(new,eprintf)
2153$ library gnu_cc:[000000]gcclib/delete=L_*
2154$ library libgcc2/extract=*/output=libgcc2.obj
2155$ library gnu_cc:[000000]gcclib libgcc2.obj
2156@end smallexample
2157
2158The first command simply removes old modules that will be replaced with
2159modules from @file{libgcc2} under different module names. The modules
2160@code{new} and @code{eprintf} may not actually be present in your
2161@file{gcclib.olb}---if the VMS librarian complains about those modules
2162not being present, simply ignore the message and continue on with the
2163next command. The second command removes the modules that came from the
2164previous version of the library @file{libgcc2.c}.
2165
2166Whenever you update the compiler on your system, you should also update the
2167library with the above procedure.
2168
2169@item
2170You may wish to build GCC in such a way that no files are written to the
2171directory where the source files reside. An example would be the when
2172the source files are on a read-only disk. In these cases, execute the
2173following DCL commands (substituting your actual path names):
2174
2175@smallexample
2176$ assign dua0:[gcc.build_dir.]/translation=concealed, -
2177 dua1:[gcc.source_dir.]/translation=concealed gcc_build
2178$ set default gcc_build:[000000]
2179@end smallexample
2180
2181@noindent
2182where the directory @file{dua1:[gcc.source_dir]} contains the source
2183code, and the directory @file{dua0:[gcc.build_dir]} is meant to contain
2184all of the generated object files and executables. Once you have done
2185this, you can proceed building GCC as described above. (Keep in mind
2186that @file{gcc_build} is a rooted logical name, and thus the device
2187names in each element of the search list must be an actual physical
2188device name rather than another rooted logical name).
2189
2190@item
2191@strong{If you are building GNU CC with a previous version of GNU CC,
2192you also should check to see that you have the newest version of the
2193assembler}. In particular, GNU CC version 2 treats global constant
2194variables slightly differently from GNU CC version 1, and GAS version
21951.38.1 does not have the patches required to work with GCC version 2.
2196If you use GAS 1.38.1, then @code{extern const} variables will not have
2197the read-only bit set, and the linker will generate warning messages
2198about mismatched psect attributes for these variables. These warning
2199messages are merely a nuisance, and can safely be ignored.
2200
2201If you are compiling with a version of GNU CC older than 1.33, specify
2202@samp{/DEFINE=("inline=")} as an option in all the compilations. This
2203requires editing all the @code{gcc} commands in @file{make-cc1.com}.
2204(The older versions had problems supporting @code{inline}.) Once you
2205have a working 1.33 or newer GNU CC, you can change this file back.
2206
2207@item
2208If you want to build GNU CC with the VAX C compiler, you will need to
2209make minor changes in @file{make-cccp.com} and @file{make-cc1.com}
2210to choose alternate definitions of @code{CC}, @code{CFLAGS}, and
2211@code{LIBS}. See comments in those files. However, you must
2212also have a working version of the GNU assembler (GNU as, aka GAS) as
2213it is used as the back-end for GNU CC to produce binary object modules
2214and is not included in the GNU CC sources. GAS is also needed to
2215compile @file{libgcc2} in order to build @file{gcclib} (see above);
2216@file{make-l2.com} expects to be able to find it operational in
2217@file{gnu_cc:[000000]gnu-as.exe}.
2218
2219To use GNU CC on VMS, you need the VMS driver programs
2220@file{gcc.exe}, @file{gcc.com}, and @file{gcc.cld}. They are
2221distributed with the VMS binaries (@file{gcc-vms}) rather than the
2222GNU CC sources. GAS is also included in @file{gcc-vms}, as is Bison.
2223
2224Once you have successfully built GNU CC with VAX C, you should use the
2225resulting compiler to rebuild itself. Before doing this, be sure to
2226restore the @code{CC}, @code{CFLAGS}, and @code{LIBS} definitions in
2227@file{make-cccp.com} and @file{make-cc1.com}. The second generation
2228compiler will be able to take advantage of many optimizations that must
2229be suppressed when building with other compilers.
2230@end enumerate
2231
2232Under previous versions of GNU CC, the generated code would occasionally
2233give strange results when linked with the sharable @file{VAXCRTL} library.
2234Now this should work.
2235
2236Even with this version, however, GNU CC itself should not be linked with
2237the sharable @file{VAXCRTL}. The version of @code{qsort} in
2238@file{VAXCRTL} has a bug (known to be present in VMS versions V4.6
2239through V5.5) which causes the compiler to fail.
2240
2241The executables are generated by @file{make-cc1.com} and
2242@file{make-cccp.com} use the object library version of @file{VAXCRTL} in
2243order to make use of the @code{qsort} routine in @file{gcclib.olb}. If
2244you wish to link the compiler executables with the shareable image
2245version of @file{VAXCRTL}, you should edit the file @file{tm.h} (created
2246by @file{vmsconfig.com}) to define the macro @code{QSORT_WORKAROUND}.
2247
2248@code{QSORT_WORKAROUND} is always defined when GNU CC is compiled with
2249VAX C, to avoid a problem in case @file{gcclib.olb} is not yet
2250available.
2251
2252@node Collect2
2253@section @code{collect2}
2254
23851576
JL
2255GNU CC uses a utility called @code{collect2} on nearly all systems to arrange
2256to call various initialization functions at start time.
2284f91b
DE
2257
2258The program @code{collect2} works by linking the program once and
2259looking through the linker output file for symbols with particular names
2260indicating they are constructor functions. If it finds any, it
2261creates a new temporary @samp{.c} file containing a table of them,
2262compiles it, and links the program a second time including that file.
2263
2264@findex __main
2265@cindex constructors, automatic calls
2266The actual calls to the constructors are carried out by a subroutine
2267called @code{__main}, which is called (automatically) at the beginning
2268of the body of @code{main} (provided @code{main} was compiled with GNU
2269CC). Calling @code{__main} is necessary, even when compiling C code, to
2270allow linking C and C++ object code together. (If you use
2271@samp{-nostdlib}, you get an unresolved reference to @code{__main},
2272since it's defined in the standard GCC library. Include @samp{-lgcc} at
2273the end of your compiler command line to resolve this reference.)
2274
2275The program @code{collect2} is installed as @code{ld} in the directory
2276where the passes of the compiler are installed. When @code{collect2}
2277needs to find the @emph{real} @code{ld}, it tries the following file
2278names:
2279
2280@itemize @bullet
2281@item
2282@file{real-ld} in the directories listed in the compiler's search
2283directories.
2284
2285@item
2286@file{real-ld} in the directories listed in the environment variable
2287@code{PATH}.
2288
2289@item
2290The file specified in the @code{REAL_LD_FILE_NAME} configuration macro,
2291if specified.
2292
2293@item
2294@file{ld} in the compiler's search directories, except that
2295@code{collect2} will not execute itself recursively.
2296
2297@item
2298@file{ld} in @code{PATH}.
2299@end itemize
2300
2301``The compiler's search directories'' means all the directories where
2302@code{gcc} searches for passes of the compiler. This includes
2303directories that you specify with @samp{-B}.
2304
2305Cross-compilers search a little differently:
2306
2307@itemize @bullet
2308@item
2309@file{real-ld} in the compiler's search directories.
2310
2311@item
2312@file{@var{target}-real-ld} in @code{PATH}.
2313
2314@item
2315The file specified in the @code{REAL_LD_FILE_NAME} configuration macro,
2316if specified.
2317
2318@item
2319@file{ld} in the compiler's search directories.
2320
2321@item
2322@file{@var{target}-ld} in @code{PATH}.
2323@end itemize
2324
2325@code{collect2} explicitly avoids running @code{ld} using the file name
2326under which @code{collect2} itself was invoked. In fact, it remembers
2327up a list of such names---in case one copy of @code{collect2} finds
2328another copy (or version) of @code{collect2} installed as @code{ld} in a
2329second place in the search path.
2330
2331@code{collect2} searches for the utilities @code{nm} and @code{strip}
2332using the same algorithm as above for @code{ld}.
2333
2334@node Header Dirs
2335@section Standard Header File Directories
2336
2337@code{GCC_INCLUDE_DIR} means the same thing for native and cross. It is
2338where GNU CC stores its private include files, and also where GNU CC
2339stores the fixed include files. A cross compiled GNU CC runs
2340@code{fixincludes} on the header files in @file{$(tooldir)/include}.
2341(If the cross compilation header files need to be fixed, they must be
2342installed before GNU CC is built. If the cross compilation header files
2343are already suitable for ANSI C and GNU CC, nothing special need be
2344done).
2345
2346@code{GPLUS_INCLUDE_DIR} means the same thing for native and cross. It
c85f7c16 2347is where @code{g++} looks first for header files. The C++ library
2284f91b
DE
2348installs only target independent header files in that directory.
2349
2350@code{LOCAL_INCLUDE_DIR} is used only for a native compiler. It is
2351normally @file{/usr/local/include}. GNU CC searches this directory so
2352that users can install header files in @file{/usr/local/include}.
2353
2354@code{CROSS_INCLUDE_DIR} is used only for a cross compiler. GNU CC
2355doesn't install anything there.
2356
2357@code{TOOL_INCLUDE_DIR} is used for both native and cross compilers. It
2358is the place for other packages to install header files that GNU CC will
2359use. For a cross-compiler, this is the equivalent of
2360@file{/usr/include}. When you build a cross-compiler,
2361@code{fixincludes} processes any header files in this directory.
This page took 0.359486 seconds and 5 git commands to generate.