OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [INSTALL/] [specific.html] - Blame information for rev 22

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 jlechner
<html lang="en">
2
<head>
3
<title>Host/Target specific installation notes for GCC</title>
4
<meta http-equiv="Content-Type" content="text/html">
5
<meta name="description" content="Host/Target specific installation notes for GCC">
6
<meta name="generator" content="makeinfo 4.8">
7
<link title="Top" rel="top" href="#Top">
8
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9
<!--
10
Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
11
1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
12
 
13
   Permission is granted to copy, distribute and/or modify this document
14
under the terms of the GNU Free Documentation License, Version 1.2 or
15
any later version published by the Free Software Foundation; with no
16
Invariant Sections, the Front-Cover texts being (a) (see below), and
17
with the Back-Cover Texts being (b) (see below).  A copy of the
18
license is included in the section entitled "GNU Free Documentation License".
19
 
20
(a) The FSF's Front-Cover Text is:
21
 
22
     A GNU Manual
23
 
24
(b) The FSF's Back-Cover Text is:
25
 
26
     You have freedom to copy and modify this GNU Manual, like GNU
27
     software.  Copies published by the Free Software Foundation raise
28
     funds for GNU development.-->
29
<meta http-equiv="Content-Style-Type" content="text/css">
30
<style type="text/css"><!--
31
  pre.display { font-family:inherit }
32
  pre.format  { font-family:inherit }
33
  pre.smalldisplay { font-family:inherit; font-size:smaller }
34
  pre.smallformat  { font-family:inherit; font-size:smaller }
35
  pre.smallexample { font-size:smaller }
36
  pre.smalllisp    { font-size:smaller }
37
  span.sc    { font-variant:small-caps }
38
  span.roman { font-family:serif; font-weight:normal; }
39
  span.sansserif { font-family:sans-serif; font-weight:normal; }
40
--></style>
41
</head>
42
<body>
43
<h1 class="settitle">Host/Target specific installation notes for GCC</h1>
44
<a name="index-Specific-1"></a><a name="index-Specific-installation-notes-2"></a><a name="index-Target-specific-installation-3"></a><a name="index-Host-specific-installation-4"></a><a name="index-Target-specific-installation-notes-5"></a>
45
Please read this document carefully <em>before</em> installing the
46
GNU Compiler Collection on your machine.
47
 
48
     <ul>
49
<li><a href="#alpha-x-x">alpha*-*-*</a>
50
<li><a href="#alpha-dec-osf">alpha*-dec-osf*</a>
51
<li><a href="#alphaev5-cray-unicosmk">alphaev5-cray-unicosmk*</a>
52
<li><a href="#arc-x-elf">arc-*-elf</a>
53
<li><a href="#arm-x-elf">arm-*-elf</a>
54
<a href="#arm-x-coff">arm-*-coff</a>
55
<a href="#arm-x-aout">arm-*-aout</a>
56
<li><a href="#xscale-x-x">xscale-*-*</a>
57
<li><a href="#avr">avr</a>
58
<li><a href="#bfin">Blackfin</a>
59
<li><a href="#c4x">c4x</a>
60
<li><a href="#dos">DOS</a>
61
<li><a href="#x-x-freebsd">*-*-freebsd*</a>
62
<li><a href="#h8300-hms">h8300-hms</a>
63
<li><a href="#hppa-hp-hpux">hppa*-hp-hpux*</a>
64
<li><a href="#hppa-hp-hpux10">hppa*-hp-hpux10</a>
65
<li><a href="#hppa-hp-hpux11">hppa*-hp-hpux11</a>
66
<li><a href="#x-x-linux-gnu">*-*-linux-gnu</a>
67
<li><a href="#ix86-x-linuxaout">i?86-*-linux*aout</a>
68
<li><a href="#ix86-x-linux">i?86-*-linux*</a>
69
<li><a href="#ix86-x-sco32v5">i?86-*-sco3.2v5*</a>
70
<li><a href="#ix86-x-solaris210">i?86-*-solaris2.10</a>
71
<li><a href="#ix86-x-udk">i?86-*-udk</a>
72
<li><a href="#ia64-x-linux">ia64-*-linux</a>
73
<li><a href="#ia64-x-hpux">ia64-*-hpux*</a>
74
<li><a href="#x-ibm-aix">*-ibm-aix*</a>
75
<li><a href="#iq2000-x-elf">iq2000-*-elf</a>
76
<li><a href="#m32c-x-elf">m32c-*-elf</a>
77
<li><a href="#m32r-x-elf">m32r-*-elf</a>
78
<li><a href="#m6811-elf">m6811-elf</a>
79
<li><a href="#m6812-elf">m6812-elf</a>
80
<li><a href="#m68k-hp-hpux">m68k-hp-hpux</a>
81
<li><a href="#mips-x-x">mips-*-*</a>
82
<li><a href="#mips-sgi-irix5">mips-sgi-irix5</a>
83
<li><a href="#mips-sgi-irix6">mips-sgi-irix6</a>
84
<li><a href="#powerpc-x-x">powerpc*-*-*</a> powerpc-*-sysv4
85
<li><a href="#powerpc-x-darwin">powerpc-*-darwin*</a>
86
<li><a href="#powerpc-x-elf">powerpc-*-elf</a> powerpc-*-sysv4
87
<li><a href="#powerpc-x-linux-gnu">powerpc*-*-linux-gnu*</a>
88
<li><a href="#powerpc-x-netbsd">powerpc-*-netbsd*</a>
89
<li><a href="#powerpc-x-eabisim">powerpc-*-eabisim</a>
90
<li><a href="#powerpc-x-eabi">powerpc-*-eabi</a>
91
<li><a href="#powerpcle-x-elf">powerpcle-*-elf</a> powerpcle-*-sysv4
92
<li><a href="#powerpcle-x-eabisim">powerpcle-*-eabisim</a>
93
<li><a href="#powerpcle-x-eabi">powerpcle-*-eabi</a>
94
<li><a href="#s390-x-linux">s390-*-linux*</a>
95
<li><a href="#s390x-x-linux">s390x-*-linux*</a>
96
<li><a href="#s390x-ibm-tpf">s390x-ibm-tpf*</a>
97
<li><a href="#x-x-solaris2">*-*-solaris2*</a>
98
<li><a href="#sparc-sun-solaris2">sparc-sun-solaris2*</a>
99
<li><a href="#sparc-sun-solaris27">sparc-sun-solaris2.7</a>
100
<li><a href="#sparc-x-linux">sparc-*-linux*</a>
101
<li><a href="#sparc64-x-solaris2">sparc64-*-solaris2*</a>
102
<li><a href="#sparcv9-x-solaris2">sparcv9-*-solaris2*</a>
103
<li><a href="#x-x-sysv">*-*-sysv*</a>
104
<li><a href="#vax-dec-ultrix">vax-dec-ultrix</a>
105
<li><a href="#x-x-vxworks">*-*-vxworks*</a>
106
<li><a href="#x86-64-x-x">x86_64-*-*</a> amd64-*-*
107
<li><a href="#xtensa-x-elf">xtensa-*-elf</a>
108
<li><a href="#xtensa-x-linux">xtensa-*-linux*</a>
109
<li><a href="#windows">Microsoft Windows</a>
110
<li><a href="#os2">OS/2</a>
111
<li><a href="#older">Older systems</a>
112
</ul>
113
 
114
     <ul>
115
<li><a href="#elf">all ELF targets</a> (SVR4, Solaris 2, etc.)
116
</ul>
117
 
118
   <p><!-- -------- host/target specific issues start here ---------------- -->
119
<hr />
120
 
121
<h3 class="heading"><a name="TOC0"></a><a name="alpha_002dx_002dx"></a>alpha*-*-*</h3>
122
 
123
<p>This section contains general configuration information for all
124
alpha-based platforms using ELF (in particular, ignore this section for
125
DEC OSF/1, Digital UNIX and Tru64 UNIX).  In addition to reading this
126
section, please read all other sections that match your target.
127
 
128
   <p>We require binutils 2.11.2 or newer.
129
Previous binutils releases had a number of problems with DWARF 2
130
debugging information, not the least of which is incorrect linking of
131
shared libraries.
132
 
133
   <p><hr />
134
 
135
<h3 class="heading"><a name="TOC1"></a><a name="alpha_002ddec_002dosf"></a>alpha*-dec-osf*</h3>
136
 
137
<p>Systems using processors that implement the DEC Alpha architecture and
138
are running the DEC/Compaq Unix (DEC OSF/1, Digital UNIX, or Compaq
139
Tru64 UNIX) operating system, for example the DEC Alpha AXP systems.
140
 
141
   <p>As of GCC 3.2, versions before <code>alpha*-dec-osf4</code> are no longer
142
supported.  (These are the versions which identify themselves as DEC
143
OSF/1.)
144
 
145
   <p>In Digital Unix V4.0, virtual memory exhausted bootstrap failures
146
may be fixed by configuring with <samp><span class="option">--with-gc=simple</span></samp>,
147
reconfiguring Kernel Virtual Memory and Swap parameters
148
per the <samp><span class="command">/usr/sbin/sys_check</span></samp> Tuning Suggestions,
149
or applying the patch in
150
<a href="http://gcc.gnu.org/ml/gcc/2002-08/msg00822.html">http://gcc.gnu.org/ml/gcc/2002-08/msg00822.html</a>.
151
 
152
   <p>In Tru64 UNIX V5.1, Compaq introduced a new assembler that does not
153
currently (2001-06-13) work with <samp><span class="command">mips-tfile</span></samp>.  As a workaround,
154
we need to use the old assembler, invoked via the barely documented
155
<samp><span class="option">-oldas</span></samp> option.  To bootstrap GCC, you either need to use the
156
Compaq C Compiler:
157
 
158
<pre class="smallexample">        % CC=cc <var>srcdir</var>/configure [<var>options</var>] [<var>target</var>]
159
</pre>
160
   <p>or you can use a copy of GCC 2.95.3 or higher built on Tru64 UNIX V4.0:
161
 
162
<pre class="smallexample">        % CC=gcc -Wa,-oldas <var>srcdir</var>/configure [<var>options</var>] [<var>target</var>]
163
</pre>
164
   <p>As of GNU binutils 2.11.2, neither GNU <samp><span class="command">as</span></samp> nor GNU <samp><span class="command">ld</span></samp>
165
are supported on Tru64 UNIX, so you must not configure GCC with
166
<samp><span class="option">--with-gnu-as</span></samp> or <samp><span class="option">--with-gnu-ld</span></samp>.
167
 
168
   <p>GCC writes a `<samp><span class="samp">.verstamp</span></samp>' directive to the assembler output file
169
unless it is built as a cross-compiler.  It gets the version to use from
170
the system header file <samp><span class="file">/usr/include/stamp.h</span></samp>.  If you install a
171
new version of DEC Unix, you should rebuild GCC to pick up the new version
172
stamp.
173
 
174
   <p>Note that since the Alpha is a 64-bit architecture, cross-compilers from
175
32-bit machines will not generate code as efficient as that generated
176
when the compiler is running on a 64-bit machine because many
177
optimizations that depend on being able to represent a word on the
178
target in an integral value on the host cannot be performed.  Building
179
cross-compilers on the Alpha for 32-bit machines has only been tested in
180
a few cases and may not work properly.
181
 
182
   <p>`<samp><span class="samp">make compare</span></samp>' may fail on old versions of DEC Unix unless you add
183
<samp><span class="option">-save-temps</span></samp> to <code>CFLAGS</code>.  On these systems, the name of the
184
assembler input file is stored in the object file, and that makes
185
comparison fail if it differs between the <code>stage1</code> and
186
<code>stage2</code> compilations.  The option <samp><span class="option">-save-temps</span></samp> forces a
187
fixed name to be used for the assembler input file, instead of a
188
randomly chosen name in <samp><span class="file">/tmp</span></samp>.  Do not add <samp><span class="option">-save-temps</span></samp>
189
unless the comparisons fail without that option.  If you add
190
<samp><span class="option">-save-temps</span></samp>, you will have to manually delete the `<samp><span class="samp">.i</span></samp>' and
191
`<samp><span class="samp">.s</span></samp>' files after each series of compilations.
192
 
193
   <p>GCC now supports both the native (ECOFF) debugging format used by DBX
