summaryrefslogtreecommitdiff
path: root/gnu/egcs/install/specific.html
blob: c7004ecf6d8493591230a867b80d2a791a83964f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
<html>
<head>
<title>Host/Target specific installation notes for GCC</title>
</head>
<body>

<h1 align="center">Host/Target specific installation notes for GCC</h1>

<p>Please read this document carefully <i>before</i> installing the
GNU Compiler Collection on your machine.</p>

<ul>
  <li><a href="#alpha*-dec-linux*">alpha*-dec-linux*</a></li>
  <li><a href="#alpha*-dec-osf*">alpha*-dec-osf*</a></li>
  <li><a href="#dos">DOS</a></li>
  <li><a href="#hppa*-hp-hpux*">hppa*-hp-hpux*</a></li>
  <li><a href="#hppa*-hp-hpux9">hppa*-hp-hpux9</a></li>
  <li><a href="#hppa*-hp-hpux10">hppa*-hp-hpux10</a></li>
  <li><a href="#hppa*-hp-hpux11">hppa*-hp-hpux11</a></li>
  <li><a href="#*-*-linux-gnu">*-*-linux-gnu</a></li>
  <li><a href="#ix86-*-linux*">i?86-*-linux*</a></li>
  <li><a href="#ix86-*-sco3.2v5*">i?86-*-sco3.2v5*</a></li>
  <li><a href="#ix86-*-solaris*">i?86-*-solaris*</a></li>
  <li><a href="#ix86-*-udk">i?86-*-udk</a></li>
  <li><a href="#*-ibm-aix*">*-ibm-aix*</a></li>
  <li><a href="#m68k-*-nextstep*">m68k-*-nextstep*</a></li>
  <li><a href="#m68k-sun-sunos4.1.1">m68k-sun-sunos4.1.1</a></li>
  <li><a href="#mips*-sgi-irix[45]">mips*-sgi-irix[45]</a></li>
  <li><a href="#mips*-sgi-irix6">mips*-sgi-irix6</a></li>
  <li><a href="#powerpc-*-linux-gnu*">powerpc-*-linux-gnu*</a></li>
  <li><a href="#*-*-solaris*">*-*-solaris*</a></li>
  <li><a href="#sparc-sun-solaris*">sparc-sun-solaris*</a></li>
  <li><a href="#sparc-sun-solaris2.7">sparc-sun-solaris2.7</a></li>
  <li><a href="#sunv5">Sun V5.0 Compiler Bugs</a></li>
  <li><a href="#sparc-sun-sunos*">sparc-sun-sunos*</a></li>
  <li><a href="#sparc-unknown-linux-gnulibc1">sparc-unknown-linux-gnulibc1</a></li>
  <li><a href="#sparc64-*-*">sparc64-*-*</a></li>
  <li><a href="#windows">Microsoft Windows</a></li>
  <li><a href="#os2">OS/2</a></li>
</ul>

<ul>
  <li><a href="#elf_targets">all ELF targets (SVR4, Solaris, etc.)</a></li>
</ul>


<!-- -------- host/target specific issues start here ---------------- -->


<hr>
<h3><a name="alpha*-dec-linux*">alpha*-dec-linux*</a></h3>

<p>We strongly recommend to upgrade to binutils 2.10 (or newer).</p>

<p>The following error:</p>
<pre>
  Error: macro requires $at register while noat in effect
</pre>
<p>indicates that you should upgrade to a newer version of
the assembler, 2.9 or later.  If you can not upgrade the assembler, the
compiler option "-Wa,-m21164a" may work around this problem.</p>


<hr>
<h3><a name="alpha*-dec-osf*">alpha*-dec-osf*</a></h3>

<p>If you install a shared libstdc++ and, when you link a non-trivial C++
program (for example, <code>gcc/testsuite/g++.other/delete3.C</code>),
the linker reports a couple of errors about multiply-defined symbols
(for example, <code>nothrow</code>, <code>__throw</code> and
<code>terminate(void)</code>), you've probably got a linker bug, for
which there's no known fix.  The officially recommended work-around is
to remove the shared libstdc++.</p>

<p>An alternative solution is to arrange that all symbols from
<code>libgcc</code> get copied to the shared <code>libstdc++</code>;
see detailed solution below.  (Surprising as it may seem, this does
indeed fix the problem!)  <em>Beware</em> that this may bring you
binary-compatibility problems in the future, if you don't use the same
work-around next time you build <code>libstdc++</code>: if programs
start to depend on <code>libstdc++</code> to provide symbols that used
to be only in <code>libgcc</code>, you must arrange that
<code>libstdc++</code> keeps providing them, otherwise the programs
will have to be relinked.</p>

