1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6<!-- Copyright (C) 1988-2022 Free Software Foundation, Inc.
7
8Permission is granted to copy, distribute and/or modify this document
9under the terms of the GNU Free Documentation License, Version 1.3 or
10any later version published by the Free Software Foundation; with no
11Invariant Sections, the Front-Cover texts being (a) (see below), and
12with the Back-Cover Texts being (b) (see below).  A copy of the
13license is included in the section entitled "GNU
14Free Documentation License".
15
16(a) The FSF's Front-Cover Text is:
17
18A GNU Manual
19
20(b) The FSF's Back-Cover Text is:
21
22You have freedom to copy and modify this GNU Manual, like GNU
23     software.  Copies published by the Free Software Foundation raise
24     funds for GNU development. -->
25<title>Host/Target specific installation notes for GCC</title>
26
27<meta name="description" content="Host/Target specific installation notes for GCC">
28<meta name="keywords" content="Host/Target specific installation notes for GCC">
29<meta name="resource-type" content="document">
30<meta name="distribution" content="global">
31<meta name="Generator" content="makeinfo">
32<meta name="viewport" content="width=device-width,initial-scale=1">
33
34<style type="text/css">
35<!--
36a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
37a.summary-letter {text-decoration: none}
38blockquote.indentedblock {margin-right: 0em}
39div.display {margin-left: 3.2em}
40div.example {margin-left: 3.2em}
41kbd {font-style: oblique}
42pre.display {font-family: inherit}
43pre.format {font-family: inherit}
44pre.menu-comment {font-family: serif}
45pre.menu-preformatted {font-family: serif}
46span.nolinebreak {white-space: nowrap}
47span.roman {font-family: initial; font-weight: normal}
48span.sansserif {font-family: sans-serif; font-weight: normal}
49span:hover a.copiable-anchor {visibility: visible}
50ul.no-bullet {list-style: none}
51-->
52</style>
53
54
55</head>
56
57<body lang="en">
58<h1 class="settitle" align="center">Host/Target specific installation notes for GCC</h1>
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<span id="index-Specific"></span>
84<span id="index-Specific-installation-notes"></span>
85<span id="index-Target-specific-installation"></span>
86<span id="index-Host-specific-installation"></span>
87<span id="index-Target-specific-installation-notes"></span>
88
89<p>Please read this document carefully <em>before</em> installing the
90GNU Compiler Collection on your machine.
91</p>
92<p>Note that this list of install notes is <em>not</em> a list of supported
93hosts or targets.  Not all supported hosts and targets are listed
94here, only the ones that require host-specific or target-specific
95information have to. 
96</p>
97<ul>
98<li> <a href="#aarch64-x-x">aarch64*-*-*</a>
99</li><li> <a href="#alpha-x-x">alpha*-*-*</a>
100</li><li> <a href="#amdgcn-x-amdhsa">amdgcn-*-amdhsa</a>
101</li><li> <a href="#amd64-x-solaris2">amd64-*-solaris2*</a>
102</li><li> <a href="#arc-x-elf32">arc-*-elf32</a>
103</li><li> <a href="#arc-linux-uclibc">arc-linux-uclibc</a>
104</li><li> <a href="#arm-x-eabi">arm-*-eabi</a>
105</li><li> <a href="#avr">avr</a>
106</li><li> <a href="#bfin">Blackfin</a>
107</li><li> <a href="#cris">cris</a>
108</li><li> <a href="#dos">DOS</a>
109</li><li> <a href="#epiphany-x-elf">epiphany-*-elf</a>
110</li><li> <a href="#ft32-x-elf">ft32-*-elf</a>
111</li><li> <a href="#x-x-freebsd">*-*-freebsd*</a>
112</li><li> <a href="#h8300-hms">h8300-hms</a>
113</li><li> <a href="#hppa-hp-hpux">hppa*-hp-hpux*</a>
114</li><li> <a href="#hppa-hp-hpux10">hppa*-hp-hpux10</a>
115</li><li> <a href="#hppa-hp-hpux11">hppa*-hp-hpux11</a>
116</li><li> <a href="#x-x-linux-gnu">*-*-linux-gnu</a>
117</li><li> <a href="#ix86-x-linux">i?86-*-linux*</a>
118</li><li> <a href="#ix86-x-solaris2">i?86-*-solaris2*</a>
119</li><li> <a href="#ia64-x-linux">ia64-*-linux</a>
120</li><li> <a href="#ia64-x-hpux">ia64-*-hpux*</a>
121</li><li> <a href="#x-ibm-aix">*-ibm-aix*</a>
122</li><li> <a href="#iq2000-x-elf">iq2000-*-elf</a>
123</li><li> <a href="#loongarch">loongarch</a>
124</li><li> <a href="#lm32-x-elf">lm32-*-elf</a>
125</li><li> <a href="#lm32-x-uclinux">lm32-*-uclinux</a>
126</li><li> <a href="#m32c-x-elf">m32c-*-elf</a>
127</li><li> <a href="#m32r-x-elf">m32r-*-elf</a>
128</li><li> <a href="#m68k-x-x">m68k-*-*</a>
129</li><li> <a href="#m68k-x-uclinux">m68k-*-uclinux</a>
130</li><li> <a href="#microblaze-x-elf">microblaze-*-elf</a>
131</li><li> <a href="#mips-x-x">mips-*-*</a>
132</li><li> <a href="#moxie-x-elf">moxie-*-elf</a>
133</li><li> <a href="#msp430-x-elf">msp430-*-elf</a>
134</li><li> <a href="#nds32le-x-elf">nds32le-*-elf</a>
135</li><li> <a href="#nds32be-x-elf">nds32be-*-elf</a>
136</li><li> <a href="#nvptx-x-none">nvptx-*-none</a>
137</li><li> <a href="#or1k-x-elf">or1k-*-elf</a>
138</li><li> <a href="#or1k-x-linux">or1k-*-linux</a>
139</li><li> <a href="#powerpc-x-x">powerpc*-*-*</a>
140</li><li> <a href="#powerpc-x-darwin">powerpc-*-darwin*</a>
141</li><li> <a href="#powerpc-x-elf">powerpc-*-elf</a>
142</li><li> <a href="#powerpc-x-linux-gnu">powerpc*-*-linux-gnu*</a>
143</li><li> <a href="#powerpc-x-netbsd">powerpc-*-netbsd*</a>
144</li><li> <a href="#powerpc-x-eabisim">powerpc-*-eabisim</a>
145</li><li> <a href="#powerpc-x-eabi">powerpc-*-eabi</a>
146</li><li> <a href="#powerpcle-x-elf">powerpcle-*-elf</a>
147</li><li> <a href="#powerpcle-x-eabisim">powerpcle-*-eabisim</a>
148</li><li> <a href="#powerpcle-x-eabi">powerpcle-*-eabi</a>
149</li><li> <a href="#riscv32-x-elf">riscv32-*-elf</a>
150</li><li> <a href="#riscv32-x-linux">riscv32-*-linux</a>
151</li><li> <a href="#riscv64-x-elf">riscv64-*-elf</a>
152</li><li> <a href="#riscv64-x-linux">riscv64-*-linux</a>
153</li><li> <a href="#rl78-x-elf">rl78-*-elf</a>
154</li><li> <a href="#rx-x-elf">rx-*-elf</a>
155</li><li> <a href="#s390-x-linux">s390-*-linux*</a>
156</li><li> <a href="#s390x-x-linux">s390x-*-linux*</a>
157</li><li> <a href="#s390x-ibm-tpf">s390x-ibm-tpf*</a>
158</li><li> <a href="#x-x-solaris2">*-*-solaris2*</a>
159</li><li> <a href="#sparc-x-x">sparc*-*-*</a>
160</li><li> <a href="#sparc-sun-solaris2">sparc-sun-solaris2*</a>
161</li><li> <a href="#sparc-x-linux">sparc-*-linux*</a>
162</li><li> <a href="#sparc64-x-solaris2">sparc64-*-solaris2*</a>
163</li><li> <a href="#sparcv9-x-solaris2">sparcv9-*-solaris2*</a>
164</li><li> <a href="#c6x-x-x">c6x-*-*</a>
165</li><li> <a href="#tilegx-x-linux">tilegx-*-linux*</a>
166</li><li> <a href="#tilegxbe-x-linux">tilegxbe-*-linux*</a>
167</li><li> <a href="#tilepro-x-linux">tilepro-*-linux*</a>
168</li><li> <a href="#visium-x-elf">visium-*-elf</a>
169</li><li> <a href="#x-x-vxworks">*-*-vxworks*</a>
170</li><li> <a href="#x86-64-x-x">x86_64-*-*, amd64-*-*</a>
171</li><li> <a href="#x86-64-x-solaris2">x86_64-*-solaris2*</a>
172</li><li> <a href="#xtensa-x-elf">xtensa*-*-elf</a>
173</li><li> <a href="#xtensa-x-linux">xtensa*-*-linux*</a>
174</li><li> <a href="#windows">Microsoft Windows</a>
175</li><li> <a href="#x-x-cygwin">*-*-cygwin</a>
176</li><li> <a href="#x-x-mingw32">*-*-mingw32</a>
177</li><li> <a href="#os2">OS/2</a>
178</li><li> <a href="#older">Older systems</a>
179</li></ul>
180
181<ul>
182<li> <a href="#elf">all ELF targets</a> (SVR4, Solaris 2, etc.)
183</li></ul>
184
185
186<!-- -------- host/target specific issues start here ---------------- -->
187<hr />
188<span id="aarch64-x-x"></span><span id="aarch64*-*-*"></span><h3 class="heading">aarch64*-*-*</h3>
189<p>Binutils pre 2.24 does not have support for selecting <samp>-mabi</samp> and
190does not support ILP32.  If it is used to build GCC 4.9 or later, GCC will
191not support option <samp>-mabi=ilp32</samp>.
192</p>
193<p>To enable a workaround for the Cortex-A53 erratum number 835769 by default
194(for all CPUs regardless of -mcpu option given) at configure time use the
195<samp>--enable-fix-cortex-a53-835769</samp> option.  This will enable the fix by
196default and can be explicitly disabled during compilation by passing the
197<samp>-mno-fix-cortex-a53-835769</samp> option.  Conversely,
198<samp>--disable-fix-cortex-a53-835769</samp> will disable the workaround by
199default.  The workaround is disabled by default if neither of
200<samp>--enable-fix-cortex-a53-835769</samp> or
201<samp>--disable-fix-cortex-a53-835769</samp> is given at configure time.
202</p>
203<p>To enable a workaround for the Cortex-A53 erratum number 843419 by default
204(for all CPUs regardless of -mcpu option given) at configure time use the
205<samp>--enable-fix-cortex-a53-843419</samp> option.  This workaround is applied at
206link time.  Enabling the workaround will cause GCC to pass the relevant option
207to the linker.  It can be explicitly disabled during compilation by passing the
208<samp>-mno-fix-cortex-a53-843419</samp> option.  Conversely,
209<samp>--disable-fix-cortex-a53-843419</samp> will disable the workaround by default.
210The workaround is disabled by default if neither of
211<samp>--enable-fix-cortex-a53-843419</samp> or
212<samp>--disable-fix-cortex-a53-843419</samp> is given at configure time.
213</p>
214<p>To enable Branch Target Identification Mechanism and Return Address Signing by
215default at configure time use the <samp>--enable-standard-branch-protection</samp>
216option.  This is equivalent to having <samp>-mbranch-protection=standard</samp>
217during compilation.  This can be explicitly disabled during compilation by
218passing the <samp>-mbranch-protection=none</samp> option which turns off all
219types of branch protections.  Conversely,
220<samp>--disable-standard-branch-protection</samp> will disable both the
221protections by default.  This mechanism is turned off by default if neither
222of the options are given at configure time.
223</p>
224<hr />
225<span id="alpha-x-x"></span><span id="alpha*-*-*"></span><h3 class="heading">alpha*-*-*</h3>
226<p>This section contains general configuration information for all
227Alpha-based platforms using ELF.  In addition to reading this
228section, please read all other sections that match your target.
229</p>
230<hr />
231<span id="amd64-x-solaris2"></span><span id="amd64-*-solaris2*"></span><h3 class="heading">amd64-*-solaris2*</h3>
232<p>This is a synonym for &lsquo;<samp>x86_64-*-solaris2*</samp>&rsquo;.
233</p>
234<hr />
235<span id="amdgcn-x-amdhsa"></span><span id="amdgcn-*-amdhsa"></span><h3 class="heading">amdgcn-*-amdhsa</h3>
236<p>AMD GCN GPU target.
237</p>
238<p>Instead of GNU Binutils, you will need to install LLVM 13.0.1, or later, and copy
239<samp>bin/llvm-mc</samp> to <samp>amdgcn-amdhsa/bin/as</samp>,
240<samp>bin/lld</samp> to <samp>amdgcn-amdhsa/bin/ld</samp>,
241<samp>bin/llvm-nm</samp> to <samp>amdgcn-amdhsa/bin/nm</samp>, and
242<samp>bin/llvm-ar</samp> to both <samp>bin/amdgcn-amdhsa-ar</samp> and
243<samp>bin/amdgcn-amdhsa-ranlib</samp>.
244</p>
245<p>Use Newlib (3.2.0, or newer).
246</p>
247<p>To run the binaries, install the HSA Runtime from the
248<a href="https://rocm.github.io">ROCm Platform</a>, and use
249<samp>libexec/gcc/amdhsa-amdhsa/<var>version</var>/gcn-run</samp> to launch them
250on the GPU.
251</p>
252<hr />
253<span id="arc-x-elf32"></span><span id="arc-*-elf32"></span><h3 class="heading">arc-*-elf32</h3>
254
255<p>Use &lsquo;<samp>configure --target=arc-elf32 --with-cpu=<var>cpu</var> --enable-languages=&quot;c,c++&quot;</samp>&rsquo;
256to configure GCC, with <var>cpu</var> being one of &lsquo;<samp>arc600</samp>&rsquo;, &lsquo;<samp>arc601</samp>&rsquo;,
257or &lsquo;<samp>arc700</samp>&rsquo;.
258</p>
259<hr />
260<span id="arc-linux-uclibc"></span><span id="arc-linux-uclibc-1"></span><h3 class="heading">arc-linux-uclibc</h3>
261
262<p>Use &lsquo;<samp>configure --target=arc-linux-uclibc --with-cpu=arc700 --enable-languages=&quot;c,c++&quot;</samp>&rsquo; to configure GCC.
263</p>
264<hr />
265<span id="arm-x-eabi"></span><span id="arm-*-eabi"></span><h3 class="heading">arm-*-eabi</h3>
266<p>ARM-family processors.
267</p>
268<p>Building the Ada frontend commonly fails (an infinite loop executing
269<code>xsinfo</code>) if the host compiler is GNAT 4.8.  Host compilers built from the
270GNAT 4.6, 4.9 or 5 release branches are known to succeed.
271</p>
272<hr />
273<span id="avr"></span><span id="avr-1"></span><h3 class="heading">avr</h3>
274<p>ATMEL AVR-family micro controllers.  These are used in embedded
275applications.  There are no standard Unix configurations.
276See &ldquo;AVR Options&rdquo; in the main manual
277for the list of supported MCU types.
278</p>
279<p>Use &lsquo;<samp>configure --target=avr --enable-languages=&quot;c&quot;</samp>&rsquo; to configure GCC.
280</p>
281<p>Further installation notes and other useful information about AVR tools
282can also be obtained from:
283</p>
284<ul>
285<li> <a href="http://www.nongnu.org/avr/">http://www.nongnu.org/avr/</a>
286</li><li> <a href="http://www.amelek.gda.pl/avr/">http://www.amelek.gda.pl/avr/</a>
287</li></ul>
288
289<p>The following error:
290</p><div class="example">
291<pre class="example">Error: register required
292</pre></div>
293
294<p>indicates that you should upgrade to a newer version of the binutils.
295</p>
296<hr />
297<span id="bfin"></span><span id="Blackfin"></span><h3 class="heading">Blackfin</h3>
298<p>The Blackfin processor, an Analog Devices DSP.
299See &ldquo;Blackfin Options&rdquo; in the main manual
300</p>
301<p>More information, and a version of binutils with support for this processor,
302are available at <a href="https://sourceforge.net/projects/adi-toolchain/">https://sourceforge.net/projects/adi-toolchain/</a>.
303</p>
304<hr />
305<span id="cr16"></span><span id="CR16"></span><h3 class="heading">CR16</h3>
306<p>The CR16 CompactRISC architecture is a 16-bit architecture. This
307architecture is used in embedded applications.
308</p>
309
310<p>See &ldquo;CR16 Options&rdquo; in the main manual for a list of CR16-specific options.
311</p>
312<p>Use &lsquo;<samp>configure --target=cr16-elf --enable-languages=c,c++</samp>&rsquo; to configure
313GCC&nbsp;for building a CR16 elf cross-compiler.
314</p>
315<p>Use &lsquo;<samp>configure --target=cr16-uclinux --enable-languages=c,c++</samp>&rsquo; to
316configure GCC&nbsp;for building a CR16 uclinux cross-compiler.
317</p>
318<hr />
319<span id="cris"></span><span id="CRIS"></span><h3 class="heading">CRIS</h3>
320<p>CRIS is a CPU architecture in Axis Communications systems-on-a-chip, for
321example the ETRAX series.  These are used in embedded applications.
322</p>
323<p>See &ldquo;CRIS Options&rdquo; in the main manual
324for a list of CRIS-specific options.
325</p>
326<p>Use &lsquo;<samp>configure --target=cris-elf</samp>&rsquo; to configure GCC&nbsp;for building
327a cross-compiler for CRIS.
328<hr />
329<span id="dos"></span></p><span id="DOS"></span><h3 class="heading">DOS</h3>
330<p>Please have a look at the <a href="binaries.html">binaries page</a>.
331</p>
332<p>You cannot install GCC by itself on MSDOS; it will not compile under
333any MSDOS compiler except itself.  You need to get the complete
334compilation package DJGPP, which includes binaries as well as sources,
335and includes all the necessary compilation tools and libraries.
336</p>
337<hr />
338<span id="epiphany-x-elf"></span><span id="epiphany-*-elf"></span><h3 class="heading">epiphany-*-elf</h3>
339<p>Adapteva Epiphany.
340This configuration is intended for embedded systems.
341</p>
342<hr />
343<span id="x-x-freebsd"></span><span id="g_t*-*-freebsd*"></span><h3 class="heading">*-*-freebsd*</h3>
344<p>In order to better utilize FreeBSD base system functionality and match
345the configuration of the system compiler, GCC 4.5 and above as well as
346GCC 4.4 past 2010-06-20 leverage SSP support in libc (which is present
347on FreeBSD 7 or later) and the use of <code>__cxa_atexit</code> by default
348(on FreeBSD 6 or later).  The use of <code>dl_iterate_phdr</code> inside
349<samp>libgcc_s.so.1</samp> and boehm-gc (on FreeBSD 7 or later) is enabled
350by GCC 4.5 and above.
351</p>
352<p>We support FreeBSD using the ELF file format with DWARF 2 debugging
353for all CPU architectures.  You may use <samp>-gstabs</samp> instead of
354<samp>-g</samp>, if you really want the old debugging format.  There are
355no known issues with mixing object files and libraries with different
356debugging formats.  Otherwise, this release of GCC should now match
357more of the configuration used in the stock FreeBSD configuration of
358GCC.  In particular, <samp>--enable-threads</samp> is now configured by
359default.  However, as a general user, do not attempt to replace the
360system compiler with this release.  Known to bootstrap and check with
361good results on FreeBSD 7.2-STABLE.  In the past, known to bootstrap
362and check with good results on FreeBSD 3.0, 3.4, 4.0, 4.2, 4.3, 4.4,
3634.5, 4.8, 4.9 and 5-CURRENT.
364</p>
365<p>The version of binutils installed in <samp>/usr/bin</samp> probably works
366with this release of GCC.  Bootstrapping against the latest GNU
367binutils and/or the version found in <samp>/usr/ports/devel/binutils</samp> has
368been known to enable additional features and improve overall testsuite
369results.  However, it is currently known that boehm-gc may not configure
370properly on FreeBSD prior to the FreeBSD 7.0 release with GNU binutils
371after 2.16.1.
372</p>
373<hr />
374<span id="ft32-x-elf"></span><span id="ft32-*-elf"></span><h3 class="heading">ft32-*-elf</h3>
375<p>The FT32 processor.
376This configuration is intended for embedded systems.
377</p>
378<hr />
379<span id="h8300-hms"></span><span id="h8300-hms-1"></span><h3 class="heading">h8300-hms</h3>
380<p>Renesas H8/300 series of processors.
381</p>
382<p>Please have a look at the <a href="binaries.html">binaries page</a>.
383</p>
384<p>The calling convention and structure layout has changed in release 2.6.
385All code must be recompiled.  The calling convention now passes the
386first three arguments in function calls in registers.  Structures are no
387longer a multiple of 2 bytes.
388</p>
389<hr />
390<span id="hppa-hp-hpux"></span><span id="hppa*-hp-hpux*"></span><h3 class="heading">hppa*-hp-hpux*</h3>
391<p>Support for HP-UX version 9 and older was discontinued in GCC 3.4.
392</p>
393<p>We require using gas/binutils on all hppa platforms.  Version 2.19 or
394later is recommended.
395</p>
396<p>It may be helpful to configure GCC with the
397<a href="./configure.html#with-gnu-as"><samp>--with-gnu-as</samp></a> and
398<samp>--with-as=&hellip;</samp> options to ensure that GCC can find GAS.
399</p>
400<p>The HP assembler should not be used with GCC.  It is rarely tested and may
401not work.  It shouldn&rsquo;t be used with any languages other than C due to its
402many limitations.
403</p>
404<p>Specifically, <samp>-g</samp> does not work (HP-UX uses a peculiar debugging
405format which GCC does not know about).  It also inserts timestamps
406into each object file it creates, causing the 3-stage comparison test to
407fail during a bootstrap.  You should be able to continue by saying
408&lsquo;<samp>make all-host all-target</samp>&rsquo; after getting the failure from &lsquo;<samp>make</samp>&rsquo;.
409</p>
410<p>Various GCC features are not supported.  For example, it does not support weak
411symbols or alias definitions.  As a result, explicit template instantiations
412are required when using C++.  This makes it difficult if not impossible to
413build many C++ applications.
414</p>
415<p>There are two default scheduling models for instructions.  These are
416PROCESSOR_7100LC and PROCESSOR_8000.  They are selected from the pa-risc
417architecture specified for the target machine when configuring.
418PROCESSOR_8000 is the default.  PROCESSOR_7100LC is selected when
419the target is a &lsquo;<samp>hppa1*</samp>&rsquo; machine.
420</p>
421<p>The PROCESSOR_8000 model is not well suited to older processors.  Thus,
422it is important to completely specify the machine architecture when
423configuring if you want a model other than PROCESSOR_8000.  The macro
424TARGET_SCHED_DEFAULT can be defined in BOOT_CFLAGS if a different
425default scheduling model is desired.
426</p>
427<p>As of GCC 4.0, GCC uses the UNIX 95 namespace for HP-UX 10.10
428through 11.00, and the UNIX 98 namespace for HP-UX 11.11 and later.
429This namespace change might cause problems when bootstrapping with
430an earlier version of GCC or the HP compiler as essentially the same
431namespace is required for an entire build.  This problem can be avoided
432in a number of ways.  With HP cc, <code>UNIX_STD</code> can be set to &lsquo;<samp>95</samp>&rsquo;
433or &lsquo;<samp>98</samp>&rsquo;.  Another way is to add an appropriate set of predefines
434to <code>CC</code>.  The description for the <samp>munix=</samp> option contains
435a list of the predefines used with each standard.
436</p>
437<p>More specific information to &lsquo;<samp>hppa*-hp-hpux*</samp>&rsquo; targets follows.
438</p>
439<hr />
440<span id="hppa-hp-hpux10"></span><span id="hppa*-hp-hpux10"></span><h3 class="heading">hppa*-hp-hpux10</h3>
441<p>For hpux10.20, we <em>highly</em> recommend you pick up the latest sed patch
442<code>PHCO_19798</code> from HP.
443</p>
444<p>The C++ ABI has changed incompatibly in GCC 4.0.  COMDAT subspaces are
445used for one-only code and data.  This resolves many of the previous
446problems in using C++ on this target.  However, the ABI is not compatible
447with the one implemented under HP-UX 11 using secondary definitions.
448</p>
449<hr />
450<span id="hppa-hp-hpux11"></span><span id="hppa*-hp-hpux11"></span><h3 class="heading">hppa*-hp-hpux11</h3>
451<p>GCC 3.0 and up support HP-UX 11.  GCC 2.95.x is not supported and cannot
452be used to compile GCC 3.0 and up.
453</p>
454<p>The libffi library haven&rsquo;t been ported to 64-bit HP-UX&nbsp;and doesn&rsquo;t build.
455</p>
456<p>Refer to <a href="binaries.html">binaries</a> for information about obtaining
457precompiled GCC binaries for HP-UX.  Precompiled binaries must be obtained
458to build the Ada language as it cannot be bootstrapped using C.  Ada is
459only available for the 32-bit PA-RISC runtime.
460</p>
461<p>Starting with GCC 3.4 an ISO C compiler is required to bootstrap.  The
462bundled compiler supports only traditional C; you will need either HP&rsquo;s
463unbundled compiler, or a binary distribution of GCC.
464</p>
465<p>It is possible to build GCC 3.3 starting with the bundled HP compiler,
466but the process requires several steps.  GCC 3.3 can then be used to
467build later versions.
468</p>
469<p>There are several possible approaches to building the distribution.
470Binutils can be built first using the HP tools.  Then, the GCC
471distribution can be built.  The second approach is to build GCC
472first using the HP tools, then build binutils, then rebuild GCC.
473There have been problems with various binary distributions, so it
474is best not to start from a binary distribution.
475</p>
476<p>On 64-bit capable systems, there are two distinct targets.  Different
477installation prefixes must be used if both are to be installed on
478the same system.  The &lsquo;<samp>hppa[1-2]*-hp-hpux11*</samp>&rsquo; target generates code
479for the 32-bit PA-RISC runtime architecture and uses the HP linker.
480The &lsquo;<samp>hppa64-hp-hpux11*</samp>&rsquo; target generates 64-bit code for the
481PA-RISC 2.0 architecture.
482</p>
483<p>The script config.guess now selects the target type based on the compiler
484detected during configuration.  You must define <code>PATH</code> or <code>CC</code> so
485that configure finds an appropriate compiler for the initial bootstrap.
486When <code>CC</code> is used, the definition should contain the options that are
487needed whenever <code>CC</code> is used.
488</p>
489<p>Specifically, options that determine the runtime architecture must be
490in <code>CC</code> to correctly select the target for the build.  It is also
491convenient to place many other compiler options in <code>CC</code>.  For example,
492<code>CC=&quot;cc -Ac +DA2.0W -Wp,-H16376 -D_CLASSIC_TYPES -D_HPUX_SOURCE&quot;</code>
493can be used to bootstrap the GCC 3.3 branch with the HP compiler in
49464-bit K&amp;R/bundled mode.  The <samp>+DA2.0W</samp> option will result in
495the automatic selection of the &lsquo;<samp>hppa64-hp-hpux11*</samp>&rsquo; target.  The
496macro definition table of cpp needs to be increased for a successful
497build with the HP compiler.  _CLASSIC_TYPES and _HPUX_SOURCE need to
498be defined when building with the bundled compiler, or when using the
499<samp>-Ac</samp> option.  These defines aren&rsquo;t necessary with <samp>-Ae</samp>.
500</p>
501<p>It is best to explicitly configure the &lsquo;<samp>hppa64-hp-hpux11*</samp>&rsquo; target
502with the <samp>--with-ld=&hellip;</samp> option.  This overrides the standard
503search for ld.  The two linkers supported on this target require different
504commands.  The default linker is determined during configuration.  As a
505result, it&rsquo;s not possible to switch linkers in the middle of a GCC build.
506This has been reported to sometimes occur in unified builds of binutils
507and GCC.
508</p>
509<p>A recent linker patch must be installed for the correct operation of
510GCC 3.3 and later.  <code>PHSS_26559</code> and <code>PHSS_24304</code> are the
511oldest linker patches that are known to work.  They are for HP-UX
51211.00 and 11.11, respectively.  <code>PHSS_24303</code>, the companion to
513<code>PHSS_24304</code>, might be usable but it hasn&rsquo;t been tested.  These
514patches have been superseded.  Consult the HP patch database to obtain
515the currently recommended linker patch for your system.
516</p>
517<p>The patches are necessary for the support of weak symbols on the
51832-bit port, and for the running of initializers and finalizers.  Weak
519symbols are implemented using SOM secondary definition symbols.  Prior
520to HP-UX 11, there are bugs in the linker support for secondary symbols.
521The patches correct a problem of linker core dumps creating shared
522libraries containing secondary symbols, as well as various other
523linking issues involving secondary symbols.
524</p>
525<p>GCC 3.3 uses the ELF DT_INIT_ARRAY and DT_FINI_ARRAY capabilities to
526run initializers and finalizers on the 64-bit port.  The 32-bit port
527uses the linker <samp>+init</samp> and <samp>+fini</samp> options for the same
528purpose.  The patches correct various problems with the +init/+fini
529options, including program core dumps.  Binutils 2.14 corrects a
530problem on the 64-bit port resulting from HP&rsquo;s non-standard use of
531the .init and .fini sections for array initializers and finalizers.
532</p>
533<p>Although the HP and GNU linkers are both supported for the
534&lsquo;<samp>hppa64-hp-hpux11*</samp>&rsquo; target, it is strongly recommended that the
535HP linker be used for link editing on this target.
536</p>
537<p>At this time, the GNU linker does not support the creation of long
538branch stubs.  As a result, it cannot successfully link binaries
539containing branch offsets larger than 8 megabytes.  In addition,
540there are problems linking shared libraries, linking executables
541with <samp>-static</samp>, and with dwarf2 unwind and exception support.
542It also doesn&rsquo;t provide stubs for internal calls to global functions
543in shared libraries, so these calls cannot be overloaded.
544</p>
545<p>The HP dynamic loader does not support GNU symbol versioning, so symbol
546versioning is not supported.  It may be necessary to disable symbol
547versioning with <samp>--disable-symvers</samp> when using GNU ld.
548</p>
549<p>POSIX threads are the default.  The optional DCE thread library is not
550supported, so <samp>--enable-threads=dce</samp> does not work.
551</p>
552<hr />
553<span id="x-x-linux-gnu"></span><span id="g_t*-*-linux-gnu"></span><h3 class="heading">*-*-linux-gnu</h3>
554<p>The <code>.init_array</code> and <code>.fini_array</code> sections are enabled
555unconditionally which requires at least glibc 2.1 and binutils 2.12.
556</p>
557<p>Versions of libstdc++-v3 starting with 3.2.1 require bug fixes present
558in glibc 2.2.5 and later.  More information is available in the
559libstdc++-v3 documentation.
560</p>
561<hr />
562<span id="ix86-x-linux"></span><span id="i_003f86-*-linux*"></span><h3 class="heading">i?86-*-linux*</h3>
563<p>As of GCC 3.3, binutils 2.13.1 or later is required for this platform.
564See <a href="https://gcc.gnu.org/PR10877">bug 10877</a> for more information.
565</p>
566<p>If you receive Signal 11 errors when building on GNU/Linux, then it is
567possible you have a hardware problem.  Further information on this can be
568found on <a href="https://www.bitwizard.nl/sig11/">www.bitwizard.nl</a>.
569</p>
570<hr />
571<span id="ix86-x-solaris2"></span><span id="i_003f86-*-solaris2*"></span><h3 class="heading">i?86-*-solaris2*</h3>
572<p>Use this for Solaris 11.3 or later on x86 and x86-64 systems.  Starting
573with GCC 4.7, there is also a 64-bit &lsquo;<samp>amd64-*-solaris2*</samp>&rsquo; or
574&lsquo;<samp>x86_64-*-solaris2*</samp>&rsquo; configuration that corresponds to
575&lsquo;<samp>sparcv9-sun-solaris2*</samp>&rsquo;.
576</p>
577<p>It is recommended that you configure GCC to use the GNU assembler.  The
578versions included in Solaris 11.3, from GNU binutils 2.23.1 or
579newer (available as <samp>/usr/bin/gas</samp> and
580<samp>/usr/gnu/bin/as</samp>), work fine.  The current version, from GNU
581binutils 2.34, is known to work.  Recent versions of the Solaris assembler in
582<samp>/usr/bin/as</samp> work almost as well, though.
583</p>
584<p>For linking, the Solaris linker is preferred.  If you want to use the GNU
585linker instead, the version in Solaris 11.3, from GNU binutils 2.23.1 or
586newer (in <samp>/usr/gnu/bin/ld</samp> and <samp>/usr/bin/gld</samp>), works,
587as does the latest version, from GNU binutils 2.34.
588</p>
589<p>To use GNU <code>as</code>, configure with the options
590<samp>--with-gnu-as --with-as=/usr/gnu/bin/as</samp>.  It may be necessary
591to configure with <samp>--without-gnu-ld --with-ld=/usr/ccs/bin/ld</samp> to
592guarantee use of Solaris <code>ld</code>.
593</p>
594<hr />
595<span id="ia64-x-linux"></span><span id="ia64-*-linux"></span><h3 class="heading">ia64-*-linux</h3>
596<p>IA-64 processor (also known as IPF, or Itanium Processor Family)
597running GNU/Linux.
598</p>
599<p>If you are using the installed system libunwind library with
600<samp>--with-system-libunwind</samp>, then you must use libunwind 0.98 or
601later.
602</p>
603<hr />
604<span id="ia64-x-hpux"></span><span id="ia64-*-hpux*"></span><h3 class="heading">ia64-*-hpux*</h3>
605<p>Building GCC on this target requires the GNU Assembler.  The bundled HP
606assembler will not work.  To prevent GCC from using the wrong assembler,
607the option <samp>--with-gnu-as</samp> may be necessary.
608</p>
609<p>The GCC libunwind library has not been ported to HPUX.  This means that for
610GCC versions 3.2.3 and earlier, <samp>--enable-libunwind-exceptions</samp>
611is required to build GCC.  For GCC 3.3 and later, this is the default.
612For gcc 3.4.3 and later, <samp>--enable-libunwind-exceptions</samp> is
613removed and the system libunwind library will always be used.
614</p>
615<hr />
616<!-- rs6000-ibm-aix*, powerpc-ibm-aix* -->
617<span id="x-ibm-aix"></span><span id="g_t*-ibm-aix*"></span><h3 class="heading">*-ibm-aix*</h3>
618<p>Support for AIX version 3 and older was discontinued in GCC 3.4.
619Support for AIX version 4.2 and older was discontinued in GCC 4.5.
620</p>
621<p>&ldquo;out of memory&rdquo; bootstrap failures may indicate a problem with
622process resource limits (ulimit).  Hard limits are configured in the
623<samp>/etc/security/limits</samp> system configuration file.
624</p>
625<p>GCC 4.9 and above require a C++ compiler for bootstrap.  IBM VAC++ / xlC
626cannot bootstrap GCC.  xlc can bootstrap an older version of GCC and
627G++ can bootstrap recent releases of GCC.
628</p>
629<p>GCC can bootstrap with recent versions of IBM XLC, but bootstrapping
630with an earlier release of GCC is recommended.  Bootstrapping with XLC
631requires a larger data segment, which can be enabled through the
632<var>LDR_CNTRL</var> environment variable, e.g.,
633</p>
634<div class="example">
635<pre class="example">% LDR_CNTRL=MAXDATA=0x50000000
636% export LDR_CNTRL
637</pre></div>
638
639<p>One can start with a pre-compiled version of GCC to build from
640sources.  One may delete GCC&rsquo;s &ldquo;fixed&rdquo; header files when starting
641with a version of GCC built for an earlier release of AIX.
642</p>
643<p>To speed up the configuration phases of bootstrapping and installing GCC,
644one may use GNU Bash instead of AIX <code>/bin/sh</code>, e.g.,
645</p>
646<div class="example">
647<pre class="example">% CONFIG_SHELL=/opt/freeware/bin/bash
648% export CONFIG_SHELL
649</pre></div>
650
651<p>and then proceed as described in <a href="build.html">the build
652instructions</a>, where we strongly recommend specifying an absolute path
653to invoke <var>srcdir</var>/configure.
654</p>
655<p>Because GCC on AIX is built as a 32-bit executable by default,
656(although it can generate 64-bit programs) the GMP and MPFR libraries
657required by gfortran must be 32-bit libraries.  Building GMP and MPFR
658as static archive libraries works better than shared libraries.
659</p>
660<p>Errors involving <code>alloca</code> when building GCC generally are due
661to an incorrect definition of <code>CC</code> in the Makefile or mixing files
662compiled with the native C compiler and GCC.  During the stage1 phase of
663the build, the native AIX compiler <strong>must</strong> be invoked as <code>cc</code>
664(not <code>xlc</code>).  Once <code>configure</code> has been informed of
665<code>xlc</code>, one needs to use &lsquo;<samp>make distclean</samp>&rsquo; to remove the
666configure cache files and ensure that <code>CC</code> environment variable
667does not provide a definition that will confuse <code>configure</code>.
668If this error occurs during stage2 or later, then the problem most likely
669is the version of Make (see above).
670</p>
671<p>The native <code>as</code> and <code>ld</code> are recommended for
672bootstrapping on AIX.  The GNU Assembler, GNU Linker, and GNU
673Binutils version 2.20 is the minimum level that supports bootstrap on
674AIX 5.  The GNU Assembler has not been updated to support AIX 6&nbsp;or
675AIX 7.  The native AIX tools do interoperate with GCC.
676</p>
677<p>AIX 7.1 added partial support for DWARF debugging, but full support
678requires AIX 7.1 TL03 SP7 that supports additional DWARF sections and
679fixes a bug in the assembler.  AIX 7.1 TL03 SP5 distributed a version
680of libm.a missing important symbols; a fix for IV77796 will be
681included in SP6.
682</p>
683<p>AIX 5.3 TL10, AIX 6.1 TL05 and AIX 7.1 TL00 introduced an AIX
684assembler change that sometimes produces corrupt assembly files
685causing AIX linker errors.  The bug breaks GCC bootstrap on AIX and
686can cause compilation failures with existing GCC installations.  An
687AIX iFix for AIX 5.3 is available (APAR IZ98385 for AIX 5.3 TL10, APAR
688IZ98477 for AIX 5.3 TL11 and IZ98134 for AIX 5.3 TL12). AIX 5.3 TL11 SP8,
689AIX 5.3 TL12 SP5, AIX 6.1 TL04 SP11, AIX 6.1 TL05 SP7, AIX 6.1 TL06 SP6,
690AIX 6.1 TL07 and AIX 7.1 TL01 should include the fix.
691</p>
692<p>Building <samp>libstdc++.a</samp> requires a fix for an AIX Assembler bug
693APAR IY26685 (AIX 4.3) or APAR IY25528 (AIX 5.1).  It also requires a
694fix for another AIX Assembler bug and a co-dependent AIX Archiver fix
695referenced as APAR IY53606 (AIX 5.2) or as APAR IY54774 (AIX 5.1)
696</p>
697<span id="TransferAixShobj"></span><p>&lsquo;<samp>libstdc++</samp>&rsquo; in GCC 3.4 increments the major version number of the
698shared object and GCC installation places the <samp>libstdc++.a</samp>
699shared library in a common location which will overwrite the and GCC
7003.3 version of the shared library.  Applications either need to be
701re-linked against the new shared library or the GCC 3.1 and GCC 3.3
702versions of the &lsquo;<samp>libstdc++</samp>&rsquo; shared object needs to be available
703to the AIX runtime loader.  The GCC 3.1 &lsquo;<samp>libstdc++.so.4</samp>&rsquo;, if
704present, and GCC 3.3 &lsquo;<samp>libstdc++.so.5</samp>&rsquo; shared objects can be
705installed for runtime dynamic loading using the following steps to set
706the &lsquo;<samp>F_LOADONLY</samp>&rsquo; flag in the shared object for <em>each</em>
707multilib <samp>libstdc++.a</samp> installed:
708</p>
709<p>Extract the shared objects from the currently installed
710<samp>libstdc++.a</samp> archive:
711</p><div class="example">
712<pre class="example">% ar -x libstdc++.a libstdc++.so.4 libstdc++.so.5
713</pre></div>
714
715<p>Enable the &lsquo;<samp>F_LOADONLY</samp>&rsquo; flag so that the shared object will be
716available for runtime dynamic loading, but not linking:
717</p><div class="example">
718<pre class="example">% strip -e libstdc++.so.4 libstdc++.so.5
719</pre></div>
720
721<p>Archive the runtime-only shared object in the GCC 3.4
722<samp>libstdc++.a</samp> archive:
723</p><div class="example">
724<pre class="example">% ar -q libstdc++.a libstdc++.so.4 libstdc++.so.5
725</pre></div>
726
727<p>Eventually, the
728<a href="./configure.html#WithAixSoname"><samp>--with-aix-soname=svr4</samp></a>
729configure option may drop the need for this procedure for libraries that
730support it.
731</p>
732<p>Linking executables and shared libraries may produce warnings of
733duplicate symbols.  The assembly files generated by GCC for AIX always
734have included multiple symbol definitions for certain global variable
735and function declarations in the original program.  The warnings should
736not prevent the linker from producing a correct library or runnable
737executable.
738</p>
739<p>AIX 4.3 utilizes a &ldquo;large format&rdquo; archive to support both 32-bit and
74064-bit object modules.  The routines provided in AIX 4.3.0 and AIX 4.3.1
741to parse archive libraries did not handle the new format correctly.
742These routines are used by GCC and result in error messages during
743linking such as &ldquo;not a COFF file&rdquo;.  The version of the routines shipped
744with AIX 4.3.1 should work for a 32-bit environment.  The <samp>-g</samp>
745option of the archive command may be used to create archives of 32-bit
746objects using the original &ldquo;small format&rdquo;.  A correct version of the
747routines is shipped with AIX 4.3.2 and above.
748</p>
749<p>Some versions of the AIX binder (linker) can fail with a relocation
750overflow severe error when the <samp>-bbigtoc</samp> option is used to link
751GCC-produced object files into an executable that overflows the TOC.  A fix
752for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND -BBIGTOC) is
753available from IBM Customer Support and from its
754<a href="https://techsupport.services.ibm.com/">techsupport.services.ibm.com</a>
755website as PTF U455193.
756</p>
757<p>The AIX 4.3.2.1 linker (bos.rte.bind_cmds Level 4.3.2.1) will dump core
758with a segmentation fault when invoked by any version of GCC.  A fix for
759APAR IX87327 is available from IBM Customer Support and from its
760<a href="https://techsupport.services.ibm.com/">techsupport.services.ibm.com</a>
761website as PTF U461879.  This fix is incorporated in AIX 4.3.3 and above.
762</p>
763<p>The initial assembler shipped with AIX 4.3.0 generates incorrect object
764files.  A fix for APAR IX74254 (64BIT DISASSEMBLED OUTPUT FROM COMPILER FAILS
765TO ASSEMBLE/BIND) is available from IBM Customer Support and from its
766<a href="https://techsupport.services.ibm.com/">techsupport.services.ibm.com</a>
767website as PTF U453956.  This fix is incorporated in AIX 4.3.1 and above.
768</p>
769<p>AIX provides National Language Support (NLS).  Compilers and assemblers
770use NLS to support locale-specific representations of various data
771formats including floating-point numbers (e.g., &lsquo;<samp>.</samp>&rsquo;  vs &lsquo;<samp>,</samp>&rsquo; for
772separating decimal fractions).  There have been problems reported where
773GCC does not produce the same floating-point formats that the assembler
774expects.  If one encounters this problem, set the <code>LANG</code>
775environment variable to &lsquo;<samp>C</samp>&rsquo; or &lsquo;<samp>En_US</samp>&rsquo;.
776</p>
777<p>A default can be specified with the <samp>-mcpu=<var>cpu_type</var></samp>
778switch and using the configure option <samp>--with-cpu-<var>cpu_type</var></samp>.
779</p>
780<hr />
781<span id="iq2000-x-elf"></span><span id="iq2000-*-elf"></span><h3 class="heading">iq2000-*-elf</h3>
782<p>Vitesse IQ2000 processors.  These are used in embedded
783applications.  There are no standard Unix configurations.
784</p>
785<hr />
786<span id="lm32-x-elf"></span><span id="lm32-*-elf"></span><h3 class="heading">lm32-*-elf</h3>
787<p>Lattice Mico32 processor.
788This configuration is intended for embedded systems.
789</p>
790<hr />
791<span id="lm32-x-uclinux"></span><span id="lm32-*-uclinux"></span><h3 class="heading">lm32-*-uclinux</h3>
792<p>Lattice Mico32 processor.
793This configuration is intended for embedded systems running uClinux.
794</p>
795<hr />
796<span id="loongarch"></span><span id="LoongArch"></span><h3 class="heading">LoongArch</h3>
797<p>LoongArch processor.
798The following LoongArch targets are available:
799</p><dl compact="compact">
800<dt><span><code>loongarch64-linux-gnu*</code></span></dt>
801<dd><p>LoongArch processor running GNU/Linux.  This target triplet may be coupled
802with a small set of possible suffixes to identify their default ABI type:
803</p><dl compact="compact">
804<dt><span><code>f64</code></span></dt>
805<dd><p>Uses <code>lp64d/base</code> ABI by default.
806</p></dd>
807<dt><span><code>f32</code></span></dt>
808<dd><p>Uses <code>lp64f/base</code> ABI by default.
809</p></dd>
810<dt><span><code>sf</code></span></dt>
811<dd><p>Uses <code>lp64s/base</code> ABI by default.
812</p></dd>
813</dl>
814
815</dd>
816<dt><span><code>loongarch64-linux-gnu</code></span></dt>
817<dd><p>Same as <code>loongarch64-linux-gnuf64</code>, but may be used with
818<samp>--with-abi=*</samp> to configure the default ABI type.
819</p></dd>
820</dl>
821
822<p>More information about LoongArch can be found at
823<a href="https://github.com/loongson/LoongArch-Documentation">https://github.com/loongson/LoongArch-Documentation</a>.
824</p>
825<hr />
826<span id="m32c-x-elf"></span><span id="m32c-*-elf"></span><h3 class="heading">m32c-*-elf</h3>
827<p>Renesas M32C processor.
828This configuration is intended for embedded systems.
829</p>
830<hr />
831<span id="m32r-x-elf"></span><span id="m32r-*-elf"></span><h3 class="heading">m32r-*-elf</h3>
832<p>Renesas M32R processor.
833This configuration is intended for embedded systems.
834</p>
835<hr />
836<span id="m68k-x-x"></span><span id="m68k-*-*"></span><h3 class="heading">m68k-*-*</h3>
837<p>By default,
838&lsquo;<samp>m68k-*-elf*</samp>&rsquo;, &lsquo;<samp>m68k-*-rtems</samp>&rsquo;,  &lsquo;<samp>m68k-*-uclinux</samp>&rsquo; and
839&lsquo;<samp>m68k-*-linux</samp>&rsquo;
840build libraries for both M680x0 and ColdFire processors.  If you only
841need the M680x0 libraries, you can omit the ColdFire ones by passing
842<samp>--with-arch=m68k</samp> to <code>configure</code>.  Alternatively, you
843can omit the M680x0 libraries by passing <samp>--with-arch=cf</samp> to
844<code>configure</code>.  These targets default to 5206 or 5475 code as
845appropriate for the target system when
846configured with <samp>--with-arch=cf</samp> and 68020 code otherwise.
847</p>
848<p>The &lsquo;<samp>m68k-*-netbsd</samp>&rsquo; and
849&lsquo;<samp>m68k-*-openbsd</samp>&rsquo; targets also support the <samp>--with-arch</samp>
850option.  They will generate ColdFire CFV4e code when configured with
851<samp>--with-arch=cf</samp> and 68020 code otherwise.
852</p>
853<p>You can override the default processors listed above by configuring
854with <samp>--with-cpu=<var>target</var></samp>.  This <var>target</var> can either
855be a <samp>-mcpu</samp> argument or one of the following values:
856&lsquo;<samp>m68000</samp>&rsquo;, &lsquo;<samp>m68010</samp>&rsquo;, &lsquo;<samp>m68020</samp>&rsquo;, &lsquo;<samp>m68030</samp>&rsquo;,
857&lsquo;<samp>m68040</samp>&rsquo;, &lsquo;<samp>m68060</samp>&rsquo;, &lsquo;<samp>m68020-40</samp>&rsquo; and &lsquo;<samp>m68020-60</samp>&rsquo;.
858</p>
859<p>GCC requires at least binutils version 2.17 on these targets.
860</p>
861<hr />
862<span id="m68k-x-uclinux"></span><span id="m68k-*-uclinux"></span><h3 class="heading">m68k-*-uclinux</h3>
863<p>GCC 4.3 changed the uClinux configuration so that it uses the
864&lsquo;<samp>m68k-linux-gnu</samp>&rsquo; ABI rather than the &lsquo;<samp>m68k-elf</samp>&rsquo; ABI.
865It also added improved support for C++ and flat shared libraries,
866both of which were ABI changes.
867</p>
868<hr />
869<span id="microblaze-x-elf"></span><span id="microblaze-*-elf"></span><h3 class="heading">microblaze-*-elf</h3>
870<p>Xilinx MicroBlaze processor.
871This configuration is intended for embedded systems.
872</p>
873<hr />
874<span id="mips-x-x"></span><span id="mips-*-*"></span><h3 class="heading">mips-*-*</h3>
875<p>If on a MIPS system you get an error message saying &ldquo;does not have gp
876sections for all it&rsquo;s [sic] sectons [sic]&rdquo;, don&rsquo;t worry about it.  This
877happens whenever you use GAS with the MIPS linker, but there is not
878really anything wrong, and it is okay to use the output file.  You can
879stop such warnings by installing the GNU linker.
880</p>
881<p>It would be nice to extend GAS to produce the gp tables, but they are
882optional, and there should not be a warning about their absence.
883</p>
884<p>The libstdc++ atomic locking routines for MIPS targets requires MIPS II
885and later.  A patch went in just after the GCC 3.3 release to
886make &lsquo;<samp>mips*-*-*</samp>&rsquo; use the generic implementation instead.  You can also
887configure for &lsquo;<samp>mipsel-elf</samp>&rsquo; as a workaround.  The
888&lsquo;<samp>mips*-*-linux*</samp>&rsquo; target continues to use the MIPS II routines.  More
889work on this is expected in future releases.
890</p>
891
892<p>The built-in <code>__sync_*</code> functions are available on MIPS II and
893later systems and others that support the &lsquo;<samp>ll</samp>&rsquo;, &lsquo;<samp>sc</samp>&rsquo; and
894&lsquo;<samp>sync</samp>&rsquo; instructions.  This can be overridden by passing
895<samp>--with-llsc</samp> or <samp>--without-llsc</samp> when configuring GCC.
896Since the Linux kernel emulates these instructions if they are
897missing, the default for &lsquo;<samp>mips*-*-linux*</samp>&rsquo; targets is
898<samp>--with-llsc</samp>.  The <samp>--with-llsc</samp> and
899<samp>--without-llsc</samp> configure options may be overridden at compile
900time by passing the <samp>-mllsc</samp> or <samp>-mno-llsc</samp> options to
901the compiler.
902</p>
903<p>MIPS systems check for division by zero (unless
904<samp>-mno-check-zero-division</samp> is passed to the compiler) by
905generating either a conditional trap or a break instruction.  Using
906trap results in smaller code, but is only supported on MIPS II and
907later.  Also, some versions of the Linux kernel have a bug that
908prevents trap from generating the proper signal (<code>SIGFPE</code>).  To enable
909the use of break, use the <samp>--with-divide=breaks</samp>
910<code>configure</code> option when configuring GCC.  The default is to
911use traps on systems that support them.
912</p>
913<hr />
914<span id="moxie-x-elf"></span><span id="moxie-*-elf"></span><h3 class="heading">moxie-*-elf</h3>
915<p>The moxie processor.
916</p>
917<hr />
918<span id="msp430-x-elf"></span><span id="msp430-*-elf*"></span><h3 class="heading">msp430-*-elf*</h3>
919<p>TI MSP430 processor.
920This configuration is intended for embedded systems.
921</p>
922<p>&lsquo;<samp>msp430-*-elf</samp>&rsquo; is the standard configuration with most GCC
923features enabled by default.
924</p>
925<p>&lsquo;<samp>msp430-*-elfbare</samp>&rsquo; is tuned for a bare-metal environment, and disables
926features related to shared libraries and other functionality not used for
927this device.  This reduces code and data usage of the GCC libraries, resulting
928in a minimal run-time environment by default.
929</p>
930<p>Features disabled by default include:
931</p><ul>
932<li> transactional memory
933</li><li> __cxa_atexit
934</li></ul>
935
936<hr />
937<span id="nds32le-x-elf"></span><span id="nds32le-*-elf"></span><h3 class="heading">nds32le-*-elf</h3>
938<p>Andes NDS32 target in little endian mode.
939</p>
940<hr />
941<span id="nds32be-x-elf"></span><span id="nds32be-*-elf"></span><h3 class="heading">nds32be-*-elf</h3>
942<p>Andes NDS32 target in big endian mode.
943</p>
944<hr />
945<span id="nvptx-x-none"></span><span id="nvptx-*-none"></span><h3 class="heading">nvptx-*-none</h3>
946<p>Nvidia PTX target.
947</p>
948<p>Instead of GNU binutils, you will need to install
949<a href="https://github.com/MentorEmbedded/nvptx-tools/">nvptx-tools</a>.
950Tell GCC where to find it:
951<samp>--with-build-time-tools=[install-nvptx-tools]/nvptx-none/bin</samp>.
952</p>
953<p>You will need newlib 3.1.0 or later.  It can be
954automatically built together with GCC.  For this, add a symbolic link
955to nvptx-newlib&rsquo;s <samp>newlib</samp> directory to the directory containing
956the GCC sources.
957</p>
958<p>Use the <samp>--disable-sjlj-exceptions</samp> and
959<samp>--enable-newlib-io-long-long</samp> options when configuring.
960</p>
961<hr />
962<span id="or1k-x-elf"></span><span id="or1k-*-elf"></span><h3 class="heading">or1k-*-elf</h3>
963<p>The OpenRISC 1000 32-bit processor with delay slots.
964This configuration is intended for embedded systems.
965</p>
966<hr />
967<span id="or1k-x-linux"></span><span id="or1k-*-linux"></span><h3 class="heading">or1k-*-linux</h3>
968<p>The OpenRISC 1000 32-bit processor with delay slots.
969</p>
970<hr />
971<span id="powerpc-x-x"></span><span id="powerpc-*-*"></span><h3 class="heading">powerpc-*-*</h3>
972<p>You can specify a default version for the <samp>-mcpu=<var>cpu_type</var></samp>
973switch by using the configure option <samp>--with-cpu-<var>cpu_type</var></samp>.
974</p>
975<p>You will need GNU binutils 2.20 or newer.
976</p>
977<hr />
978<span id="powerpc-x-darwin"></span><span id="powerpc-*-darwin*"></span><h3 class="heading">powerpc-*-darwin*</h3>
979<p>PowerPC running Darwin (Mac OS X kernel).
980</p>
981<p>Pre-installed versions of Mac OS X may not include any developer tools,
982meaning that you will not be able to build GCC from source.  Tool
983binaries are available at
984<a href="https://opensource.apple.com">https://opensource.apple.com</a>.
985</p>
986<p>This version of GCC requires at least cctools-590.36.  The
987cctools-590.36 package referenced from
988<a href="https://gcc.gnu.org/ml/gcc/2006-03/msg00507.html">https://gcc.gnu.org/ml/gcc/2006-03/msg00507.html</a> will not work
989on systems older than 10.3.9 (aka darwin7.9.0).
990</p>
991<hr />
992<span id="powerpc-x-elf"></span><span id="powerpc-*-elf"></span><h3 class="heading">powerpc-*-elf</h3>
993<p>PowerPC system in big endian mode, running System V.4.
994</p>
995<hr />
996<span id="powerpc-x-linux-gnu"></span><span id="powerpc*-*-linux-gnu*"></span><h3 class="heading">powerpc*-*-linux-gnu*</h3>
997<p>PowerPC system in big endian mode running Linux.
998</p>
999<hr />
1000<span id="powerpc-x-netbsd"></span><span id="powerpc-*-netbsd*"></span><h3 class="heading">powerpc-*-netbsd*</h3>
1001<p>PowerPC system in big endian mode running NetBSD.
1002</p>
1003<hr />
1004<span id="powerpc-x-eabisim"></span><span id="powerpc-*-eabisim"></span><h3 class="heading">powerpc-*-eabisim</h3>
1005<p>Embedded PowerPC system in big endian mode for use in running under the
1006PSIM simulator.
1007</p>
1008<hr />
1009<span id="powerpc-x-eabi"></span><span id="powerpc-*-eabi"></span><h3 class="heading">powerpc-*-eabi</h3>
1010<p>Embedded PowerPC system in big endian mode.
1011</p>
1012<hr />
1013<span id="powerpcle-x-elf"></span><span id="powerpcle-*-elf"></span><h3 class="heading">powerpcle-*-elf</h3>
1014<p>PowerPC system in little endian mode, running System V.4.
1015</p>
1016<hr />
1017<span id="powerpcle-x-eabisim"></span><span id="powerpcle-*-eabisim"></span><h3 class="heading">powerpcle-*-eabisim</h3>
1018<p>Embedded PowerPC system in little endian mode for use in running under
1019the PSIM simulator.
1020</p>
1021<hr />
1022<span id="powerpcle-x-eabi"></span><span id="powerpcle-*-eabi"></span><h3 class="heading">powerpcle-*-eabi</h3>
1023<p>Embedded PowerPC system in little endian mode.
1024</p>
1025<hr />
1026<span id="rl78-x-elf"></span><span id="rl78-*-elf"></span><h3 class="heading">rl78-*-elf</h3>
1027<p>The Renesas RL78 processor.
1028This configuration is intended for embedded systems.
1029</p>
1030<hr />
1031<span id="riscv32-x-elf"></span><span id="riscv32-*-elf"></span><h3 class="heading">riscv32-*-elf</h3>
1032<p>The RISC-V RV32 instruction set.
1033This configuration is intended for embedded systems.
1034This (and all other RISC-V) targets require the binutils 2.30 release.
1035</p>
1036<hr />
1037<span id="riscv32-x-linux"></span><span id="riscv32-*-linux"></span><h3 class="heading">riscv32-*-linux</h3>
1038<p>The RISC-V RV32 instruction set running GNU/Linux.
1039This (and all other RISC-V) targets require the binutils 2.30 release.
1040</p>
1041<hr />
1042<span id="riscv64-x-elf"></span><span id="riscv64-*-elf"></span><h3 class="heading">riscv64-*-elf</h3>
1043<p>The RISC-V RV64 instruction set.
1044This configuration is intended for embedded systems.
1045This (and all other RISC-V) targets require the binutils 2.30 release.
1046</p>
1047<hr />
1048<span id="riscv64-x-linux"></span><span id="riscv64-*-linux"></span><h3 class="heading">riscv64-*-linux</h3>
1049<p>The RISC-V RV64 instruction set running GNU/Linux.
1050This (and all other RISC-V) targets require the binutils 2.30 release.
1051</p>
1052<hr />
1053<span id="rx-x-elf"></span><span id="rx-*-elf"></span><h3 class="heading">rx-*-elf</h3>
1054<p>The Renesas RX processor.
1055</p>
1056<hr />
1057<span id="s390-x-linux"></span><span id="s390-*-linux*"></span><h3 class="heading">s390-*-linux*</h3>
1058<p>S/390 system running GNU/Linux for S/390.
1059</p>
1060<hr />
1061<span id="s390x-x-linux"></span><span id="s390x-*-linux*"></span><h3 class="heading">s390x-*-linux*</h3>
1062<p>zSeries system (64-bit) running GNU/Linux for zSeries.
1063</p>
1064<hr />
1065<span id="s390x-ibm-tpf"></span><span id="s390x-ibm-tpf*"></span><h3 class="heading">s390x-ibm-tpf*</h3>
1066<p>zSeries system (64-bit) running TPF.  This platform is
1067supported as cross-compilation target only.
1068</p>
1069<hr />
1070<span id="x-x-solaris2"></span><span id="g_t*-*-solaris2*"></span><h3 class="heading">*-*-solaris2*</h3>
1071<p>Support for Solaris 10 has been removed in GCC 10.  Support for Solaris
10729 has been removed in GCC 5.  Support for Solaris 8 has been removed in
1073GCC 4.8.  Support for Solaris 7 has been removed in GCC 4.6.
1074</p>
1075<p>Solaris 11.3 provides GCC 4.5.2, 4.7.3, and 4.8.2 as
1076<code>/usr/gcc/4.5/bin/gcc</code> or similar.  Newer Solaris versions
1077provide one or more of GCC 5, 7, and 9.  Alternatively,
1078you can install a pre-built GCC to bootstrap and install GCC.  See the
1079<a href="binaries.html">binaries page</a> for details.
1080</p>
1081<p>The Solaris 2 <code>/bin/sh</code> will often fail to configure
1082&lsquo;<samp>libstdc++-v3</samp>&rsquo;.  We therefore recommend using the
1083following initial sequence of commands
1084</p>
1085<div class="example">
1086<pre class="example">% CONFIG_SHELL=/bin/ksh
1087% export CONFIG_SHELL
1088</pre></div>
1089
1090<p>and proceed as described in <a href="configure.html">the configure instructions</a>.
1091In addition we strongly recommend specifying an absolute path to invoke
1092<code><var>srcdir</var>/configure</code>.
1093</p>
1094<p>In Solaris 11, you need to check for <code>system/header</code>,
1095<code>system/linker</code>, and <code>developer/assembler</code> packages.
1096</p>
1097<p>Trying to use the linker and other tools in
1098<samp>/usr/ucb</samp> to install GCC has been observed to cause trouble.
1099For example, the linker may hang indefinitely.  The fix is to remove
1100<samp>/usr/ucb</samp> from your <code>PATH</code>.
1101</p>
1102<p>The build process works more smoothly with the legacy Solaris tools so, if you
1103have <samp>/usr/xpg4/bin</samp> in your <code>PATH</code>, we recommend that you place
1104<samp>/usr/bin</samp> before <samp>/usr/xpg4/bin</samp> for the duration of the build.
1105</p>
1106<p>We recommend the use of the Solaris assembler or the GNU assembler, in
1107conjunction with the Solaris linker.  The GNU <code>as</code>
1108versions included in Solaris 11.3,
1109from GNU binutils 2.23.1 or newer (in <samp>/usr/bin/gas</samp> and
1110<samp>/usr/gnu/bin/as</samp>), are known to work.
1111The current version, from GNU binutils 2.34,
1112is known to work as well.  Note that your mileage may vary
1113if you use a combination of the GNU tools and the Solaris tools: while the
1114combination GNU <code>as</code> + Solaris <code>ld</code> should reasonably work,
1115the reverse combination Solaris <code>as</code> + GNU <code>ld</code> may fail to
1116build or cause memory corruption at runtime in some cases for C++ programs.
1117GNU <code>ld</code> usually works as well.  Again, the current
1118version (2.34) is known to work, but generally lacks platform specific
1119features, so better stay with Solaris <code>ld</code>.  To use the LTO linker
1120plugin (<samp>-fuse-linker-plugin</samp>) with GNU <code>ld</code>, GNU
1121binutils <em>must</em> be configured with <samp>--enable-largefile</samp>.
1122</p>
1123<p>To enable symbol versioning in &lsquo;<samp>libstdc++</samp>&rsquo; with the Solaris linker,
1124you need to have any version of GNU <code>c++filt</code>, which is part of
1125GNU binutils.  &lsquo;<samp>libstdc++</samp>&rsquo; symbol versioning will be disabled if no
1126appropriate version is found.  Solaris <code>c++filt</code> from the Solaris
1127Studio compilers does <em>not</em> work.
1128</p>
1129<p>In order to build the GNU D compiler, GDC, a working &lsquo;<samp>libphobos</samp>&rsquo; is
1130needed.  That library wasn&rsquo;t built by default in GCC 9&ndash;11 on SPARC, or
1131on x86 when the Solaris assembler is used, but can be enabled by
1132configuring with <samp>--enable-libphobos</samp>.  Also, GDC 9.4.0 is
1133required on x86, while GDC 9.3.0 is known to work on SPARC.
1134</p>
1135<p>The versions of the GNU Multiple Precision Library (GMP), the MPFR
1136library and the MPC library bundled with Solaris 11.3 and later are
1137usually recent enough to match GCC&rsquo;s requirements.  There are two
1138caveats:
1139</p>
1140<ul>
1141<li> While the version of the GMP library in Solaris 11.3 works with GCC, you
1142need to configure with <samp>--with-gmp-include=/usr/include/gmp</samp>.
1143
1144</li><li> The version of the MPFR libary included in Solaris 11.3 is too old; you
1145need to provide a more recent one.
1146
1147</li></ul>
1148
1149<hr />
1150<span id="sparc-x-x"></span><span id="sparc*-*-*"></span><h3 class="heading">sparc*-*-*</h3>
1151<p>This section contains general configuration information for all
1152SPARC-based platforms.  In addition to reading this section, please
1153read all other sections that match your target.
1154</p>
1155<p>Newer versions of the GNU Multiple Precision Library (GMP), the MPFR
1156library and the MPC library are known to be miscompiled by earlier
1157versions of GCC on these platforms.  We therefore recommend the use
1158of the exact versions of these libraries listed as minimal versions
1159in <a href="prerequisites.html">the prerequisites</a>.
1160</p>
1161<hr />
1162<span id="sparc-sun-solaris2"></span><span id="sparc-sun-solaris2*"></span><h3 class="heading">sparc-sun-solaris2*</h3>
1163<p>When GCC is configured to use GNU binutils 2.14 or later, the binaries
1164produced are smaller than the ones produced using Solaris native tools;
1165this difference is quite significant for binaries containing debugging
1166information.
1167</p>
1168<p>Starting with Solaris 7, the operating system is capable of executing
116964-bit SPARC V9 binaries.  GCC 3.1 and later properly supports
1170this; the <samp>-m64</samp> option enables 64-bit code generation.
1171However, if all you want is code tuned for the UltraSPARC CPU, you
1172should try the <samp>-mtune=ultrasparc</samp> option instead, which produces
1173code that, unlike full 64-bit code, can still run on non-UltraSPARC
1174machines.
1175</p>
1176<p>When configuring the GNU Multiple Precision Library (GMP), the MPFR
1177library or the MPC library on a Solaris 7 or later system, the canonical
1178target triplet must be specified as the <code>build</code> parameter on the
1179configure line.  This target triplet can be obtained by invoking <code>./config.guess</code> in the toplevel source directory of GCC (and
1180not that of GMP or MPFR or MPC).  For example on a Solaris 11 system:
1181</p>
1182<div class="example">
1183<pre class="example">% ./configure --build=sparc-sun-solaris2.11 --prefix=xxx
1184</pre></div>
1185
1186<hr />
1187<span id="sparc-x-linux"></span><span id="sparc-*-linux*"></span><h3 class="heading">sparc-*-linux*</h3>
1188
1189<hr />
1190<span id="sparc64-x-solaris2"></span><span id="sparc64-*-solaris2*"></span><h3 class="heading">sparc64-*-solaris2*</h3>
1191<p>When configuring a 64-bit-default GCC on Solaris/SPARC, you must use a
1192build compiler that generates 64-bit code, either by default or by
1193specifying &lsquo;<samp>CC='gcc -m64' CXX='gcc-m64'</samp>&rsquo; to <code>configure</code>.
1194Additionally, you <em>must</em> pass <samp>--build=sparc64-sun-solaris2.11</samp>
1195or <samp>--build=sparcv9-sun-solaris2.11</samp> because <samp>config.guess</samp>
1196misdetects this situation, which can cause build failures.
1197</p>
1198<p>When configuring the GNU Multiple Precision Library (GMP), the MPFR
1199library or the MPC library, the canonical target triplet must be specified
1200as the <code>build</code> parameter on the configure line.  For example
1201on a Solaris 11 system:
1202</p>
1203<div class="example">
1204<pre class="example">% ./configure --build=sparc64-sun-solaris2.11 --prefix=xxx
1205</pre></div>
1206
1207<hr />
1208<span id="sparcv9-x-solaris2"></span><span id="sparcv9-*-solaris2*"></span><h3 class="heading">sparcv9-*-solaris2*</h3>
1209<p>This is a synonym for &lsquo;<samp>sparc64-*-solaris2*</samp>&rsquo;.
1210</p>
1211<hr />
1212<span id="c6x-x-x"></span><span id="c6x-*-*"></span><h3 class="heading">c6x-*-*</h3>
1213<p>The C6X family of processors. This port requires binutils-2.22 or newer.
1214</p>
1215<hr />
1216<span id="tilegx-*-linux"></span><span id="tilegx-*-linux*"></span><h3 class="heading">tilegx-*-linux*</h3>
1217<p>The TILE-Gx processor in little endian mode, running GNU/Linux.  This
1218port requires binutils-2.22 or newer.
1219</p>
1220<hr />
1221<span id="tilegxbe-*-linux"></span><span id="tilegxbe-*-linux*"></span><h3 class="heading">tilegxbe-*-linux*</h3>
1222<p>The TILE-Gx processor in big endian mode, running GNU/Linux.  This
1223port requires binutils-2.23 or newer.
1224</p>
1225<hr />
1226<span id="tilepro-*-linux"></span><span id="tilepro-*-linux*"></span><h3 class="heading">tilepro-*-linux*</h3>
1227<p>The TILEPro processor running GNU/Linux.  This port requires
1228binutils-2.22 or newer.
1229</p>
1230<hr />
1231<span id="visium-x-elf"></span><span id="visium-*-elf"></span><h3 class="heading">visium-*-elf</h3>
1232<p>CDS VISIUMcore processor.
1233This configuration is intended for embedded systems.
1234</p>
1235<hr />
1236<span id="x-x-vxworks"></span><span id="g_t*-*-vxworks*"></span><h3 class="heading">*-*-vxworks*</h3>
1237<p>Support for VxWorks is in flux.  At present GCC supports <em>only</em> the
1238very recent VxWorks 5.5 (aka Tornado 2.2) release, and only on PowerPC.
1239We welcome patches for other architectures supported by VxWorks 5.5.
1240Support for VxWorks AE would also be welcome; we believe this is merely
1241a matter of writing an appropriate &ldquo;configlette&rdquo; (see below).  We are
1242not interested in supporting older, a.out or COFF-based, versions of
1243VxWorks in GCC 3.
1244</p>
1245<p>VxWorks comes with an older version of GCC installed in
1246<samp><var>$WIND_BASE</var>/host</samp>; we recommend you do not overwrite it.
1247Choose an installation <var>prefix</var> entirely outside <var>$WIND_BASE</var>.
1248Before running <code>configure</code>, create the directories <samp><var>prefix</var></samp>
1249and <samp><var>prefix</var>/bin</samp>.  Link or copy the appropriate assembler,
1250linker, etc. into <samp><var>prefix</var>/bin</samp>, and set your <var>PATH</var> to
1251include that directory while running both <code>configure</code> and
1252<code>make</code>.
1253</p>
1254<p>You must give <code>configure</code> the
1255<samp>--with-headers=<var>$WIND_BASE</var>/target/h</samp> switch so that it can
1256find the VxWorks system headers.  Since VxWorks is a cross compilation
1257target only, you must also specify <samp>--target=<var>target</var></samp>.
1258<code>configure</code> will attempt to create the directory
1259<samp><var>prefix</var>/<var>target</var>/sys-include</samp> and copy files into it;
1260make sure the user running <code>configure</code> has sufficient privilege
1261to do so.
1262</p>
1263<p>GCC&rsquo;s exception handling runtime requires a special &ldquo;configlette&rdquo;
1264module, <samp>contrib/gthr_supp_vxw_5x.c</samp>.  Follow the instructions in
1265that file to add the module to your kernel build.  (Future versions of
1266VxWorks will incorporate this module.)
1267</p>
1268<hr />
1269<span id="x86-64-x-x"></span><span id="x86_005f64-*-*_002c-amd64-*-*"></span><h3 class="heading">x86_64-*-*, amd64-*-*</h3>
1270<p>GCC supports the x86-64 architecture implemented by the AMD64 processor
1271(amd64-*-* is an alias for x86_64-*-*) on GNU/Linux, FreeBSD and NetBSD.
1272On GNU/Linux the default is a bi-arch compiler which is able to generate
1273both 64-bit x86-64 and 32-bit x86 code (via the <samp>-m32</samp> switch).
1274</p>
1275<hr />
1276<span id="x86-64-x-solaris2"></span><span id="x86_005f64-*-solaris2*"></span><h3 class="heading">x86_64-*-solaris2*</h3>
1277<p>GCC also supports the x86-64 architecture implemented by the AMD64
1278processor (&lsquo;<samp>amd64-*-*</samp>&rsquo; is an alias for &lsquo;<samp>x86_64-*-*</samp>&rsquo;) on
1279Solaris 10 or later.  Unlike other systems, without special options a
1280bi-arch compiler is built which generates 32-bit code by default, but
1281can generate 64-bit x86-64 code with the <samp>-m64</samp> switch.  Since
1282GCC 4.7, there is also a configuration that defaults to 64-bit code, but
1283can generate 32-bit code with <samp>-m32</samp>.  To configure and build
1284this way, you have to provide all support libraries like <samp>libgmp</samp>
1285as 64-bit code, configure with <samp>--target=x86_64-pc-solaris2.11</samp>
1286and &lsquo;<samp>CC=gcc -m64</samp>&rsquo;.
1287</p>
1288<hr />
1289<span id="xtensa-x-elf"></span><span id="xtensa*-*-elf"></span><h3 class="heading">xtensa*-*-elf</h3>
1290<p>This target is intended for embedded Xtensa systems using the
1291&lsquo;<samp>newlib</samp>&rsquo; C library.  It uses ELF but does not support shared
1292objects.  Designed-defined instructions specified via the
1293Tensilica Instruction Extension (TIE) language are only supported
1294through inline assembly.
1295</p>
1296<p>The Xtensa configuration information must be specified prior to
1297building GCC.  The <samp>include/xtensa-config.h</samp> header
1298file contains the configuration information.  If you created your
1299own Xtensa configuration with the Xtensa Processor Generator, the
1300downloaded files include a customized copy of this header file,
1301which you can use to replace the default header file.
1302</p>
1303<hr />
1304<span id="xtensa-x-linux"></span><span id="xtensa*-*-linux*"></span><h3 class="heading">xtensa*-*-linux*</h3>
1305<p>This target is for Xtensa systems running GNU/Linux.  It supports ELF
1306shared objects and the GNU C library (glibc).  It also generates
1307position-independent code (PIC) regardless of whether the
1308<samp>-fpic</samp> or <samp>-fPIC</samp> options are used.  In other
1309respects, this target is the same as the
1310<a href="#xtensa*-*-elf">&lsquo;<samp>xtensa*-*-elf</samp>&rsquo;</a> target.
1311</p>
1312<hr />
1313<span id="windows"></span><span id="Microsoft-Windows"></span><h3 class="heading">Microsoft Windows</h3>
1314
1315<span id="Intel-16-bit-versions"></span><h4 class="subheading">Intel 16-bit versions</h4>
1316<p>The 16-bit versions of Microsoft Windows, such as Windows 3.1, are not
1317supported.
1318</p>
1319<p>However, the 32-bit port has limited support for Microsoft
1320Windows 3.11 in the Win32s environment, as a target only.  See below.
1321</p>
1322<span id="Intel-32-bit-versions"></span><h4 class="subheading">Intel 32-bit versions</h4>
1323<p>The 32-bit versions of Windows, including Windows 95, Windows NT, Windows
1324XP, and Windows Vista, are supported by several different target
1325platforms.  These targets differ in which Windows subsystem they target
1326and which C libraries are used.
1327</p>
1328<ul>
1329<li> Cygwin <a href="#x-x-cygwin">*-*-cygwin</a>: Cygwin provides a user-space
1330Linux API emulation layer in the Win32 subsystem.
1331</li><li> MinGW <a href="#x-x-mingw32">*-*-mingw32</a>: MinGW is a native GCC port for
1332the Win32 subsystem that provides a subset of POSIX.
1333</li><li> MKS i386-pc-mks: NuTCracker from MKS.  See
1334<a href="https://www.mkssoftware.com">https://www.mkssoftware.com</a> for more information.
1335</li></ul>
1336
1337<span id="Intel-64-bit-versions"></span><h4 class="subheading">Intel 64-bit versions</h4>
1338<p>GCC contains support for x86-64 using the mingw-w64
1339runtime library, available from <a href="https://www.mingw-w64.org/downloads/">https://www.mingw-w64.org/downloads/</a>.
1340This library should be used with the target triple x86_64-pc-mingw32.
1341</p>
1342<span id="Windows-CE"></span><h4 class="subheading">Windows CE</h4>
1343<p>Windows CE is supported as a target only on Hitachi
1344SuperH (sh-wince-pe), and MIPS (mips-wince-pe).
1345</p>
1346<span id="Other-Windows-Platforms"></span><h4 class="subheading">Other Windows Platforms</h4>
1347<p>GCC no longer supports Windows NT on the Alpha or PowerPC.
1348</p>
1349<p>GCC no longer supports the Windows POSIX subsystem.  However, it does
1350support the Interix subsystem.  See above.
1351</p>
1352<p>Old target names including *-*-winnt and *-*-windowsnt are no longer used.
1353</p>
1354<p>PW32 (i386-pc-pw32) support was never completed, and the project seems to
1355be inactive.  See <a href="http://pw32.sourceforge.net/">http://pw32.sourceforge.net/</a> for more information.
1356</p>
1357<p>UWIN support has been removed due to a lack of maintenance.
1358</p>
1359<hr />
1360<span id="x-x-cygwin"></span><span id="g_t*-*-cygwin"></span><h3 class="heading">*-*-cygwin</h3>
1361<p>Ports of GCC are included with the
1362<a href="http://www.cygwin.com/">Cygwin environment</a>.
1363</p>
1364<p>GCC will build under Cygwin without modification; it does not build
1365with Microsoft&rsquo;s C++ compiler and there are no plans to make it do so.
1366</p>
1367<p>The Cygwin native compiler can be configured to target any 32-bit x86
1368cpu architecture desired; the default is i686-pc-cygwin.  It should be
1369used with as up-to-date a version of binutils as possible; use either
1370the latest official GNU binutils release in the Cygwin distribution,
1371or version 2.20 or above if building your own.
1372</p>
1373<hr />
1374<span id="x-x-mingw32"></span><span id="g_t*-*-mingw32"></span><h3 class="heading">*-*-mingw32</h3>
1375<p>GCC will build with and support only MinGW runtime 3.12 and later.
1376Earlier versions of headers are incompatible with the new default semantics
1377of <code>extern inline</code> in <code>-std=c99</code> and <code>-std=gnu99</code> modes.
1378</p>
1379<p>To support emitting DWARF debugging info you need to use GNU binutils
1380version 2.16 or above containing support for the <code>.secrel32</code>
1381assembler pseudo-op.
1382</p>
1383<hr />
1384<span id="older"></span><span id="Older-systems"></span><h3 class="heading">Older systems</h3>
1385<p>GCC contains support files for many older (1980s and early
13861990s) Unix variants.  For the most part, support for these systems
1387has not been deliberately removed, but it has not been maintained for
1388several years and may suffer from bitrot.
1389</p>
1390<p>Starting with GCC 3.1, each release has a list of &ldquo;obsoleted&rdquo; systems.
1391Support for these systems is still present in that release, but
1392<code>configure</code> will fail unless the <samp>--enable-obsolete</samp>
1393option is given.  Unless a maintainer steps forward, support for these
1394systems will be removed from the next release of GCC.
1395</p>
1396<p>Support for old systems as hosts for GCC can cause problems if the
1397workarounds for compiler, library and operating system bugs affect the
1398cleanliness or maintainability of the rest of GCC.  In some cases, to
1399bring GCC up on such a system, if still possible with current GCC, may
1400require first installing an old version of GCC which did work on that
1401system, and using it to compile a more recent GCC, to avoid bugs in the
1402vendor compiler.  Old releases of GCC 1 and GCC 2 are available in the
1403<samp>old-releases</samp> directory on the <a href="../mirrors.html">GCC mirror
1404sites</a>.  Header bugs may generally be avoided using
1405<code>fixincludes</code>, but bugs or deficiencies in libraries and the
1406operating system may still cause problems.
1407</p>
1408<p>Support for older systems as targets for cross-compilation is less
1409problematic than support for them as hosts for GCC; if an enthusiast
1410wishes to make such a target work again (including resurrecting any of
1411the targets that never worked with GCC 2, starting from the last
1412version before they were removed), patches
1413<a href="../contribute.html">following the usual requirements</a> would be
1414likely to be accepted, since they should not affect the support for more
1415modern targets.
1416</p>
1417<p>For some systems, old versions of GNU binutils may also be useful,
1418and are available from <samp>pub/binutils/old-releases</samp> on
1419<a href="https://sourceware.org/mirrors.html">sourceware.org mirror sites</a>.
1420</p>
1421<p>Some of the information on specific systems above relates to
1422such older systems, but much of the information
1423about GCC on such systems (which may no longer be applicable to
1424current GCC) is to be found in the GCC texinfo manual.
1425</p>
1426<hr />
1427<span id="elf"></span><span id="all-ELF-targets-_0028SVR4_002c-Solaris-2_002c-etc_002e_0029"></span><h3 class="heading">all ELF targets (SVR4, Solaris 2, etc.)</h3>
1428<p>C++ support is significantly better on ELF targets if you use the
1429<a href="./configure.html#with-gnu-ld">GNU linker</a>; duplicate copies of
1430inlines, vtables and template instantiations will be discarded
1431automatically.
1432</p>
1433
1434<hr />
1435<p>
1436<p><a href="./index.html">Return to the GCC Installation page</a>
1437</p>
1438
1439
1440
1441
1442
1443</body>
1444</html>
1445