194
and GDB and an encapsulated STABS format for use only with GDB.  See the
195
discussion of the <samp><span class="option">--with-stabs</span></samp> option of <samp><span class="file">configure</span></samp> above
196
for more information on these formats and how to select them.
197
 
198
   <p>There is a bug in DEC's assembler that produces incorrect line numbers
199
for ECOFF format when the `<samp><span class="samp">.align</span></samp>' directive is used.  To work
200
around this problem, GCC will not emit such alignment directives
201
while writing ECOFF format debugging information even if optimization is
202
being performed.  Unfortunately, this has the very undesirable
203
side-effect that code addresses when <samp><span class="option">-O</span></samp> is specified are
204
different depending on whether or not <samp><span class="option">-g</span></samp> is also specified.
205
 
206
   <p>To avoid this behavior, specify <samp><span class="option">-gstabs+</span></samp> and use GDB instead of
207
DBX.  DEC is now aware of this problem with the assembler and hopes to
208
provide a fix shortly.
209
 
210
   <p><hr />
211
 
212
<h3 class="heading"><a name="TOC2"></a><a name="alphaev5_002dcray_002dunicosmk"></a>alphaev5-cray-unicosmk*</h3>
213
 
214
<p>Cray T3E systems running Unicos/Mk.
215
 
216
   <p>This port is incomplete and has many known bugs.  We hope to improve the
217
support for this target soon.  Currently, only the C front end is supported,
218
and it is not possible to build parallel applications.  Cray modules are not
219
supported; in particular, Craylibs are assumed to be in
220
<samp><span class="file">/opt/ctl/craylibs/craylibs</span></samp>.
221
 
222
   <p>You absolutely <strong>must</strong> use GNU make on this platform.  Also, you
223
need to tell GCC where to find the assembler and the linker.  The
224
simplest way to do so is by providing <samp><span class="option">--with-as</span></samp> and
225
<samp><span class="option">--with-ld</span></samp> to <samp><span class="file">configure</span></samp>, e.g.
226
 
227
<pre class="smallexample">         configure --with-as=/opt/ctl/bin/cam --with-ld=/opt/ctl/bin/cld \
228
           --enable-languages=c
229
</pre>
230
   <p>The comparison test during `<samp><span class="samp">make bootstrap</span></samp>' fails on Unicos/Mk
231
because the assembler inserts timestamps into object files.  You should
232
be able to work around this by doing `<samp><span class="samp">make all</span></samp>' after getting this
233
failure.
234
 
235
   <p><hr />
236
 
237
<h3 class="heading"><a name="TOC3"></a><a name="arc_002dx_002delf"></a>arc-*-elf</h3>
238
 
239
<p>Argonaut ARC processor.
240
This configuration is intended for embedded systems.
241
 
242
   <p><hr />
243
 
244
<h3 class="heading"><a name="TOC4"></a><a name="arm_002dx_002delf"></a>arm-*-elf</h3>
245
 
246
<h3 class="heading"><a name="TOC5"></a><a name="xscale_002dx_002dx"></a>xscale-*-*</h3>
247
 
248
<p>ARM-family processors.  Subtargets that use the ELF object format
249
require GNU binutils 2.13 or newer.  Such subtargets include:
250
<code>arm-*-freebsd</code>, <code>arm-*-netbsdelf</code>, <code>arm-*-*linux</code>,
251
<code>arm-*-rtems</code> and <code>arm-*-kaos</code>.
252
 
253
   <p><hr />
254
 
255
<h3 class="heading"><a name="TOC6"></a><a name="arm_002dx_002dcoff"></a>arm-*-coff</h3>
256
 
257
<p>ARM-family processors.  Note that there are two different varieties
258
of PE format subtarget supported: <code>arm-wince-pe</code> and
259
<code>arm-pe</code> as well as a standard COFF target <code>arm-*-coff</code>.
260
 
261
   <p><hr />
262
 
263
<h3 class="heading"><a name="TOC7"></a><a name="arm_002dx_002daout"></a>arm-*-aout</h3>
264
 
265
<p>ARM-family processors.  These targets support the AOUT file format:
266
<code>arm-*-aout</code>, <code>arm-*-netbsd</code>.
267
 
268
   <p><hr />
269
 
270
<h3 class="heading"><a name="TOC8"></a><a name="avr"></a>avr</h3>
271
 
272
<p>ATMEL AVR-family micro controllers.  These are used in embedded
273
applications.  There are no standard Unix configurations.
274
See &ldquo;AVR Options&rdquo; in the main manual
275
for the list of supported MCU types.
276
 
277
   <p>Use `<samp><span class="samp">configure --target=avr --enable-languages="c"</span></samp>' to configure GCC.
278
 
279
   <p>Further installation notes and other useful information about AVR tools
280
can also be obtained from:
281
 
282
     <ul>
283
<li><a href="http://www.nongnu.org/avr/">http://www.nongnu.org/avr/</a>
284
<li><a href="http://home.overta.ru/users/denisc/">http://home.overta.ru/users/denisc/</a>
285
<li><a href="http://www.amelek.gda.pl/avr/">http://www.amelek.gda.pl/avr/</a>
286
</ul>
287
 
288
   <p>We <em>strongly</em> recommend using binutils 2.13 or newer.
289
 
290
   <p>The following error:
291
<pre class="smallexample">       Error: register required
292
</pre>
293
   <p>indicates that you should upgrade to a newer version of the binutils.
294
 
295
   <p><hr />
296
 
297
<h3 class="heading"><a name="TOC9"></a><a name="bfin"></a>Blackfin</h3>
298
 
299
<p>The Blackfin processor, an Analog Devices DSP.
300
See &ldquo;Blackfin Options&rdquo; in the main manual
301
 
302
   <p>More information, and a version of binutils with support for this processor,
303
is available at <a href="http://blackfin.uclinux.org">http://blackfin.uclinux.org</a>
304
 
305
   <p><hr />
306
 
307
<h3 class="heading"><a name="TOC10"></a><a name="c4x"></a>c4x</h3>
308
 
309
<p>Texas Instruments TMS320C3x and TMS320C4x Floating Point Digital Signal
310
Processors.  These are used in embedded applications.  There are no
311
standard Unix configurations.
312
See &ldquo;TMS320C3x/C4x Options&rdquo; in the main manual
313
for the list of supported MCU types.
314
 
315
   <p>GCC can be configured as a cross compiler for both the C3x and C4x
316
architectures on the same system.  Use `<samp><span class="samp">configure --target=c4x
317
--enable-languages="c,c++"</span></samp>' to configure.
318
 
319
   <p>Further installation notes and other useful information about C4x tools
320
can also be obtained from:
321
 
322
     <ul>
323
<li><a href="http://www.elec.canterbury.ac.nz/c4x/">http://www.elec.canterbury.ac.nz/c4x/</a>
324
</ul>
325
 
326
   <p><hr />
327
 
328
<h3 class="heading"><a name="TOC11"></a><a name="cris"></a>CRIS</h3>
329
 
330
<p>CRIS is the CPU architecture in Axis Communications ETRAX system-on-a-chip
331
series.  These are used in embedded applications.
332
 
333
   <p>See &ldquo;CRIS Options&rdquo; in the main manual
334
for a list of CRIS-specific options.
335
 
336
   <p>There are a few different CRIS targets:
337
     <dl>
338
<dt><code>cris-axis-aout</code><dd>Old target.  Includes a multilib for the `<samp><span class="samp">elinux</span></samp>' a.out-based
339
target.  No multilibs for newer architecture variants.
340
<br><dt><code>cris-axis-elf</code><dd>Mainly for monolithic embedded systems.  Includes a multilib for the
341
`<samp><span class="samp">v10</span></samp>' core used in `<samp><span class="samp">ETRAX 100 LX</span></samp>'.
342
<br><dt><code>cris-axis-linux-gnu</code><dd>A GNU/Linux port for the CRIS architecture, currently targeting
343
`<samp><span class="samp">ETRAX 100 LX</span></samp>' by default.
344
</dl>
345
 
346
   <p>For <code>cris-axis-aout</code> and <code>cris-axis-elf</code> you need binutils 2.11
347
or newer.  For <code>cris-axis-linux-gnu</code> you need binutils 2.12 or newer.
348
 
349
   <p>Pre-packaged tools can be obtained from
350
<a href="ftp://ftp.axis.com/pub/axis/tools/cris/compiler-kit/">ftp://ftp.axis.com/pub/axis/tools/cris/compiler-kit/</a>.  More
351
information about this platform is available at
352
<a href="http://developer.axis.com/">http://developer.axis.com/</a>.
353
 
354
   <p><hr />
355
 
356
<h3 class="heading"><a name="TOC12"></a><a name="crx"></a>CRX</h3>
357
 
358
<p>The CRX CompactRISC architecture is a low-power 32-bit architecture with
359
fast context switching and architectural extensibility features.
360
 
361
   <p>See &ldquo;CRX Options&rdquo; in the main manual for a list of CRX-specific options.
362
 
363
   <p>Use `<samp><span class="samp">configure --target=crx-elf --enable-languages=c,c++</span></samp>' to configure
364
GCC for building a CRX cross-compiler. The option `<samp><span class="samp">--target=crx-elf</span></samp>'
365
is also used to build the `<samp><span class="samp">newlib</span></samp>' C library for CRX.
366
 
367
   <p>It is also possible to build libstdc++-v3 for the CRX architecture. This
368
needs to be done in a separate step with the following configure settings:
369
`<samp><span class="samp">gcc/libstdc++-v3/configure --host=crx-elf --with-newlib
370
--enable-sjlj-exceptions --enable-cxx-flags='-fexceptions -frtti'</span></samp>'
371
 
372
   <p><hr />
373
 
374
<h3 class="heading"><a name="TOC13"></a><a name="dos"></a>DOS</h3>
375
 
376
<p>Please have a look at the <a href="binaries.html">binaries page</a>.
377
 
378
   <p>You cannot install GCC by itself on MSDOS; it will not compile under
379
any MSDOS compiler except itself.  You need to get the complete
380
compilation package DJGPP, which includes binaries as well as sources,
381
and includes all the necessary compilation tools and libraries.
382
 
383
   <p><hr />
384
 
385
<h3 class="heading"><a name="TOC14"></a><a name="x_002dx_002dfreebsd"></a>*-*-freebsd*</h3>
386
 
387
<p>The version of binutils installed in <samp><span class="file">/usr/bin</span></samp> probably works with
388
this release of GCC.  However, on FreeBSD 4, bootstrapping against the
389
latest FSF binutils is known to improve overall testsuite results; and,
390
on FreeBSD/alpha, using binutils 2.14 or later is required to build libjava.
391
 
392
   <p>Support for FreeBSD 1 was discontinued in GCC 3.2.
393
 
394
   <p>Support for FreeBSD 2 will be discontinued after GCC 3.4.  The
395
following was true for GCC 3.1 but the current status is unknown.
396
For FreeBSD 2 or any mutant a.out versions of FreeBSD 3: All
397
configuration support and files as shipped with GCC 2.95 are still in
398
place.  FreeBSD 2.2.7 has been known to bootstrap completely; however,
399
it is unknown which version of binutils was used (it is assumed that it
400
was the system copy in <samp><span class="file">/usr/bin</span></samp>) and C++ EH failures were noted.
401
 
402
   <p>For FreeBSD using the ELF file format: DWARF 2 debugging is now the
403
default for all CPU architectures.  It had been the default on
404
FreeBSD/alpha since its inception.  You may use <samp><span class="option">-gstabs</span></samp> instead
405
of <samp><span class="option">-g</span></samp>, if you really want the old debugging format.  There are
406
no known issues with mixing object files and libraries with different
407
debugging formats.  Otherwise, this release of GCC should now match more
408
of the configuration used in the stock FreeBSD configuration of GCC.  In
409
particular, <samp><span class="option">--enable-threads</span></samp> is now configured by default.
410
However, as a general user, do not attempt to replace the system
411
compiler with this release.  Known to bootstrap and check with good
412
results on FreeBSD 4.9-STABLE and 5-CURRENT.  In the past, known to
413
bootstrap and check with good results on FreeBSD 3.0, 3.4, 4.0, 4.2,
414
4.3, 4.4, 4.5, 4.8-STABLE.
415
 
416
   <p>In principle, <samp><span class="option">--enable-threads</span></samp> is now compatible with
417
<samp><span class="option">--enable-libgcj</span></samp> on FreeBSD.  However, it has only been built
418
and tested on `<samp><span class="samp">i386-*-freebsd[45]</span></samp>' and `<samp><span class="samp">alpha-*-freebsd[45]</span></samp>'.
419
The static
420
library may be incorrectly built (symbols are missing at link time).
421
There is a rare timing-based startup hang (probably involves an
422
assumption about the thread library).  Multi-threaded boehm-gc (required for
423
libjava) exposes severe threaded signal-handling bugs on FreeBSD before
424
4.5-RELEASE.  Other CPU architectures
425
supported by FreeBSD will require additional configuration tuning in, at
426
the very least, both boehm-gc and libffi.
427
 