<p>The magic spell is to add <code>-Wl,-all,-lgcc,-none</code> to the
definition of macro <code>SHDEPS</code> in
<code>libstdc++/config/dec-osf.ml</code> <em>before</em>
<code>alpha*-dec-osf*/libstdc++/Makefile</code> is created (a <a
href="dec-osf-shlibstdc++.patch">patch</a> that does just that is
available).  If the Makefile already exists, run
<code>./config.status</code> within directory
<code>alpha*-dec-osf*/libstdc++</code> (and
<code>alpha*-dec-osf*/ieee/libstdc++</code>, if it also exists).
Remove any existing <code>libstdc++.so*</code> from such directories,
and run <code>make all-target-libstdc++</code> in the top-level
directory, then <code>make install-target-libstdc++</code>.</p>
	  
<p>If you have already removed the build tree, you may just remove
<code>libstdc++.so.2.10.0</code> from the install tree and re-create
it with the command <code>gcc -shared -o libstdc++.so.2.10.0
-Wl,-all,-lstdc++,-lgcc,-none -lm</code>.  If the <code>ieee</code>
sub-directory exists, repeat this command in it, with the additional
flag <code>-mieee</code>.</p>


<hr>
<h3><a name="dos">DOS</a></h3>

<p>Please have a look at our <a href="binaries.html">binaries page</a>.</p>


<hr>
<h3><a name="hppa*-hp-hpux*">hppa*-hp-hpux*</a></h3>

<p>We <em>highly</em> recommend using gas/binutils-2.8 or newer on all hppa
platforms; you may encounter a variety of problems when using the HP assembler.</p>

<p>Specifically, <code>-g</code> does not work on HP-UX (since that system
uses a peculiar debugging format which GCC does not know about), unless you
use GAS and GDB and configure GCC with the <code>--with-gnu-as</code>
option.</p>

<p>If you wish to use pa-risc 2.0 architecture support, you must use either
the HP assembler or a recent
<a href="ftp://sources.redhat.com/pub/binutils/snapshots">snapshot of
gas</a>.</p>

<p>More specific information to hppa*-hp-hpux* targets follows.</p>


<hr>
<h3><a name="hppa*-hp-hpux9">hppa*-hp-hpux9</a></h3>

<p>The HP assembler has major problems on this platform.  We've tried to work
around the worst of the problems.  However, those workarounds may be causing
linker crashes in some circumstances; the workarounds also probably prevent
shared libraries from working.  Use the GNU assembler to avoid these problems.</p>

<p>The configuration scripts for GCC will also trigger a bug in the hpux9
shell.  To avoid this problem set CONFIG_SHELL to /bin/ksh and SHELL to
/bin/ksh in your environment.</p>


<hr>
<h3><a name="hppa*-hp-hpux10">hppa*-hp-hpux10</a></h3>

<p>For hpux10.20, we <em>highly</em> recommend you pick up the latest sed
patch <code>PHCO_19798</code> from HP.  HP has two sites which provide patches free of charge:</p>
<ul>
  <li><a href="http://us-support.external.hp.com">US, Canada, Asia-Pacific, and
Latin-America</a></li>
  <li><a href="http://europe-support.external.hp.com">Europe</a></li>
</ul>

<p>The HP assembler on these systems is much better than the hpux9 assembler,
but still has some problems.  Most notably the assembler inserts timestamps
into each object file it creates, causing the 3-stage comparison test to fail
during a `<code>make bootstrap</code>'.  You should be able to continue by 
saying `<code>make all</code>' after getting the failure from `<code>make 
bootstrap</code>'.</p>


<hr>
<h3><a name="hppa*-hp-hpux11">hppa*-hp-hpux11</a></h3>

<p>GCC 2.95.2 does not support HP-UX 11, and it cannot generate 64-bit
object files. Current (as of late 2000) snapshots and GCC 3.0 do support
HP-UX 11.</p>

 
<hr>
<h3><a name="*-*-linux-gnu">*-*-linux-gnu</a></h3>