428
   <p>Shared <samp><span class="file">libgcc_s.so</span></samp> is now built and installed by default.
429
 
430
   <p><hr />
431
 
432
<h3 class="heading"><a name="TOC15"></a><a name="h8300_002dhms"></a>h8300-hms</h3>
433
 
434
<p>Renesas H8/300 series of processors.
435
 
436
   <p>Please have a look at the <a href="binaries.html">binaries page</a>.
437
 
438
   <p>The calling convention and structure layout has changed in release 2.6.
439
All code must be recompiled.  The calling convention now passes the
440
first three arguments in function calls in registers.  Structures are no
441
longer a multiple of 2 bytes.
442
 
443
   <p><hr />
444
 
445
<h3 class="heading"><a name="TOC16"></a><a name="hppa_002dhp_002dhpux"></a>hppa*-hp-hpux*</h3>
446
 
447
<p>Support for HP-UX version 9 and older was discontinued in GCC 3.4.
448
 
449
   <p>We require using gas/binutils on all hppa platforms;
450
you may encounter a variety of problems if you try to use the HP assembler.
451
 
452
   <p>Specifically, <samp><span class="option">-g</span></samp> does not work on HP-UX (since that system
453
uses a peculiar debugging format which GCC does not know about), unless
454
you use GAS and GDB.  It may be helpful to configure GCC with the
455
<a href="./configure.html#with-gnu-as"><samp><span class="option">--with-gnu-as</span></samp></a> and
456
<samp><span class="option">--with-as=...</span></samp> options to ensure that GCC can find GAS.
457
 
458
   <p>If you wish to use the pa-risc 2.0 architecture support with a 32-bit
459
runtime, you must use gas/binutils 2.11 or newer.
460
 
461
   <p>There are two default scheduling models for instructions.  These are
462
PROCESSOR_7100LC and PROCESSOR_8000.  They are selected from the pa-risc
463
architecture specified for the target machine when configuring.
464
PROCESSOR_8000 is the default.  PROCESSOR_7100LC is selected when
465
the target is a `<samp><span class="samp">hppa1*</span></samp>' machine.
466
 
467
   <p>The PROCESSOR_8000 model is not well suited to older processors.  Thus,
468
it is important to completely specify the machine architecture when
469
configuring if you want a model other than PROCESSOR_8000.  The macro
470
TARGET_SCHED_DEFAULT can be defined in BOOT_CFLAGS if a different
471
default scheduling model is desired.
472
 
473
   <p>As of GCC 4.0, GCC uses the UNIX 95 namespace for HP-UX 10.10
474
through 11.00, and the UNIX 98 namespace for HP-UX 11.11 and later.
475
This namespace change might cause problems when bootstrapping with
476
an earlier version of GCC or the HP compiler as essentially the same
477
namespace is required for an entire build.  This problem can be avoided
478
in a number of ways.  With HP cc, <samp><span class="env">UNIX_STD</span></samp> can be set to `<samp><span class="samp">95</span></samp>'
479
or `<samp><span class="samp">98</span></samp>'.  Another way is to add an appropriate set of predefines
480
to <samp><span class="env">CC</span></samp>.  The description for the <samp><span class="option">munix=</span></samp> option contains
481
a list of the predefines used with each standard.
482
 
483
   <p>As of GCC 4.1, <samp><span class="env">DWARF2</span></samp> exception handling is available on HP-UX.
484
It is now the default.  This exposed a bug in the handling of data
485
relocations in the GAS assembler.  The handling of 64-bit data relocations
486
was seriously broken, affecting debugging and exception support on all
487
`<samp><span class="samp">hppa64-*-*</span></samp>' targets.  Under some circumstances, 32-bit data relocations
488
could also be handled incorrectly.  This problem is fixed in GAS version
489
2.16.91 20051125.
490
 
491
   <p>GCC versions prior to 4.1 incorrectly passed and returned complex
492
values.  They are now passed in the same manner as aggregates.
493
 
494
   <p>More specific information to `<samp><span class="samp">hppa*-hp-hpux*</span></samp>' targets follows.
495
 
496
   <p><hr />
497
 
498
<h3 class="heading"><a name="TOC17"></a><a name="hppa_002dhp_002dhpux10"></a>hppa*-hp-hpux10</h3>
499
 
500
<p>For hpux10.20, we <em>highly</em> recommend you pick up the latest sed patch
501
<code>PHCO_19798</code> from HP.  HP has two sites which provide patches free of
502
charge:
503
 
504
     <ul>
505
<li><a href="http://us.itrc.hp.com/service/home/home.do">US, Canada, Asia-Pacific, and
506
Latin-America</a><li><a href="http://europe.itrc.hp.com/service/home/home.do">http://europe.itrc.hp.com/service/home/home.do</a> Europe.
507
</ul>
508
 
509
   <p>The HP assembler on these systems has some problems.  Most notably the
510
assembler inserts timestamps into each object file it creates, causing
511
the 3-stage comparison test to fail during a `<samp><span class="samp">make bootstrap</span></samp>'.
512
You should be able to continue by saying `<samp><span class="samp">make all</span></samp>' after getting
513
the failure from `<samp><span class="samp">make bootstrap</span></samp>'.
514
 
515
   <p>GCC 4.0 requires CVS binutils as of April 28, 2004 or later.  Earlier
516
versions require binutils 2.8 or later.
517
 
518
   <p>The C++ ABI has changed incompatibly in GCC 4.0.  COMDAT subspaces are
519
used for one-only code and data.  This resolves many of the previous
520
problems in using C++ on this target.  However, the ABI is not compatible
521
with the one implemented under HP-UX 11 using secondary definitions.
522
 
523
   <p><hr />
524
 
525
<h3 class="heading"><a name="TOC18"></a><a name="hppa_002dhp_002dhpux11"></a>hppa*-hp-hpux11</h3>
526
 
527
<p>GCC 3.0 and up support HP-UX 11.  GCC 2.95.x is not supported and cannot
528
be used to compile GCC 3.0 and up.
529
 
530
   <p>Refer to <a href="binaries.html">binaries</a> for information about obtaining
531
precompiled GCC binaries for HP-UX.  Precompiled binaries must be obtained
532
to build the Ada language as it can't be bootstrapped using C.  Ada is
533
only available for the 32-bit PA-RISC runtime.  The libffi and libjava
534
haven't been ported to HP-UX and don't build.
535
 
536
   <p>It is possible to build GCC 3.3 starting with the bundled HP compiler,
537
but the process requires several steps.  GCC 3.3 can then be used to
538
build later versions.  The fastjar program contains ISO C code and
539
can't be built with the HP bundled compiler.  This problem can be
540
avoided by not building the Java language.  For example, use the
541
<samp><span class="option">--enable-languages="c,c++,f77,objc"</span></samp> option in your configure
542
command.
543
 
544
   <p>Starting with GCC 3.4 an ISO C compiler is required to bootstrap.  The
545
bundled compiler supports only traditional C; you will need either HP's
546
unbundled compiler, or a binary distribution of GCC.
547
 
548
   <p>There are several possible approaches to building the distribution.
549
Binutils can be built first using the HP tools.  Then, the GCC
550
distribution can be built.  The second approach is to build GCC
551
first using the HP tools, then build binutils, then rebuild GCC.
552
There have been problems with various binary distributions, so it
553
is best not to start from a binary distribution.
554
 
555
   <p>On 64-bit capable systems, there are two distinct targets.  Different
556
installation prefixes must be used if both are to be installed on
557
the same system.  The `<samp><span class="samp">hppa[1-2]*-hp-hpux11*</span></samp>' target generates code
558
for the 32-bit PA-RISC runtime architecture and uses the HP linker.
559
The `<samp><span class="samp">hppa64-hp-hpux11*</span></samp>' target generates 64-bit code for the
560
PA-RISC 2.0 architecture.  The HP and GNU linkers are both supported
561
for this target.
562
 
563
   <p>The script config.guess now selects the target type based on the compiler
564
detected during configuration.  You must define <samp><span class="env">PATH</span></samp> or <samp><span class="env">CC</span></samp> so
565
that configure finds an appropriate compiler for the initial bootstrap.
566
When <samp><span class="env">CC</span></samp> is used, the definition should contain the options that are
567
needed whenever <samp><span class="env">CC</span></samp> is used.
568
 
569
   <p>Specifically, options that determine the runtime architecture must be
570
in <samp><span class="env">CC</span></samp> to correctly select the target for the build.  It is also
571
convenient to place many other compiler options in <samp><span class="env">CC</span></samp>.  For example,
572
<samp><span class="env">CC="cc -Ac +DA2.0W -Wp,-H16376 -D_CLASSIC_TYPES -D_HPUX_SOURCE"</span></samp>
573
can be used to bootstrap the GCC 3.3 branch with the HP compiler in
574
64-bit K&amp;R/bundled mode.  The <samp><span class="option">+DA2.0W</span></samp> option will result in
575
the automatic selection of the `<samp><span class="samp">hppa64-hp-hpux11*</span></samp>' target.  The
576
macro definition table of cpp needs to be increased for a successful
577
build with the HP compiler.  _CLASSIC_TYPES and _HPUX_SOURCE need to
578
be defined when building with the bundled compiler, or when using the
579
<samp><span class="option">-Ac</span></samp> option.  These defines aren't necessary with <samp><span class="option">-Ae</span></samp>.
580
 
581
   <p>It is best to explicitly configure the `<samp><span class="samp">hppa64-hp-hpux11*</span></samp>' target
582
with the <samp><span class="option">--with-ld=...</span></samp> option.  This overrides the standard
583
search for ld.  The two linkers supported on this target require different
584
commands.  The default linker is determined during configuration.  As a
585
result, it's not possible to switch linkers in the middle of a GCC build.
586
This has been been reported to sometimes occur in unified builds of
587
binutils and GCC.
588
 
589
   <p>GCC 3.0 through 3.2 require binutils 2.11 or above.  GCC 3.3 through
590
GCC 4.0 require binutils 2.14 or later.
591
 
592
   <p>Although the HP assembler can be used for an initial build, it shouldn't
593
be used with any languages other than C and perhaps Fortran due to its
594
many limitations.  For example, it does not support weak symbols or alias
595
definitions.  As a result, explicit template instantiations are required
596
when using C++.  This makes it difficult if not impossible to build many
597
C++ applications.  You can't generate debugging information when using
598
the HP assembler.  Finally, `<samp><span class="samp">make bootstrap</span></samp>' fails in the final
599
comparison of object modules due to the time stamps that it inserts into
600
the modules.  The bootstrap can be continued from this point with
601
`<samp><span class="samp">make all</span></samp>'.
602
 
603
   <p>A recent linker patch must be installed for the correct operation of
604
GCC 3.3 and later.  <code>PHSS_26559</code> and <code>PHSS_24304</code> are the
605
oldest linker patches that are known to work.  They are for HP-UX
606
11.00 and 11.11, respectively.  <code>PHSS_24303</code>, the companion to
607
<code>PHSS_24304</code>, might be usable but it hasn't been tested.  These
608
patches have been superseded.  Consult the HP patch database to obtain
609
the currently recommended linker patch for your system.
610
 
611
   <p>The patches are necessary for the support of weak symbols on the
612
32-bit port, and for the running of initializers and finalizers.  Weak
613
symbols are implemented using SOM secondary definition symbols.  Prior
614
to HP-UX 11, there are bugs in the linker support for secondary symbols.
615
The patches correct a problem of linker core dumps creating shared
616
libraries containing secondary symbols, as well as various other
617
linking issues involving secondary symbols.
618
 
619
   <p>GCC 3.3 uses the ELF DT_INIT_ARRAY and DT_FINI_ARRAY capabilities to
620
run initializers and finalizers on the 64-bit port.  The 32-bit port
621
uses the linker <samp><span class="option">+init</span></samp> and <samp><span class="option">+fini</span></samp> options for the same
622
purpose.  The patches correct various problems with the +init/+fini
623
options, including program core dumps.  Binutils 2.14 corrects a
624
problem on the 64-bit port resulting from HP's non-standard use of
625
the .init and .fini sections for array initializers and finalizers.
626
 
627
   <p>There are a number of issues to consider in selecting which linker to
628
use with the 64-bit port.  The GNU 64-bit linker can only create dynamic
629
binaries.  The <samp><span class="option">-static</span></samp> option causes linking with archive
630
libraries but doesn't produce a truly static binary.  Dynamic binaries
631
still require final binding by the dynamic loader to resolve a set of
632
dynamic-loader-defined symbols.  The default behavior of the HP linker
633
is the same as the GNU linker.  However, it can generate true 64-bit
634
static binaries using the <samp><span class="option">+compat</span></samp> option.
635
 
636
   <p>The HP 64-bit linker doesn't support linkonce semantics.  As a
637
result, C++ programs have many more sections than they should.
638
 
639
   <p>The GNU 64-bit linker has some issues with shared library support
640
and exceptions.  As a result, we only support libgcc in archive
641
format.  For similar reasons, dwarf2 unwind and exception support
642
are disabled.  The GNU linker also has problems creating binaries
643
with <samp><span class="option">-static</span></samp>.  It doesn't provide stubs for internal
644
calls to global functions in shared libraries, so these calls
645
can't be overloaded.
646
 
647
   <p>Thread support is not implemented in GCC 3.0 through 3.2, so the
648
<samp><span class="option">--enable-threads</span></samp> configure option does not work.  In 3.3
649
and later, POSIX threads are supported.  The optional DCE thread
650
library is not supported.
651
 
652
   <p>This port still is undergoing significant development.
653
 
654
   <p><hr />
655
 
656
<h3 class="heading"><a name="TOC19"></a><a name="x_002dx_002dlinux_002dgnu"></a>*-*-linux-gnu</h3>
657
 
658
<p>Versions of libstdc++-v3 starting with 3.2.1 require bugfixes present
659
in glibc 2.2.5 and later.  More information is available in the
660
libstdc++-v3 documentation.
661
 
662
   <p><hr />
663
 
664
<h3 class="heading"><a name="TOC20"></a><a name="ix86_002dx_002dlinuxaout"></a>i?86-*-linux*aout</h3>
665
 
666
<p>Use this configuration to generate <samp><span class="file">a.out</span></samp> binaries on Linux-based
667
GNU systems.  This configuration is being superseded.
668
 
669
   <p><hr />
670
 
671
<h3 class="heading"><a name="TOC21"></a><a name="ix86_002dx_002dlinux"></a>i?86-*-linux*</h3>
672
 
673
<p>As of GCC 3.3, binutils 2.13.1 or later is required for this platform.
674
See <a href="http://gcc.gnu.org/PR10877">bug 10877</a> for more information.
675
 
676
   <p>If you receive Signal 11 errors when building on GNU/Linux, then it is
677
possible you have a hardware problem.  Further information on this can be
678
found on <a href="http://www.bitwizard.nl/sig11/">www.bitwizard.nl</a>.
679
 
680
   <p><hr />
681
 
682
<h3 class="heading"><a name="TOC22"></a><a name="ix86_002dx_002dsco32v5"></a>i?86-*-sco3.2v5*</h3>
683
 
684
<p>Use this for the SCO OpenServer Release 5 family of operating systems.
685
 
686
   <p>Unlike earlier versions of GCC, the ability to generate COFF with this
687
target is no longer provided.
688
 
689
   <p>Earlier versions of GCC emitted DWARF 1 when generating ELF to allow
690
the system debugger to be used.  That support was too burdensome to
691
maintain.  GCC now emits only DWARF 2 for this target.  This means you
692
may use either the UDK debugger or GDB to debug programs built by this
693
version of GCC.
694
 
695
   <p>GCC is now only supported on releases 5.0.4 and later, and requires that
696
you install Support Level Supplement OSS646B or later, and Support Level
697
Supplement OSS631C or later.  If you are using release 5.0.7 of
698
OpenServer, you must have at least the first maintenance pack installed
699
(this includes the relevant portions of OSS646).  OSS646, also known as
700
the &ldquo;Execution Environment Update&rdquo;, provides updated link editors and
701
assemblers, as well as updated standard C and math libraries.  The C
702
startup modules are also updated to support the System V gABI draft, and
703
GCC relies on that behavior.  OSS631 provides a collection of commonly
704
used open source libraries, some of which GCC depends on (such as GNU
705
gettext and zlib).  SCO OpenServer Release 5.0.7 has all of this built
706
in by default, but OSS631C and later also apply to that release.  Please
707
visit
708
<a href="ftp://ftp.sco.com/pub/openserver5">ftp://ftp.sco.com/pub/openserver5</a>
709
for the latest versions of these (and other potentially useful)
710
supplements.
711
 
712
   <p>Although there is support for using the native assembler, it is
713
recommended that you configure GCC to use the GNU assembler.  You do
714
this by using the flags
715
<a href="./configure.html#with-gnu-as"><samp><span class="option">--with-gnu-as</span></samp></a>.  You should
716
use a modern version of GNU binutils.  Version 2.13.2.1 was used for all
717
testing.  In general, only the <samp><span class="option">--with-gnu-as</span></samp> option is tested.
718
A modern bintuils (as well as a plethora of other development related
719
GNU utilities) can be found in Support Level Supplement OSS658A, the
720
&ldquo;GNU Development Tools&rdquo; package.  See the SCO web and ftp sites for details.
721
That package also contains the currently &ldquo;officially supported&rdquo; version of
722
GCC, version 2.95.3.  It is useful for bootstrapping this version.
723
 
724
   <p><hr />
725
 
726
<h3 class="heading"><a name="TOC23"></a><a name="ix86_002dx_002dsolaris210"></a>i?86-*-solaris2.10</h3>
727
 
728
<p>Use this for Solaris 10 or later on x86 and x86-64 systems.  This
729
configuration is supported by GCC 4.0 and later versions only.
730
 
731
   <p>It is recommended that you configure GCC to use the GNU assembler in
732
<samp><span class="file">/usr/sfw/bin/gas</span></samp> but the Sun linker, using the options
733
<samp><span class="option">--with-gnu-as --with-as=/usr/sfw/bin/gas --without-gnu-ld
734
--with-ld=/usr/ccs/bin/ld</span></samp>.
735
 
736
   <p><hr />
737
 
738
<h3 class="heading"><a name="TOC24"></a><a name="ix86_002dx_002dudk"></a>i?86-*-udk</h3>
739
 
740
<p>This target emulates the SCO Universal Development Kit and requires that
741
package be installed.  (If it is installed, you will have a
742
<samp><span class="file">/udk/usr/ccs/bin/cc</span></samp> file present.)  It's very much like the
743
`<samp><span class="samp">i?86-*-unixware7*</span></samp>' target
744
but is meant to be used when hosting on a system where UDK isn't the
745
default compiler such as OpenServer 5 or Unixware 2.  This target will
746
generate binaries that will run on OpenServer, Unixware 2, or Unixware 7,
747
with the same warnings and caveats as the SCO UDK.
748
 
749
   <p>This target is a little tricky to build because we have to distinguish
750
it from the native tools (so it gets headers, startups, and libraries
751
from the right place) while making the tools not think we're actually
752
building a cross compiler.   The easiest way to do this is with a configure
753
command like this:
754
 
755
<pre class="smallexample">         CC=/udk/usr/ccs/bin/cc <var>/your/path/to</var>/gcc/configure \
756
           --host=i686-pc-udk --target=i686-pc-udk --program-prefix=udk-
757
</pre>
758
   <p><em>You should substitute `<samp></em><span class="samp">i686</span><em></samp>' in the above command with the appropriate
759
processor for your host.</em>
760
 
761
   <p>After the usual `<samp><span class="samp">make bootstrap</span></samp>' and
762
`<samp><span class="samp">make install</span></samp>', you can then access the UDK-targeted GCC
763
tools by adding <samp><span class="command">udk-</span></samp> before the commonly known name.  For
764
example, to invoke the C compiler, you would use <samp><span class="command">udk-gcc</span></samp>.
765
They will coexist peacefully with any native-target GCC tools you may
766
have installed.
767
 
768
   <p><hr />
769
 
770
<h3 class="heading"><a name="TOC25"></a><a name="ia64_002dx_002dlinux"></a>ia64-*-linux</h3>
771
 
772
<p>IA-64 processor (also known as IPF, or Itanium Processor Family)
773
running GNU/Linux.
774
 
775
   <p>If you are using the installed system libunwind library with
776
<samp><span class="option">--with-system-libunwind</span></samp>, then you must use libunwind 0.98 or
777
later.
778
 
779
   <p>None of the following versions of GCC has an ABI that is compatible
780
with any of the other versions in this list, with the exception that
781
Red Hat 2.96 and Trillian 000171 are compatible with each other:
782
3.1, 3.0.2, 3.0.1, 3.0, Red Hat 2.96, and Trillian 000717.
783
This primarily affects C++ programs and programs that create shared libraries.
784
GCC 3.1 or later is recommended for compiling linux, the kernel.
785
As of version 3.1 GCC is believed to be fully ABI compliant, and hence no
786
more major ABI changes are expected.
787
 
788
   <p><hr />
789
 
790
<h3 class="heading"><a name="TOC26"></a><a name="ia64_002dx_002dhpux"></a>ia64-*-hpux*</h3>
791
 
792
<p>Building GCC on this target requires the GNU Assembler.  The bundled HP
793
assembler will not work.  To prevent GCC from using the wrong assembler,
794
the option <samp><span class="option">--with-gnu-as</span></samp> may be necessary.
795
 
796
   <p>The GCC libunwind library has not been ported to HPUX.  This means that for
797
GCC versions 3.2.3 and earlier, <samp><span class="option">--enable-libunwind-exceptions</span></samp>
798
is required to build GCC.  For GCC 3.3 and later, this is the default.
799
For gcc 3.4.3 and later, <samp><span class="option">--enable-libunwind-exceptions</span></samp> is
800
removed and the system libunwind library will always be used.
801
 
802
   <p><hr />
803
<!-- rs6000-ibm-aix*, powerpc-ibm-aix* -->
804
 
805
<h3 class="heading"><a name="TOC27"></a><a name="x_002dibm_002daix"></a>*-ibm-aix*</h3>
806
 
807
<p>Support for AIX version 3 and older was discontinued in GCC 3.4.
808
 
809
   <p>AIX Make frequently has problems with GCC makefiles.  GNU Make 3.79.1 or
810
newer is recommended to build on this platform.
811
 
812
   <p>&ldquo;out of memory&rdquo; bootstrap failures may indicate a problem with
813
process resource limits (ulimit).  Hard limits are configured in the
814
<samp><span class="file">/etc/security/limits</span></samp> system configuration file.
815
 
816
   <p>To speed up the configuration phases of bootstrapping and installing GCC,
817
one may use GNU Bash instead of AIX <samp><span class="command">/bin/sh</span></samp>, e.g.,
818
 
819
<pre class="smallexample">        % CONFIG_SHELL=/opt/freeware/bin/bash
820
        % export CONFIG_SHELL
821
</pre>
822
   <p>and then proceed as described in <a href="build.html">the build instructions</a>,
823
where we strongly recommend using GNU make and specifying an absolute path
824
to invoke <var>srcdir</var>/configure.
825
 
826
   <p>Errors involving <code>alloca</code> when building GCC generally are due