<p>If you use glibc 2.2 (or 2.1.9x), GCC 2.95.2 won't install
out-of-the-box.  You'll get compile errors while building libstdc++.
The patch <a href="glibc-2.2.patch">glibc-2.2.patch</a>, that is to be
applied in the GCC source tree, fixes the compatibility problems.</p>

<hr>
<h3><a name="ix86-*-linux*">i?86-*-linux*</a></h3>

<p>You will need binutils-2.9.1.0.15 or newer for exception handling to work.</p>

<p>If you receive Signal 11 errors when building on GNU/Linux, then it is
possible you have a hardware problem.  Further information on this can be
found on <a href="http://www.bitwizard.nl/sig11/">www.bitwizard.nl.</a></p>


<hr>
<h3><a name="ix86-*-sco3.2v5*">i?86-*-sco3.2v5*</a></h3>

<p>Unlike earlier versions of GCC, the ability to generate COFF with this
target is no longer provided.   

<p>Earlier versions of GCC emitted Dwarf-1 when generating ELF to allow
the system debugger to be used.  That support was too burdensome to
maintain.  GCC now emits only dwarf-2 for this target.  This means you
may use either the UDK debugger or GDB to debug programs built by this
version of GCC.

<p>If you are building languages other than C, you must follow the instructions
about invoking `<code>make bootstrap</code>' because the native OpenServer
compiler will build a <code>cc1plus</code> that will not correctly parse many
valid C++ programs including those in <code>libgcc.a</code>.  <b>You must do a `<code>make bootstrap</code>' if you are building with the native compiler.</b></p>

<p>Use of the `<code>-march-pentiumpro</code>' flag can result in
unrecognized opcodes when using the native assembler on OS versions before
5.0.6. (Support for P6 opcodes was added to the native ELF assembler in
that version.)  While it's rather rare to see these emitted by GCC yet, 
errors of the basic form:</p>
<pre>
  /usr/tmp/ccaNlqBc.s:22:unknown instruction: fcomip
  /usr/tmp/ccaNlqBc.s:50:unknown instruction: fucomip
</pre>

<p>are symptoms of this problem.  You may work around this by not
building affected files with that flag, by using the GNU assembler, or
by using the assembler provided with the current version of the OS.
Users of GNU assembler should see the note below for hazards on doing
so.</p>

<p>The native SCO assembler that is provided with the OS at no
charge is normally required.  If, however, you must be able to use
the GNU assembler (perhaps you're compiling code with asms that
require GAS syntax) you may configure this package using the flags
<code>--with-gnu-as</code>.  You must use a recent version of GNU
binutils; versions past 2.9.1 seem to work well.

In general, the <code>--with-gnu-as</code> option isn't as well tested
as the native assembler.</p>

<p>Look in <code>gcc/config/i386/sco5.h</code> (search for "messy") for
additional OpenServer-specific flags.</p>

<p>Systems based on OpenServer before 5.0.4 (`<code>uname -X</code>'
will tell you what you're running) require TLS597 from ftp.sco.com/TLS
for C++ constructors and destructors to work right.</p>

<p>The system linker in (at least) 5.0.4 and 5.0.5 will sometimes
do the wrong thing for a construct that GCC will emit for PIC
code.  This can be seen as execution testsuite failures when using
-fPIC on 921215-1.c, 931002-1.c, nestfunc-1.c, and gcov-1.c.
For 5.0.5, an updated linker that will cure this problem is
available.  You must install both <a href="ftp://ftp.sco.com/Supplements/rs505a/">
ftp://ftp.sco.com/Supplements/rs505a/</a> and <a href="ftp://ftp.sco.com/SLS/">
OSS499A</a>.</p>

<p>The dynamic linker in OpenServer 5.0.5 (earlier versions may show
the same problem) aborts on certain g77-compiled programs.  It's particularly
likely to be triggered by building Fortran code with the <code>-fPIC</code>
flag.
Although it's conceivable that the error could be triggered by other
code, only G77-compiled code has been observed to cause this abort.
If you are getting core dumps immediately upon execution of your
g77 program - and especially if it's compiled with -fPIC - try applying
<a href="sco_osr5_g77.patch"><code>`sco_osr5_g77.patch'</code></a> to your libf2c and 
rebuilding
GCC.  Affected faults, when analyzed in a debugger, will show a stack
backtrace with a fault occurring in <code>rtld()</code> and the program
running as <code>/usr/lib/ld.so.1</code>.  This problem has been reported to SCO engineering
and will hopefully be addressed in later releases.</p>


<hr>
<h3><a name="ix86-*-solaris*">i?86-*-solaris*</a></h3>

<p>GCC 2.95.2, when configured to use the GNU assembler, would invoke
it with the <code>-s</code> switch, that GNU as up to 2.9.5.0.12 does
not support.  If you'd rather not use a newer GNU as nor the native
assembler, you'll need the patch <a
href="x86-sol2-gas.patch"><code>`x86-sol2-gas.patch'</code></a>.</p>