827
to an incorrect definition of <code>CC</code> in the Makefile or mixing files
828
compiled with the native C compiler and GCC.  During the stage1 phase of
829
the build, the native AIX compiler <strong>must</strong> be invoked as <samp><span class="command">cc</span></samp>
830
(not <samp><span class="command">xlc</span></samp>).  Once <samp><span class="command">configure</span></samp> has been informed of
831
<samp><span class="command">xlc</span></samp>, one needs to use `<samp><span class="samp">make distclean</span></samp>' to remove the
832
configure cache files and ensure that <samp><span class="env">CC</span></samp> environment variable
833
does not provide a definition that will confuse <samp><span class="command">configure</span></samp>.
834
If this error occurs during stage2 or later, then the problem most likely
835
is the version of Make (see above).
836
 
837
   <p>The native <samp><span class="command">as</span></samp> and <samp><span class="command">ld</span></samp> are recommended for bootstrapping
838
on AIX 4 and required for bootstrapping on AIX 5L.  The GNU Assembler
839
reports that it supports WEAK symbols on AIX 4, which causes GCC to try to
840
utilize weak symbol functionality although it is not supported.  The GNU
841
Assembler and Linker do not support AIX 5L sufficiently to bootstrap GCC.
842
The native AIX tools do interoperate with GCC.
843
 
844
   <p>Building <samp><span class="file">libstdc++.a</span></samp> requires a fix for an AIX Assembler bug
845
APAR IY26685 (AIX 4.3) or APAR IY25528 (AIX 5.1).  It also requires a
846
fix for another AIX Assembler bug and a co-dependent AIX Archiver fix
847
referenced as APAR IY53606 (AIX 5.2) or a APAR IY54774 (AIX 5.1)
848
 
849
   <p>`<samp><span class="samp">libstdc++</span></samp>' in GCC 3.4 increments the major version number of the
850
shared object and GCC installation places the <samp><span class="file">libstdc++.a</span></samp>
851
shared library in a common location which will overwrite the and GCC
852
3.3 version of the shared library.  Applications either need to be
853
re-linked against the new shared library or the GCC 3.1 and GCC 3.3
854
versions of the `<samp><span class="samp">libstdc++</span></samp>' shared object needs to be available
855
to the AIX runtime loader.  The GCC 3.1 `<samp><span class="samp">libstdc++.so.4</span></samp>', if
856
present, and GCC 3.3 `<samp><span class="samp">libstdc++.so.5</span></samp>' shared objects can be
857
installed for runtime dynamic loading using the following steps to set
858
the `<samp><span class="samp">F_LOADONLY</span></samp>' flag in the shared object for <em>each</em>
859
multilib <samp><span class="file">libstdc++.a</span></samp> installed:
860
 
861
   <p>Extract the shared objects from the currently installed
862
<samp><span class="file">libstdc++.a</span></samp> archive:
863
<pre class="smallexample">        % ar -x libstdc++.a libstdc++.so.4 libstdc++.so.5
864
</pre>
865
   <p>Enable the `<samp><span class="samp">F_LOADONLY</span></samp>' flag so that the shared object will be
866
available for runtime dynamic loading, but not linking:
867
<pre class="smallexample">        % strip -e libstdc++.so.4 libstdc++.so.5
868
</pre>
869
   <p>Archive the runtime-only shared object in the GCC 3.4
870
<samp><span class="file">libstdc++.a</span></samp> archive:
871
<pre class="smallexample">        % ar -q libstdc++.a libstdc++.so.4 libstdc++.so.5
872
</pre>
873
   <p>Linking executables and shared libraries may produce warnings of
874
duplicate symbols.  The assembly files generated by GCC for AIX always
875
have included multiple symbol definitions for certain global variable
876
and function declarations in the original program.  The warnings should
877
not prevent the linker from producing a correct library or runnable
878
executable.
879
 
880
   <p>AIX 4.3 utilizes a &ldquo;large format&rdquo; archive to support both 32-bit and
881
64-bit object modules.  The routines provided in AIX 4.3.0 and AIX 4.3.1
882
to parse archive libraries did not handle the new format correctly.
883
These routines are used by GCC and result in error messages during
884
linking such as &ldquo;not a COFF file&rdquo;.  The version of the routines shipped
885
with AIX 4.3.1 should work for a 32-bit environment.  The <samp><span class="option">-g</span></samp>
886
option of the archive command may be used to create archives of 32-bit
887
objects using the original &ldquo;small format&rdquo;.  A correct version of the
888
routines is shipped with AIX 4.3.2 and above.
889
 
890
   <p>Some versions of the AIX binder (linker) can fail with a relocation
891
overflow severe error when the <samp><span class="option">-bbigtoc</span></samp> option is used to link
892
GCC-produced object files into an executable that overflows the TOC.  A fix
893
for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND -BBIGTOC) is
894
available from IBM Customer Support and from its
895
<a href="http://techsupport.services.ibm.com/">techsupport.services.ibm.com</a>
896
website as PTF U455193.
897
 
898
   <p>The AIX 4.3.2.1 linker (bos.rte.bind_cmds Level 4.3.2.1) will dump core
899
with a segmentation fault when invoked by any version of GCC.  A fix for
900
APAR IX87327 is available from IBM Customer Support and from its
901
<a href="http://techsupport.services.ibm.com/">techsupport.services.ibm.com</a>
902
website as PTF U461879.  This fix is incorporated in AIX 4.3.3 and above.
903
 
904
   <p>The initial assembler shipped with AIX 4.3.0 generates incorrect object
905
files.  A fix for APAR IX74254 (64BIT DISASSEMBLED OUTPUT FROM COMPILER FAILS
906
TO ASSEMBLE/BIND) is available from IBM Customer Support and from its
907
<a href="http://techsupport.services.ibm.com/">techsupport.services.ibm.com</a>
908
website as PTF U453956.  This fix is incorporated in AIX 4.3.1 and above.
909
 
910
   <p>AIX provides National Language Support (NLS).  Compilers and assemblers
911
use NLS to support locale-specific representations of various data
912
formats including floating-point numbers (e.g., `<samp><span class="samp">.</span></samp>'  vs `<samp><span class="samp">,</span></samp>' for
913
separating decimal fractions).  There have been problems reported where
914
GCC does not produce the same floating-point formats that the assembler
915
expects.  If one encounters this problem, set the <samp><span class="env">LANG</span></samp>
916
environment variable to `<samp><span class="samp">C</span></samp>' or `<samp><span class="samp">En_US</span></samp>'.
917
 
918
   <p>By default, GCC for AIX 4.1 and above produces code that can be used on
919
both Power or PowerPC processors.
920
 
921
   <p>A default can be specified with the <samp><span class="option">-mcpu=</span><var>cpu_type</var></samp>
922
switch and using the configure option <samp><span class="option">--with-cpu-</span><var>cpu_type</var></samp>.
923
 
924
   <p><hr />
925
 
926
<h3 class="heading"><a name="TOC28"></a><a name="iq2000_002dx_002delf"></a>iq2000-*-elf</h3>
927
 
928
<p>Vitesse IQ2000 processors.  These are used in embedded
929
applications.  There are no standard Unix configurations.
930
 
931
   <p><hr />
932
 
933
<h3 class="heading"><a name="TOC29"></a><a name="m32c_002dx_002delf"></a>m32c-*-elf</h3>
934
 
935
<p>Renesas M32C processor.
936
This configuration is intended for embedded systems.
937
 
938
   <p><hr />
939
 
940
<h3 class="heading"><a name="TOC30"></a><a name="m32r_002dx_002delf"></a>m32r-*-elf</h3>
941
 
942
<p>Renesas M32R processor.
943
This configuration is intended for embedded systems.
944
 
945
   <p><hr />
946
 
947
<h3 class="heading"><a name="TOC31"></a><a name="m6811_002delf"></a>m6811-elf</h3>
948
 
949
<p>Motorola 68HC11 family micro controllers.  These are used in embedded
950
applications.  There are no standard Unix configurations.
951
 
952
   <p><hr />
953
 
954
<h3 class="heading"><a name="TOC32"></a><a name="m6812_002delf"></a>m6812-elf</h3>
955
 
956
<p>Motorola 68HC12 family micro controllers.  These are used in embedded
957
applications.  There are no standard Unix configurations.
958
 
959
   <p><hr />
960
 
961
<h3 class="heading"><a name="TOC33"></a><a name="m68k_002dhp_002dhpux"></a>m68k-hp-hpux</h3>
962
 
963
<p>HP 9000 series 300 or 400 running HP-UX.  HP-UX version 8.0 has a bug in
964
the assembler that prevents compilation of GCC.  This
965
bug manifests itself during the first stage of compilation, while
966
building <samp><span class="file">libgcc2.a</span></samp>:
967
 
968
<pre class="smallexample">     _floatdisf
969
     cc1: warning: `-g' option not supported on this version of GCC
970
     cc1: warning: `-g1' option not supported on this version of GCC
971
     ./xgcc: Internal compiler error: program as got fatal signal 11
972
</pre>
973
   <p>A patched version of the assembler is available as the file
974
<a href="ftp://altdorf.ai.mit.edu/archive/cph/hpux-8.0-assembler">ftp://altdorf.ai.mit.edu/archive/cph/hpux-8.0-assembler</a>.  If you
975
have HP software support, the patch can also be obtained directly from
976
HP, as described in the following note:
977
 
978
   <blockquote>
979
This is the patched assembler, to patch SR#1653-010439, where the
980
assembler aborts on floating point constants.
981
 
982
        <p>The bug is not really in the assembler, but in the shared library
983
version of the function &ldquo;cvtnum(3c)&rdquo;.  The bug on &ldquo;cvtnum(3c)&rdquo; is
984
SR#4701-078451.  Anyway, the attached assembler uses the archive
985
library version of &ldquo;cvtnum(3c)&rdquo; and thus does not exhibit the bug.
986
</blockquote>
987
 
988
   <p>This patch is also known as PHCO_4484.
989
 
990
   <p>In addition gdb does not understand that native HP-UX format, so
991
you must use gas if you wish to use gdb.
992
 
993
   <p>On HP-UX version 8.05, but not on 8.07 or more recent versions, the
994
<samp><span class="command">fixproto</span></samp> shell script triggers a bug in the system shell.  If you
995
encounter this problem, upgrade your operating system or use BASH (the
996
GNU shell) to run <samp><span class="command">fixproto</span></samp>.  This bug will cause the fixproto
997
program to report an error of the form:
998
 
999
<pre class="smallexample">     ./fixproto: sh internal 1K buffer overflow
1000
</pre>
1001
   <p>To fix this, you can also change the first line of the fixproto script
1002
to look like:
1003
 
1004
<pre class="smallexample">     #!/bin/ksh
1005
</pre>
1006
   <p><hr />
1007
 
1008
<h3 class="heading"><a name="TOC34"></a><a name="mips_002dx_002dx"></a>mips-*-*</h3>
1009
 
1010
<p>If on a MIPS system you get an error message saying &ldquo;does not have gp
1011
sections for all it's [sic] sectons [sic]&rdquo;, don't worry about it.  This
1012
happens whenever you use GAS with the MIPS linker, but there is not
1013
really anything wrong, and it is okay to use the output file.  You can
1014
stop such warnings by installing the GNU linker.
1015
 
1016
   <p>It would be nice to extend GAS to produce the gp tables, but they are
1017
optional, and there should not be a warning about their absence.
1018
 
1019
   <p>The libstdc++ atomic locking routines for MIPS targets requires MIPS II
1020
and later.  A patch went in just after the GCC 3.3 release to
1021
make `<samp><span class="samp">mips*-*-*</span></samp>' use the generic implementation instead.  You can also
1022
configure for `<samp><span class="samp">mipsel-elf</span></samp>' as a workaround.  The
1023
`<samp><span class="samp">mips*-*-linux*</span></samp>' target continues to use the MIPS II routines.  More
1024
work on this is expected in future releases.
1025
 
1026
   <p>MIPS systems check for division by zero (unless
1027
<samp><span class="option">-mno-check-zero-division</span></samp> is passed to the compiler) by
1028
generating either a conditional trap or a break instruction.  Using
1029
trap results in smaller code, but is only supported on MIPS II and
1030
later.  Also, some versions of the Linux kernel have a bug that
1031
prevents trap from generating the proper signal (<code>SIGFPE</code>).  To enable
1032
the use of break, use the <samp><span class="option">--with-divide=breaks</span></samp>
1033
<samp><span class="command">configure</span></samp> option when configuring GCC.  The default is to
1034
use traps on systems that support them.
1035
 
1036
   <p>Cross-compilers for the MIPS as target using the MIPS assembler
1037
currently do not work, because the auxiliary programs
1038
<samp><span class="file">mips-tdump.c</span></samp> and <samp><span class="file">mips-tfile.c</span></samp> can't be compiled on
1039
anything but a MIPS.  It does work to cross compile for a MIPS
1040
if you use the GNU assembler and linker.
1041
 
1042
   <p><hr />
1043
 
1044
<h3 class="heading"><a name="TOC35"></a><a name="mips_002dsgi_002dirix5"></a>mips-sgi-irix5</h3>
1045
 
1046
<p>In order to compile GCC on an SGI running IRIX 5, the `<samp><span class="samp">compiler_dev.hdr</span></samp>'
1047
subsystem must be installed from the IDO CD-ROM supplied by SGI.
1048
It is also available for download from
1049
<a href="ftp://ftp.sgi.com/sgi/IRIX5.3/iris-development-option-5.3.tardist">ftp://ftp.sgi.com/sgi/IRIX5.3/iris-development-option-5.3.tardist</a>.
1050
 
1051
   <p>If you use the MIPS C compiler to bootstrap, it may be necessary
1052
to increase its table size for switch statements with the
1053
<samp><span class="option">-Wf,-XNg1500</span></samp> option.  If you use the <samp><span class="option">-O2</span></samp>
1054
optimization option, you also need to use <samp><span class="option">-Olimit 3000</span></samp>.
1055
 
1056
   <p>To enable debugging under IRIX 5, you must use GNU binutils 2.15 or
1057
later, and use the <samp><span class="option">--with-gnu-ld</span></samp> <samp><span class="command">configure</span></samp> option
1058
when configuring GCC.  You need to use GNU <samp><span class="command">ar</span></samp> and <samp><span class="command">nm</span></samp>,
1059
also distributed with GNU binutils.
1060
 
1061
   <p>Some users have reported that <samp><span class="command">/bin/sh</span></samp> will hang during bootstrap.
1062
This problem can be avoided by running the commands:
1063
 
1064
<pre class="smallexample">        % CONFIG_SHELL=/bin/ksh
1065
        % export CONFIG_SHELL
1066
</pre>
1067
   <p>before starting the build.
1068
 
1069
   <p><hr />
1070
 
1071
<h3 class="heading"><a name="TOC36"></a><a name="mips_002dsgi_002dirix6"></a>mips-sgi-irix6</h3>
1072
 
1073
<p>If you are using SGI's MIPSpro <samp><span class="command">cc</span></samp> as your bootstrap compiler, you must
1074
ensure that the N32 ABI is in use.  To test this, compile a simple C
1075
file with <samp><span class="command">cc</span></samp> and then run <samp><span class="command">file</span></samp> on the
1076
resulting object file.  The output should look like:
1077
 
1078
<pre class="smallexample">     test.o: ELF N32 MSB ...
1079
</pre>
1080
   <p>If you see:
1081
 
1082
<pre class="smallexample">     test.o: ELF 32-bit MSB ...
1083
</pre>
1084
   <p>or
1085
 
1086
<pre class="smallexample">     test.o: ELF 64-bit MSB ...
1087
</pre>
1088
   <p>then your version of <samp><span class="command">cc</span></samp> uses the O32 or N64 ABI by default.  You
1089
should set the environment variable <samp><span class="env">CC</span></samp> to `<samp><span class="samp">cc -n32</span></samp>'
1090
before configuring GCC.
1091
 
1092
   <p>If you want the resulting <samp><span class="command">gcc</span></samp> to run on old 32-bit systems
1093
with the MIPS R4400 CPU, you need to ensure that only code for the `<samp><span class="samp">mips3</span></samp>'
1094
instruction set architecture (ISA) is generated.  While GCC 3.x does
1095
this correctly, both GCC 2.95 and SGI's MIPSpro <samp><span class="command">cc</span></samp> may change
1096
the ISA depending on the machine where GCC is built.  Using one of them
1097
as the bootstrap compiler may result in `<samp><span class="samp">mips4</span></samp>' code, which won't run at
1098
all on `<samp><span class="samp">mips3</span></samp>'-only systems.  For the test program above, you should see:
1099
 
1100
<pre class="smallexample">     test.o: ELF N32 MSB mips-3 ...
1101
</pre>
1102
   <p>If you get:
1103
 
1104
<pre class="smallexample">     test.o: ELF N32 MSB mips-4 ...
1105
</pre>
1106
   <p>instead, you should set the environment variable <samp><span class="env">CC</span></samp> to `<samp><span class="samp">cc
1107
-n32 -mips3</span></samp>' or `<samp><span class="samp">gcc -mips3</span></samp>' respectively before configuring GCC.
1108
 
1109
   <p>MIPSpro C 7.4 may cause bootstrap failures, due to a bug when inlining
1110
<code>memcmp</code>.  Either add <code>-U__INLINE_INTRINSICS</code> to the <samp><span class="env">CC</span></samp>
1111
environment variable as a workaround or upgrade to MIPSpro C 7.4.1m.
1112
 
1113
   <p>GCC on IRIX 6 is usually built to support the N32, O32 and N64 ABIs.  If
1114
you build GCC on a system that doesn't have the N64 libraries installed
1115
or cannot run 64-bit binaries,
1116
you need to configure with <samp><span class="option">--disable-multilib</span></samp> so GCC doesn't
1117
try to use them.  This will disable building the O32 libraries, too.
1118
Look for <samp><span class="file">/usr/lib64/libc.so.1</span></samp> to see if you
1119
have the 64-bit libraries installed.
1120
 
1121
   <p>To enable debugging for the O32 ABI, you must use GNU <samp><span class="command">as</span></samp> from
1122
GNU binutils 2.15 or later.  You may also use GNU <samp><span class="command">ld</span></samp>, but
1123
this is not required and currently causes some problems with Ada.
1124
 
1125
   <p>The <samp><span class="option">--enable-threads</span></samp> option doesn't currently work, a patch is
1126
in preparation for a future release.  The <samp><span class="option">--enable-libgcj</span></samp>
1127
option is disabled by default: IRIX 6 uses a very low default limit
1128
(20480) for the command line length.  Although <samp><span class="command">libtool</span></samp> contains a
1129
workaround for this problem, at least the N64 `<samp><span class="samp">libgcj</span></samp>' is known not
1130
to build despite this, running into an internal error of the native
1131
<samp><span class="command">ld</span></samp>.  A sure fix is to increase this limit (`<samp><span class="samp">ncargs</span></samp>') to
1132
its maximum of 262144 bytes.  If you have root access, you can use the
1133
<samp><span class="command">systune</span></samp> command to do this.
1134
 
1135
   <p>See <a href="http://freeware.sgi.com/">http://freeware.sgi.com/</a> for more
1136
information about using GCC on IRIX platforms.
1137
 
1138
   <p><hr />
1139
 
1140
<h3 class="heading"><a name="TOC37"></a><a name="powerpc_002dx_002dx"></a>powerpc-*-*</h3>
1141
 
1142
<p>You can specify a default version for the <samp><span class="option">-mcpu=</span><var>cpu_type</var></samp>
1143
switch by using the configure option <samp><span class="option">--with-cpu-</span><var>cpu_type</var></samp>.
1144
 
1145
   <p><hr />
1146
 
1147
<h3 class="heading"><a name="TOC38"></a><a name="powerpc_002dx_002ddarwin"></a>powerpc-*-darwin*</h3>
1148
 
1149
<p>PowerPC running Darwin (Mac OS X kernel).
1150
 
1151
   <p>Pre-installed versions of Mac OS X may not include any developer tools,
1152
meaning that you will not be able to build GCC from source.  Tool
1153
binaries are available at
1154
<a href="http://developer.apple.com/darwin/projects/compiler/">http://developer.apple.com/darwin/projects/compiler/</a> (free
1155
registration required).
1156
 
1157
   <p>This version of GCC requires at least cctools-590.7.
1158
 
1159
   <p>The version of GCC shipped by Apple typically includes a number of
1160
extensions not available in a standard GCC release.  These extensions
1161
are generally for backwards compatibility and best avoided.
1162
 
1163
   <p><hr />
1164
 
1165
<h3 class="heading"><a name="TOC39"></a><a name="powerpc_002dx_002delf"></a>powerpc-*-elf, powerpc-*-sysv4</h3>
1166
 
1167
<p>PowerPC system in big endian mode, running System V.4.
1168
 
1169
   <p><hr />
1170
 
1171
<h3 class="heading"><a name="TOC40"></a><a name="powerpc_002dx_002dlinux_002dgnu"></a>powerpc*-*-linux-gnu*</h3>
1172
 
1173
<p>You will need
1174
<a href="ftp://ftp.kernel.org/pub/linux/devel/binutils">binutils 2.15</a>
1175
or newer for a working GCC.
1176
 
1177
   <p><hr />
1178
 
1179
<h3 class="heading"><a name="TOC41"></a><a name="powerpc_002dx_002dnetbsd"></a>powerpc-*-netbsd*</h3>
1180
 
1181
<p>PowerPC system in big endian mode running NetBSD.  To build the
1182
documentation you will need Texinfo version 4.2 (NetBSD 1.5.1 included
1183
Texinfo version 3.12).
1184
 
1185
   <p><hr />
1186
 
1187
<h3 class="heading"><a name="TOC42"></a><a name="powerpc_002dx_002deabisim"></a>powerpc-*-eabisim</h3>
1188
 
1189
<p>Embedded PowerPC system in big endian mode for use in running under the
1190
PSIM simulator.
1191
 
1192
   <p><hr />
1193
 
1194
<h3 class="heading"><a name="TOC43"></a><a name="powerpc_002dx_002deabi"></a>powerpc-*-eabi</h3>
1195
 
1196
<p>Embedded PowerPC system in big endian mode.
1197
 
1198
   <p><hr />
1199
 
1200
<h3 class="heading"><a name="TOC44"></a><a name="powerpcle_002dx_002delf"></a>powerpcle-*-elf, powerpcle-*-sysv4</h3>
1201
 
1202
<p>PowerPC system in little endian mode, running System V.4.
1203
 
1204
   <p><hr />
1205
 
1206
<h3 class="heading"><a name="TOC45"></a><a name="powerpcle_002dx_002deabisim"></a>powerpcle-*-eabisim</h3>
1207
 
1208
<p>Embedded PowerPC system in little endian mode for use in running under
1209
the PSIM simulator.
1210
 
1211
   <p><hr />
1212
 
1213
<h3 class="heading"><a name="TOC46"></a><a name="powerpcle_002dx_002deabi"></a>powerpcle-*-eabi</h3>
1214
 
1215
<p>Embedded PowerPC system in little endian mode.
1216
 
1217
   <p><hr />
1218
 
1219
<h3 class="heading"><a name="TOC47"></a><a name="s390_002dx_002dlinux"></a>s390-*-linux*</h3>
1220
 
1221
<p>S/390 system running GNU/Linux for S/390.
1222
 
1223
   <p><hr />
1224
 
1225
<h3 class="heading"><a name="TOC48"></a><a name="s390x_002dx_002dlinux"></a>s390x-*-linux*</h3>
1226
 
1227
<p>zSeries system (64-bit) running GNU/Linux for zSeries.
1228
 
1229
   <p><hr />
1230
 
1231
<h3 class="heading"><a name="TOC49"></a><a name="s390x_002dibm_002dtpf"></a>s390x-ibm-tpf*</h3>
1232
 
1233
<p>zSeries system (64-bit) running TPF.  This platform is
1234
supported as cross-compilation target only.
1235
 
1236
   <p><hr /><!-- Please use Solaris 2 to refer to all release of Solaris, starting -->
1237
<!-- with 2.0 until 2.6, 7, 8, etc.  Solaris 1 was a marketing name for -->
1238
<!-- SunOS 4 releases which we don't use to avoid confusion.  Solaris -->
1239
<!-- alone is too unspecific and must be avoided. -->
1240
 
1241
<h3 class="heading"><a name="TOC50"></a><a name="x_002dx_002dsolaris2"></a>*-*-solaris2*</h3>
1242
 
1243
<p>Sun does not ship a C compiler with Solaris 2.  To bootstrap and install
1244
GCC you first have to install a pre-built compiler, see the
1245
<a href="binaries.html">binaries page</a> for details.
1246
 
1247
   <p>The Solaris 2 <samp><span class="command">/bin/sh</span></samp> will often fail to configure
1248
<samp><span class="file">libstdc++-v3</span></samp>, <samp><span class="file">boehm-gc</span></samp> or <samp><span class="file">libjava</span></samp>.  We therefore
1249
recommend using the following initial sequence of commands
1250
 
1251
<pre class="smallexample">        % CONFIG_SHELL=/bin/ksh
1252
        % export CONFIG_SHELL
1253
</pre>
1254
   <p>and proceed as described in <a href="configure.html">the configure instructions</a>.