<hr>
<h3><a name="ix86-*-udk">i?86-*-udk</a></h3>

<p>This target emulates the SCO Universal Development Kit and requires that
package be installed.  (If it is installed, you will have a <code>/udk/usr/ccs/bin/cc </code>file present.)  It's very much like the <code>i?86-*-unixware7*</code> target
but is meant to be used when hosting on a system where UDK isn't the
default compiler such as OpenServer 5 or Unixware 2.  This target will
generate binaries that will run on OpenServer, Unixware 2, or Unixware 7, 
with the same warnings and caveats as the SCO UDK.</p>

<p>You can stage1 with either your native compiler or with UDK.   If you
don't do a full bootstrap when initially building with your native compiler
you will have an utterly unusable pile of bits as your reward.</p>

<p>This target is a little tricky to build because we have to distinguish
it from the native tools (so it gets headers, startups, and libraries
from the right place) while making the tools not think we're actually 
building a cross compiler.   The easiest way to do this is with a configure
command like this:</p>
<pre>
  CC=/udk/usr/ccs/bin/cc <i>/your/path/to/</i>gcc/configure --host=i686-pc-udk --target=i686-pc-udk --program-prefix=udk-
</pre>
<p><i>You should substitute 'i686' in the above command with the appropriate
processor for your host.</i></p>