1255
In addition we strongly recommend specifying an absolute path to invoke
1256
<var>srcdir</var>/configure.
1257
 
1258
   <p>Solaris 2 comes with a number of optional OS packages.  Some of these
1259
are needed to use GCC fully, namely <code>SUNWarc</code>,
1260
<code>SUNWbtool</code>, <code>SUNWesu</code>, <code>SUNWhea</code>, <code>SUNWlibm</code>,
1261
<code>SUNWsprot</code>, and <code>SUNWtoo</code>.  If you did not install all
1262
optional packages when installing Solaris 2, you will need to verify that
1263
the packages that GCC needs are installed.
1264
 
1265
   <p>To check whether an optional package is installed, use
1266
the <samp><span class="command">pkginfo</span></samp> command.  To add an optional package, use the
1267
<samp><span class="command">pkgadd</span></samp> command.  For further details, see the Solaris 2
1268
documentation.
1269
 
1270
   <p>Trying to use the linker and other tools in
1271
<samp><span class="file">/usr/ucb</span></samp> to install GCC has been observed to cause trouble.
1272
For example, the linker may hang indefinitely.  The fix is to remove
1273
<samp><span class="file">/usr/ucb</span></samp> from your <samp><span class="env">PATH</span></samp>.
1274
 
1275
   <p>The build process works more smoothly with the legacy Sun tools so, if you
1276
have <samp><span class="file">/usr/xpg4/bin</span></samp> in your <samp><span class="env">PATH</span></samp>, we recommend that you place
1277
<samp><span class="file">/usr/bin</span></samp> before <samp><span class="file">/usr/xpg4/bin</span></samp> for the duration of the build.
1278
 
1279
   <p>All releases of GNU binutils prior to 2.11.2 have known bugs on this
1280
platform.  We recommend the use of GNU binutils 2.11.2 or later, or the
1281
vendor tools (Sun <samp><span class="command">as</span></samp>, Sun <samp><span class="command">ld</span></samp>).  Note that your mileage
1282
may vary if you use a combination of the GNU tools and the Sun tools: while
1283
the combination GNU <samp><span class="command">as</span></samp> + Sun <samp><span class="command">ld</span></samp> should reasonably work,
1284
the reverse combination Sun <samp><span class="command">as</span></samp> + GNU <samp><span class="command">ld</span></samp> is known to
1285
cause memory corruption at runtime in some cases for C++ programs.
1286
 
1287
   <p>The stock GNU binutils 2.15 release is broken on this platform because of a
1288
single bug.  It has been fixed on the 2.15 branch in the CVS repository.
1289
You can obtain a working version by checking out the binutils-2_15-branch
1290
from the CVS repository or applying the patch
1291
<a href="http://sources.redhat.com/ml/binutils-cvs/2004-09/msg00036.html">http://sources.redhat.com/ml/binutils-cvs/2004-09/msg00036.html</a> to the
1292
release.
1293
 
1294
   <p>We recommend using GNU binutils 2.16 or later in conjunction with GCC 4.x,
1295
or the vendor tools (Sun <samp><span class="command">as</span></samp>, Sun <samp><span class="command">ld</span></samp>).  However, for
1296
Solaris 10 and above, an additional patch is required in order for the GNU
1297
linker to be able to cope with a new flavor of shared libraries.  You
1298
can obtain a working version by checking out the binutils-2_16-branch from
1299
the CVS repository or applying the patch
1300
<a href="http://sourceware.org/ml/binutils-cvs/2005-07/msg00122.html">http://sourceware.org/ml/binutils-cvs/2005-07/msg00122.html</a> to the
1301
release.
1302
 
1303
   <p>Sun bug 4296832 turns up when compiling X11 headers with GCC 2.95 or
1304
newer: <samp><span class="command">g++</span></samp> will complain that types are missing.  These headers assume
1305
that omitting the type means <code>int</code>; this assumption worked for C89 but
1306
is wrong for C++, and is now wrong for C99 also.
1307
 
1308
   <p><samp><span class="command">g++</span></samp> accepts such (invalid) constructs with the option
1309
<samp><span class="option">-fpermissive</span></samp>; it
1310
will assume that any missing type is <code>int</code> (as defined by C89).
1311
 
1312
   <p>There are patches for Solaris 2.6 (105633-56 or newer for SPARC,
1313
106248-42 or newer for Intel), Solaris 7 (108376-21 or newer for SPARC,
1314
108377-20 for Intel), and Solaris 8 (108652-24 or newer for SPARC,
1315
108653-22 for Intel) that fix this bug.
1316
 
1317
   <p>Sun bug 4927647 sometimes causes random spurious testsuite failures
1318
related to missing diagnostic output.  This bug doesn't affect GCC
1319
itself, rather it is a kernel bug triggered by the <samp><span class="command">expect</span></samp>
1320
program which is used only by the GCC testsuite driver.  When the bug
1321
causes the <samp><span class="command">expect</span></samp> program to miss anticipated output, extra
1322
testsuite failures appear.
1323
 
1324
   <p>There are patches for Solaris 8 (117350-12 or newer for SPARC,
1325
117351-12 or newer for Intel) and Solaris 9 (117171-11 or newer for
1326
SPARC, 117172-11 or newer for Intel) that address this problem.
1327
 
1328
   <p><hr />
1329
 
1330
<h3 class="heading"><a name="TOC51"></a><a name="sparc_002dsun_002dsolaris2"></a>sparc-sun-solaris2*</h3>
1331
 
1332
<p>When GCC is configured to use binutils 2.11.2 or later the binaries
1333
produced are smaller than the ones produced using Sun's native tools;
1334
this difference is quite significant for binaries containing debugging
1335
information.
1336
 
1337
   <p>Sun <samp><span class="command">as</span></samp> 4.x is broken in that it cannot cope with long symbol names.
1338
A typical error message might look similar to the following:
1339
 
1340
<pre class="smallexample">     /usr/ccs/bin/as: "/var/tmp/ccMsw135.s", line 11041: error:
1341
       can't compute value of an expression involving an external symbol.
1342
</pre>
1343
   <p>This is Sun bug 4237974.  This is fixed with patch 108908-02 for Solaris
1344
2.6 and has been fixed in later (5.x) versions of the assembler,
1345
starting with Solaris 7.
1346
 
1347
   <p>Starting with Solaris 7, the operating system is capable of executing
1348
64-bit SPARC V9 binaries.  GCC 3.1 and later properly supports
1349
this; the <samp><span class="option">-m64</span></samp> option enables 64-bit code generation.
1350
However, if all you want is code tuned for the UltraSPARC CPU, you
1351
should try the <samp><span class="option">-mtune=ultrasparc</span></samp> option instead, which produces
1352
code that, unlike full 64-bit code, can still run on non-UltraSPARC
1353
machines.
1354
 
1355
   <p>When configuring on a Solaris 7 or later system that is running a kernel
1356
that supports only 32-bit binaries, one must configure with
1357
<samp><span class="option">--disable-multilib</span></samp>, since we will not be able to build the
1358
64-bit target libraries.
1359
 
1360
   <p>GCC 3.3 and GCC 3.4 trigger code generation bugs in earlier versions of
1361
the GNU compiler (especially GCC 3.0.x versions), which lead to the
1362
miscompilation of the stage1 compiler and the subsequent failure of the
1363
bootstrap process.  A workaround is to use GCC 3.2.3 as an intermediary
1364
stage, i.e. to bootstrap that compiler with the base compiler and then
1365
use it to bootstrap the final compiler.
1366
 
1367
   <p>GCC 3.4 triggers a code generation bug in versions 5.4 (Sun ONE Studio 7)
1368
and 5.5 (Sun ONE Studio 8) of the Sun compiler, which causes a bootstrap
1369
failure in form of a miscompilation of the stage1 compiler by the Sun
1370
compiler.  This is Sun bug 4974440.  This is fixed with patch 112760-07.
1371
 
1372
   <p>GCC 3.4 changed the default debugging format from STABS to DWARF-2 for
1373
32-bit code on Solaris 7 and later.  If you use the Sun assembler, this
1374
change apparently runs afoul of Sun bug 4910101 (which is referenced as
1375
a x86-only problem by Sun, probably because they do not use DWARF-2).
1376
A symptom of the problem is that you cannot compile C++ programs like
1377
<samp><span class="command">groff</span></samp> 1.19.1 without getting messages similar to the following:
1378
 
1379
<pre class="smallexample">     ld: warning: relocation error: R_SPARC_UA32: ...
1380
       external symbolic relocation against non-allocatable section
1381
       .debug_info cannot be processed at runtime: relocation ignored.
1382
</pre>
1383
   <p>To work around this problem, compile with <samp><span class="option">-gstabs+</span></samp> instead of
1384
plain <samp><span class="option">-g</span></samp>.
1385
 
1386
   <p>When configuring the GNU Multiple Precision Library (GMP) on a Solaris 7
1387
or later system, the canonical target triplet must be specified as the
1388
<samp><span class="command">build</span></samp> parameter on the configure line:
1389
 
1390
<pre class="smallexample">     ./configure --build=sparc-sun-solaris2.7 --prefix=xxx --enable-mpfr
1391
</pre>
1392
   <p><hr />
1393
 
1394
<h3 class="heading"><a name="TOC52"></a><a name="sparc_002dsun_002dsolaris27"></a>sparc-sun-solaris2.7</h3>
1395
 
1396
<p>Sun patch 107058-01 (1999-01-13) for Solaris 7/SPARC triggers a bug in
1397
the dynamic linker.  This problem (Sun bug 4210064) affects GCC 2.8
1398
and later, including all EGCS releases.  Sun formerly recommended
1399
107058-01 for all Solaris 7 users, but around 1999-09-01 it started to
1400
recommend it only for people who use Sun's compilers.
1401
 
1402
   <p>Here are some workarounds to this problem:
1403
     <ul>
1404
<li>Do not install Sun patch 107058-01 until after Sun releases a
1405
complete patch for bug 4210064.  This is the simplest course to take,
1406
unless you must also use Sun's C compiler.  Unfortunately 107058-01
1407
is preinstalled on some new Solaris 7-based hosts, so you may have to
1408
back it out.
1409
 
1410
     <li>Copy the original, unpatched Solaris 7
1411
<samp><span class="command">/usr/ccs/bin/as</span></samp> into
1412
<samp><span class="command">/usr/local/libexec/gcc/sparc-sun-solaris2.7/3.4/as</span></samp>,
1413
adjusting the latter name to fit your local conventions and software
1414
version numbers.
1415
 
1416
     <li>Install Sun patch 106950-03 (1999-05-25) or later.  Nobody with
1417
both 107058-01 and 106950-03 installed has reported the bug with GCC
1418
and Sun's dynamic linker.  This last course of action is riskiest,
1419
for two reasons.  First, you must install 106950 on all hosts that
1420
run code generated by GCC; it doesn't suffice to install it only on
1421
the hosts that run GCC itself.  Second, Sun says that 106950-03 is
1422
only a partial fix for bug 4210064, but Sun doesn't know whether the
1423
partial fix is adequate for GCC.  Revision -08 or later should fix
1424
the bug.  The current (as of 2004-05-23) revision is -24, and is included in
1425
the Solaris 7 Recommended Patch Cluster.
1426
</ul>
1427
 
1428
   <p>GCC 3.3 triggers a bug in version 5.0 Alpha 03/27/98 of the Sun assembler,
1429
which causes a bootstrap failure when linking the 64-bit shared version of
1430
libgcc.  A typical error message is:
1431
 
1432
<pre class="smallexample">     ld: fatal: relocation error: R_SPARC_32: file libgcc/sparcv9/_muldi3.o:
1433
       symbol &lt;unknown&gt;:  offset 0xffffffff7ec133e7 is non-aligned.
1434
</pre>
1435
   <p>This bug has been fixed in the final 5.0 version of the assembler.
1436
 
1437
   <p>A similar problem was reported for version Sun WorkShop 6 99/08/18 of the
1438
Sun assembler, which causes a bootstrap failure with GCC 4.0.0:
1439
 
1440
<pre class="smallexample">     ld: fatal: relocation error: R_SPARC_DISP32:
1441
       file .libs/libstdc++.lax/libsupc++convenience.a/vterminate.o:
1442
         symbol &lt;unknown&gt;: offset 0xfccd33ad is non-aligned
1443
</pre>
1444
   <p>This bug has been fixed in more recent revisions of the assembler.
1445
 
1446
   <p><hr />
1447
 
1448
<h3 class="heading"><a name="TOC53"></a><a name="sparc_002dx_002dlinux"></a>sparc-*-linux*</h3>
1449
 
1450
<p>GCC versions 3.0 and higher require binutils 2.11.2 and glibc 2.2.4
1451
or newer on this platform.  All earlier binutils and glibc
1452
releases mishandled unaligned relocations on <code>sparc-*-*</code> targets.
1453
 
1454
   <p><hr />
1455
 
1456
<h3 class="heading"><a name="TOC54"></a><a name="sparc64_002dx_002dsolaris2"></a>sparc64-*-solaris2*</h3>
1457
 
1458
<p>The following compiler flags must be specified in the configure
1459
step in order to bootstrap this target with the Sun compiler:
1460
 
1461
<pre class="smallexample">        % CC="cc -xildoff -xarch=v9" <var>srcdir</var>/configure [<var>options</var>] [<var>target</var>]
1462
</pre>
1463
   <p><samp><span class="option">-xildoff</span></samp> turns off the incremental linker, and <samp><span class="option">-xarch=v9</span></samp>
1464
specifies the SPARC-V9 architecture to the Sun linker and assembler.
1465
 
1466
   <p><hr />
1467
 
1468
<h3 class="heading"><a name="TOC55"></a><a name="sparcv9_002dx_002dsolaris2"></a>sparcv9-*-solaris2*</h3>
1469
 
1470
<p>This is a synonym for sparc64-*-solaris2*.
1471
 
1472
   <p><hr />
1473
 
1474
<h3 class="heading"><a name="TOC56"></a><a name="x_002dx_002dsysv"></a>*-*-sysv*</h3>
1475
 
1476
<p>On System V release 3, you may get this error message
1477
while linking:
1478
 
1479
<pre class="smallexample">     ld fatal: failed to write symbol name <var>something</var>
1480
      in strings table for file <var>whatever</var>
1481
</pre>
1482
   <p>This probably indicates that the disk is full or your ulimit won't allow
1483
the file to be as large as it needs to be.
1484
 
1485
   <p>This problem can also result because the kernel parameter <code>MAXUMEM</code>
1486
is too small.  If so, you must regenerate the kernel and make the value
1487
much larger.  The default value is reported to be 1024; a value of 32768
1488
is said to work.  Smaller values may also work.
1489
 
1490
   <p>On System V, if you get an error like this,
1491
 
1492
<pre class="smallexample">     /usr/local/lib/bison.simple: In function `yyparse':
1493
     /usr/local/lib/bison.simple:625: virtual memory exhausted
1494
</pre>
1495
   <p class="noindent">that too indicates a problem with disk space, ulimit, or <code>MAXUMEM</code>.
1496
 
1497
   <p>On a System V release 4 system, make sure <samp><span class="file">/usr/bin</span></samp> precedes
1498
<samp><span class="file">/usr/ucb</span></samp> in <code>PATH</code>.  The <samp><span class="command">cc</span></samp> command in
1499
<samp><span class="file">/usr/ucb</span></samp> uses libraries which have bugs.
1500
 
1501
   <p><hr />
1502
 
1503
<h3 class="heading"><a name="TOC57"></a><a name="vax_002ddec_002dultrix"></a>vax-dec-ultrix</h3>
1504
 
1505
<p>Don't try compiling with VAX C (<samp><span class="command">vcc</span></samp>).  It produces incorrect code
1506
in some cases (for example, when <code>alloca</code> is used).
1507
 
1508
   <p><hr />
1509
 
1510
<h3 class="heading"><a name="TOC58"></a><a name="x_002dx_002dvxworks"></a>*-*-vxworks*</h3>
1511
 
1512
<p>Support for VxWorks is in flux.  At present GCC supports <em>only</em> the
1513
very recent VxWorks 5.5 (aka Tornado 2.2) release, and only on PowerPC.
1514
We welcome patches for other architectures supported by VxWorks 5.5.
1515
Support for VxWorks AE would also be welcome; we believe this is merely
1516
a matter of writing an appropriate &ldquo;configlette&rdquo; (see below).  We are
1517
not interested in supporting older, a.out or COFF-based, versions of
1518
VxWorks in GCC 3.
1519
 
1520
   <p>VxWorks comes with an older version of GCC installed in
1521
<samp><var>$WIND_BASE</var><span class="file">/host</span></samp>; we recommend you do not overwrite it.
1522
Choose an installation <var>prefix</var> entirely outside <var>$WIND_BASE</var>.
1523
Before running <samp><span class="command">configure</span></samp>, create the directories <samp><var>prefix</var></samp>
1524
and <samp><var>prefix</var><span class="file">/bin</span></samp>.  Link or copy the appropriate assembler,
1525
linker, etc. into <samp><var>prefix</var><span class="file">/bin</span></samp>, and set your <var>PATH</var> to
1526
include that directory while running both <samp><span class="command">configure</span></samp> and
1527
<samp><span class="command">make</span></samp>.
1528
 
1529
   <p>You must give <samp><span class="command">configure</span></samp> the
1530
<samp><span class="option">--with-headers=</span><var>$WIND_BASE</var><span class="option">/target/h</span></samp> switch so that it can
1531
find the VxWorks system headers.  Since VxWorks is a cross compilation
1532
target only, you must also specify <samp><span class="option">--target=</span><var>target</var></samp>.
1533
<samp><span class="command">configure</span></samp> will attempt to create the directory
1534
<samp><var>prefix</var><span class="file">/</span><var>target</var><span class="file">/sys-include</span></samp> and copy files into it;
1535
make sure the user running <samp><span class="command">configure</span></samp> has sufficient privilege
1536
to do so.
1537
 
1538
   <p>GCC's exception handling runtime requires a special &ldquo;configlette&rdquo;
1539
module, <samp><span class="file">contrib/gthr_supp_vxw_5x.c</span></samp>.  Follow the instructions in
1540
that file to add the module to your kernel build.  (Future versions of
1541
VxWorks will incorporate this module.)
1542
 
1543
   <p><hr />
1544
 
1545
<h3 class="heading"><a name="TOC59"></a><a name="x86_002d64_002dx_002dx"></a>x86_64-*-*, amd64-*-*</h3>
1546
 
1547
<p>GCC supports the x86-64 architecture implemented by the AMD64 processor
1548
(amd64-*-* is an alias for x86_64-*-*) on GNU/Linux, FreeBSD and NetBSD.
1549
On GNU/Linux the default is a bi-arch compiler which is able to generate
1550
both 64-bit x86-64 and 32-bit x86 code (via the <samp><span class="option">-m32</span></samp> switch).
1551
 
1552
   <p><hr />
1553
 
1554
<h3 class="heading"><a name="TOC60"></a><a name="xtensa_002dx_002delf"></a>xtensa-*-elf</h3>
1555
 
1556
<p>This target is intended for embedded Xtensa systems using the
1557
`<samp><span class="samp">newlib</span></samp>' C library.  It uses ELF but does not support shared
1558
objects.  Designed-defined instructions specified via the
1559
Tensilica Instruction Extension (TIE) language are only supported
1560
through inline assembly.
1561
 
1562
   <p>The Xtensa configuration information must be specified prior to
1563
building GCC.  The <samp><span class="file">include/xtensa-config.h</span></samp> header
1564
file contains the configuration information.  If you created your
1565
own Xtensa configuration with the Xtensa Processor Generator, the
1566
downloaded files include a customized copy of this header file,
1567
which you can use to replace the default header file.
1568
 
1569
   <p><hr />
1570
 
1571
<h3 class="heading"><a name="TOC61"></a><a name="xtensa_002dx_002dlinux"></a>xtensa-*-linux*</h3>
1572
 
1573
<p>This target is for Xtensa systems running GNU/Linux.  It supports ELF
1574
shared objects and the GNU C library (glibc).  It also generates
1575
position-independent code (PIC) regardless of whether the
1576
<samp><span class="option">-fpic</span></samp> or <samp><span class="option">-fPIC</span></samp> options are used.  In other
1577
respects, this target is the same as the
1578
<a href="#xtensa-*-elf">`<samp><span class="samp">xtensa-*-elf</span></samp>'</a> target.
1579
 
1580
   <p><hr />
1581
 
1582
<h3 class="heading"><a name="TOC62"></a><a name="windows"></a>Microsoft Windows (32-bit)</h3>
1583
 
1584
<p>Ports of GCC are included with the
1585
<a href="http://www.cygwin.com/">Cygwin environment</a>.
1586
 
1587
   <p>GCC will build under Cygwin without modification; it does not build
1588
with Microsoft's C++ compiler and there are no plans to make it do so.
1589
 
1590
   <p><hr />
1591
 
1592
<h3 class="heading"><a name="TOC63"></a><a name="os2"></a>OS/2</h3>
1593
 
1594
<p>GCC does not currently support OS/2.  However, Andrew Zabolotny has been
1595
working on a generic OS/2 port with pgcc.  The current code can be found
1596
at <a href="http://www.goof.com/pcg/os2/">http://www.goof.com/pcg/os2/</a>.
1597
 
1598
   <p><hr />
1599
 
1600
<h3 class="heading"><a name="TOC64"></a><a name="older"></a>Older systems</h3>
1601
 
1602
<p>GCC contains support files for many older (1980s and early
1603
1990s) Unix variants.  For the most part, support for these systems
1604
has not been deliberately removed, but it has not been maintained for
1605
several years and may suffer from bitrot.
1606
 
1607
   <p>Starting with GCC 3.1, each release has a list of &ldquo;obsoleted&rdquo; systems.
1608
Support for these systems is still present in that release, but
1609
<samp><span class="command">configure</span></samp> will fail unless the <samp><span class="option">--enable-obsolete</span></samp>
1610
option is given.  Unless a maintainer steps forward, support for these
1611
systems will be removed from the next release of GCC.
1612
 
1613
   <p>Support for old systems as hosts for GCC can cause problems if the
1614
workarounds for compiler, library and operating system bugs affect the
1615
cleanliness or maintainability of the rest of GCC.  In some cases, to
1616
bring GCC up on such a system, if still possible with current GCC, may
1617
require first installing an old version of GCC which did work on that
1618
system, and using it to compile a more recent GCC, to avoid bugs in the
1619
vendor compiler.  Old releases of GCC 1 and GCC 2 are available in the
1620
<samp><span class="file">old-releases</span></samp> directory on the <a href="../mirrors.html">GCC mirror sites</a>.  Header bugs may generally be avoided using
1621
<samp><span class="command">fixincludes</span></samp>, but bugs or deficiencies in libraries and the
1622
operating system may still cause problems.
1623
 
1624
   <p>Support for older systems as targets for cross-compilation is less
1625
problematic than support for them as hosts for GCC; if an enthusiast
1626
wishes to make such a target work again (including resurrecting any of
1627
the targets that never worked with GCC 2, starting from the last
1628
version before they were removed), patches
1629
<a href="../contribute.html">following the usual requirements</a> would be
1630
likely to be accepted, since they should not affect the support for more
1631
modern targets.
1632
 
1633
   <p>For some systems, old versions of GNU binutils may also be useful,
1634
and are available from <samp><span class="file">pub/binutils/old-releases</span></samp> on
1635
<a href="http://sources.redhat.com/mirrors.html">sources.redhat.com mirror sites</a>.
1636
 
1637
   <p>Some of the information on specific systems above relates to
1638
such older systems, but much of the information
1639
about GCC on such systems (which may no longer be applicable to
1640
current GCC) is to be found in the GCC texinfo manual.
1641
 
1642
   <p><hr />
1643
 
1644
<h3 class="heading"><a name="TOC65"></a><a name="elf"></a>all ELF targets (SVR4, Solaris 2, etc.)</h3>
1645
 
1646
<p>C++ support is significantly better on ELF targets if you use the
1647
<a href="./configure.html#with-gnu-ld">GNU linker</a>; duplicate copies of
1648
inlines, vtables and template instantiations will be discarded
1649
automatically.
1650
 
1651
   <p><hr />
1652
<p><a href="./index.html">Return to the GCC Installation page</a>
1653
 
1654
<!-- ***Old documentation****************************************************** -->
1655
<!-- ***GFDL******************************************************************** -->
1656
<!-- *************************************************************************** -->
1657
<!-- Part 6 The End of the Document -->
1658
</body></html>
1659
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.