<p>You should follow this with a `<code>make bootstrap</code>'  then
`<code>make install</code>'.  You can then access the UDK-targeted GCC 
tools by adding <code>udk-</code> before the commonly known name.  For example, to invoke the C compiler, you would use `<code>udk-gcc</code>'.  They will coexist peacefully with any native-target GCC tools you may have installed.</p>


<hr>
<h3><a name="*-ibm-aix*">*-ibm-aix*</a></h3>
<!-- rs6000-ibm-aix*, powerpc-ibm-aix* -->

<p>AIX Make frequently has problems with GCC makefiles.  GNU Make 3.76 or
newer is recommended to build on this platform.</p>

<p>Errors involving &quot;alloca&quot; when building GCC generally are due
to an incorrect definition of <tt>CC</tt> in the Makefile or mixing files
compiled with the native C compiler and GCC.  During the stage1 phase of
the build, the native AIX compiler <b>must</b> be invoked as &quot;cc&quot;
(not &quot;xlc&quot;).  Once <tt>configure</tt> has been informed of
&quot;xlc&quot;, one needs to use &quot;make distclean&quot; to remove the
configure cache files and ensure that <tt>$CC</tt> environment variable
does not provide a definition that will confuse <tt>configure</tt>.
If this error occurs during stage2 or later, then the problem most likely
is the version of Make (see above).</p>

<p>Some versions of the AIX binder (linker) can fail with a relocation
overflow severe error when the -bbigtoc option is used to link
GCC-produced object files into an executable that overflows the TOC.  A fix
for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND -BBIGTOC) is
available from IBM Customer Support and from its
<a href="http://service.boulder.ibm.com/">service.boulder.ibm.com</a>
website as PTF U455193.</p>

<p>Binutils does not support AIX 4.3 (at least through release 2.9).
GNU as and GNU ld will not work properly and one should not configure GCC
to use those GNU utilities.  Use the native AIX tools which do interoperate
with GCC.</p>

<p>AIX 4.3 utilizes a new &quot;large format&quot; archive to support both
32-bit and 64-bit object modules.  The routines provided in AIX 4.3.0 and
AIX 4.3.1 to parse archive libraries did not handle the new format correctly.
These routines are used by GCC and result in error messages during linking
such as &quot;not a COFF file&quot;.  The version of the routines shipped
with AIX 4.3.1 should work for a 32-bit environment.  The <tt>-g</tt> option
of the archive command may be used to create archives of 32-bit objects
using the original "small format".  A correct version of the routines is
shipped with AIX 4.3.2.</p>

<p>The initial assembler shipped with AIX 4.3.0 generates incorrect object
files.  A fix for APAR IX74254 (64BIT DISASSEMBLED OUTPUT FROM COMPILER FAILS
TO ASSEMBLE/BIND) is available from IBM Customer Support and from its
<a href="http://service.boulder.ibm.com/">service.boulder.ibm.com</a>
website as PTF U453956.  This fix is incorporated in AIX 4.3.1 and above.</p>

<p>The AIX 4.3.2.1 linker (bos.rte.bind_cmds Level 4.3.2.1) will dump core
with a segmentation fault when invoked by any version of GCC.  A fix for
APAR IX87327 is available from IBM Customer Support and from its
<a href="http://service.boulder.ibm.com/">service.boulder.ibm.com</a>
website as PTF U461879.  This fix is incorporated in AIX 4.3.3 and above.</p>


<hr>
<h3><a name="m68k-*-nextstep*">m68k-*-nextstep*</a></h3>

<p>You absolutely <b>must</b> use GNU sed and GNU make on this platform.</p>

<p>On NEXTSTEP 3.x where x &lt; 3 the build of GCC will abort during  
stage1 with an error message like this:</p>
<pre>
  _eh
  /usr/tmp/ccbbsZ0U.s:987:Unknown pseudo-op: .section
  /usr/tmp/ccbbsZ0U.s:987:Rest of line ignored. 1st junk character  
  valued 95 (_).
</pre>
<p>The reason for this is the fact that NeXT's assembler for these  
versions of the operating system does not support the .section  
pseudo op that's needed for full C++ exception functionality.</p>

<p>As NeXT's assembler is a derived work from GNU as, a free  
replacement that does can be obtained at 
<a href="ftp://ftp.next.peak.org:/next-ftp/next/apps/devtools/as.3.3.NIHS.s.tar.gz">ftp://ftp.next.peak.org:/next-ftp/next/apps/devtools/as.3.3.NIHS.s.tar.gz</a>.
</p>

<p>If you try to build the integrated C++ & C++ runtime libraries on this system
you will run into trouble with include files.  The way to get around this is
to use the following sequence.  Note you must have write permission to
the directory <i>prefix</i> you specified in the configuration process of GCC
for this sequence to work.</p>
<pre>
  cd bld-gcc
  make all-texinfo all-bison all-byacc all-binutils all-gas all-ld
  cd gcc
  make bootstrap
  make install-headers-tar
  cd ..
  make bootstrap3
</pre>


<hr>
<h3><a name="m68k-sun-sunos4.1.1">m68k-sun-sunos4.1.1</a></h3>

<p>It is reported that you may need the GNU assembler on this platform.</p>


<hr>
<h3><a name="mips*-sgi-irix[45]">mips*-sgi-irix[45]</a></h3>

<p>You must use GAS on these platforms, as the native assembler can not handle the code for exception handling support. Either of these messages indicates that you are using the MIPS assembler when instead you should be using GAS:</p>
<pre>
  as0: Error: ./libgcc2.c, line 1:Badly delimited numeric literal
  .4byte $LECIE1-$LSCIE1
  as0: Error: ./libgcc2.c, line 1:malformed statement
</pre>
<p>or:</p>
<pre>
  as0: Error: /src/bld-gcc/gcc/libgcc2.c, line 1:undefined symbol in expression
  .word $LECIE1-$LSCIE1
</pre>

<p>These systems don't have ranlib, which various components in GCC need; you
should be able to avoid this problem by installing GNU binutils, which includes
a functional ranlib for this system.</p>

<p>You may get the following warning on irix4 platforms, it can be safely
ignored.</p>
<pre>
  warning: foo.o does not have gp tables for all its sections.
</pre>

<p>When building GCC, the build process loops rebuilding cc1 over and
over again.  This happens on mips-sgi-irix5.2, and possibly other platforms.<br>
It has been reported that this is a known bug in the make shipped with
IRIX 5.2.  We recommend you use GNU make instead of the vendor supplied
make program; however, you may have success with "smake" on IRIX 5.2 if
you do not have GNU make available.</p>

<p>See <a href="http://reality.sgi.com/ariel/freeware/">
http://reality.sgi.com/ariel/freeware</a> for more information about
using GCC on IRIX platforms.</p>


<hr>
<h3><a name="mips*-sgi-irix6">mips*-sgi-irix6</a></h3>

<p>You must <i>not</i> use GAS on irix6 platforms; doing so will only
cause problems.</p>

<p>These systems don't have ranlib, which various components in GCC need; you
should be able to avoid this problem by making a dummy script called ranlib
which just exits with zero status and placing it in your path.</p>

<p>If you are using Irix cc as your bootstrap compiler, you must
ensure that the N32 ABI is in use.  To test this, compile a simple C
file with <CODE>cc</CODE> and then run <CODE>file</CODE> on the
resulting object file.  The output should look like:</p>

<blockquote><code>
test.o:         ELF N32 MSB ...
</code></blockquote>

If you see:
<blockquote><code>
test.o:         ELF 32-bit MSB
</code></blockquote>

<p>then your version of <CODE>cc</CODE> uses the O32 ABI default.  You
should set the environment variable <CODE>CC</CODE> to 'cc -n32'
before configuring GCC.</p>

<p>GCC does not currently support generating O32 ABI binaries in the
mips-sgi-irix6 configurations.  It used to be possible to create a GCC
with O32 ABI only support by configuring it for the mips-sgi-irix5
target.  See the link below for details.</p>

<p>GCC does not correctly pass/return structures which are
smaller than 16 bytes and which are not 8 bytes. The problem is very
involved and difficult to fix. It affects a number of other targets also,
but IRIX 6 is affected the most, because it is a 64 bit target, and 4 byte
structures are common. The exact problem is that structures are being padded
at the wrong end, e.g. a 4 byte structure is loaded into the lower 4 bytes
of the register when it should be loaded into the upper 4 bytes of the
register. </p>

<p>GCC is consistent with itself, but not consistent with the SGI C compiler
(and the SGI supplied runtime libraries), so the only failures that can
happen are when there are library functions that take/return such
structures. There are very few such library functions. I can only recall
seeing two of them: inet_ntoa, and semctl. </p>

<p>See <a href="http://reality.sgi.com/ariel/freeware/">
http://reality.sgi.com/ariel/freeware</a> for more information about
using GCC on IRIX platforms.</p>


<hr>
<h3><a name="powerpc-*-linux-gnu*">powerpc-*-linux-gnu*</a></h3>

<p>You will need 
<a href="ftp://ftp.varesearch.com/pub/support/hjl/binutils">binutils-2.9.4.0.8</a> or newer for a working GCC. It is strongly recommended to recompile binutils
if you initially built it with gcc-2.7.2.x.</p>


<hr>
<h3><a name="*-*-solaris*">*-*-solaris*</a></h3>

<p>Starting with Solaris, Sun does not ship a C compiler any more. To
bootstrap and install GCC you first have to install a pre-built
compiler, see our <a href="binaries.html">binaries page</a> for
details.</p>

<p>Sun as 4.X is broken in that it cannot cope with long symbol names.
A typical error message might look similar to the following:
<BLOCKQUOTE><CODE>
/usr/ccs/bin/as: "/var/tmp/ccMsw135.s", line 11041: error: can't compute      
value of an expression involving an external symbol.
</CODE></BLOCKQUOTE>
<p>See the <a href="../faq.html#squangle">How to work around too long C++
symbol names?</a> FAQ entry for further information.</p>

<p>Sun make in all known Solaris 1 (SunOS 4) and Solaris 2 releases has a
broken <i>VPATH</i> mechanism, which means you must either:
<ul>
  <li>Use GNU make (recommended), <em>or:</em></li>
  <li>Always build in the source directory, <em>or:</em></li>
  <li><em>(For GCC 2.95.1 only)</em>
      apply the patches mentioned at
      <a href="http://www.gnu.org/software/gcc/extensions.html#sun-make">
      http://www.gnu.org/software/gcc/extensions.html#sun-make</a>.</li>
</ul>


<hr>
<h3><a name="sparc-sun-solaris*">sparc-sun-solaris*</a></h3>

<p>binutils 2.9.1 has known bugs on this platform. We recommend to use
the vendor tools (Sun as, Sun ld) until these have been fixed.
Unfortunately, C++ shared libraries, including libstdc++, won't work
properly if assembled with Sun as: the linker will complain about
relocations in read-only sections, in the definition of virtual
tables.  Some possible work-arounds: use some development release of
binutils, wait for the next stable binutils release or refrain from
creating C++ shared libraries.</p>


<hr>
<h3><a name="sparc-sun-solaris2.7">sparc-sun-solaris2.7</a></h3>

<p>Sun patch 107058-01 (1999-01-13) for SPARC Solaris 7 triggers a bug in
the dynamic linker.  This problem (Sun bug 4210064) affects GCC 2.8
and later, including all EGCS releases.  Sun formerly recommended
107058-01 for all Solaris 7 users, but around 1999-09-01 it started to
recommend it only for people who use Sun's compilers.</p>
  
<p>Here are some workarounds to this problem:
<ul>
  <li>Do not install Sun patch 107058-01 until after Sun releases a
  complete patch for bug 4210064.  This is the simplest course to take,
  unless you must also use Sun's C compiler.  Unfortunately 107058-01
  is preinstalled on some new Solaris-based hosts, so you may have to
  back it out.</li>
  
<li>Copy the original, unpatched Solaris 7
  <code>/usr/ccs/bin/as</code> into
  <code>/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/as</code>,
  adjusting the latter name to fit your local conventions and software
  version numbers.</li>

<li>Install Sun patch 106950-03 (1999-05-25) or later.  Nobody with
  both 107058-01 and 106950-03 installed has reported the bug with GCC
  and Sun's dynamic linker.  This last course of action is riskiest,
  for two reasons.  First, you must install 106950 on all hosts that
  run code generated by GCC; it doesn't suffice to install it only on
  the hosts that run GCC itself.  Second, Sun says that 106950-03 is
  only a partial fix for bug 4210064, but Sun doesn't know whether the
  partial fix is adequate for GCC.  Revision -08 or later should fix
  the bug, but (as of 1999-10-06) it is still being tested.</li>
</ul> 


<hr>
<h3><a name="sunv5">Sun V5.0 Compiler Bugs</a></h3>
The Sun V5.0 compilers are known to mis-compile GCC 2.95 and GCC 2.95.1,
which in turn causes GCC to fail its bootstrap comparison test.
GCC 2.95.2 has a workaround.


<hr>
<h3><a name="sparc-sun-sunos*">sparc-sun-sunos*</a></h3>

<p>A bug in the SunOS4 linker will cause it to crash when linking
-fPIC compiled objects (and will therefore not allow you to build
shared libraries).</p>

<p>To fix this problem you can either use the most recent version of
binutils or get the latest SunOS4 linker patch (patch ID 100170-10)
from Sun's patch site.</p>


<hr>
<h3><a name="sparc-unknown-linux-gnulibc1">sparc-unknown-linux-gnulibc1</a></h3>

<p>It has been reported that you might need 
<a href="ftp://ftp.yggdrasil.com/private/hjl">binutils-2.8.1.0.23</a>
for this platform, too.</p>


<hr>
<h3><a name="sparc64-*-*">sparc64-*-*</a></h3>

<p>GCC version 2.95 is not able to compile code correctly for
<code>sparc64</code> targets.  Users of the Linux kernel, at least,
can use the <code>sparc32</code> program to start up a new shell
invocation with an environment that causes <code>configure</code> to
recognize (via <code>uname -a</code>) the system as
<code>sparc-*-*</code> instead.</p>


<hr>
<h3><a name="windows"></a>Microsoft Windows (32 bit)</h3>

<p>GCC currently builds under the <a href="http://www.cygwin.com/">Cygwin
environment</a>.  However you need to delete (or rename) the texinfo
directory included with the GCC sources.  You will also need to configure
with the option <code>--with-included-gettext</code>.</p>

<hr>
<h3><a name="os2"></a>OS/2</h3>

<p>GCC does not currently support OS/2.  However, Andrew Zabolotny has been
working on a generic OS/2 port with pgcc.  The current code code can be found
at <a href="http://www.goof.com/pcg/os2/">http://www.goof.com/pcg/os2/</a>.</p>

<p>An older copy of GCC 2.8.1 is included with the EMX tools available at 
<a href="ftp://ftp.leo.org/pub/comp/os/os2/leo/devtools/emx+gcc/">
ftp://ftp.leo.org/pub/comp/os/os2/leo/devtools/emx+gcc/</a>.</p>


<hr>
<h3><a name="elf_targets">all ELF targets (SVR4, Solaris, etc.)</a></h3>

<p>C++ support is significantly better on ELF targets if you use the GNU
linker; duplicate copies of inlines, vtables and template instantiations
will be discarded automatically.</p>


<hr>
<p><a href="./index.html">Return to the GCC Installation page</a></p>

</body>
</html>