Host/Target specific installation notes for GCC

Please read this document carefully before installing the GNU Compiler Collection on your machine.

Note that this list of install notes is not a list of supported hosts or targets. Not all supported hosts and targets are listed here, only the ones that require host-specific or target-specific information have to.


aarch64*-*-*

To enable a workaround for the Cortex-A53 erratum number 835769 by default (for all CPUs regardless of -mcpu option given) at configure time use the --enable-fix-cortex-a53-835769 option. This will enable the fix by default and can be explicitly disabled during compilation by passing the -mno-fix-cortex-a53-835769 option. Conversely, --disable-fix-cortex-a53-835769 will disable the workaround by default. The workaround is disabled by default if neither of --enable-fix-cortex-a53-835769 or --disable-fix-cortex-a53-835769 is given at configure time.

To enable a workaround for the Cortex-A53 erratum number 843419 by default (for all CPUs regardless of -mcpu option given) at configure time use the --enable-fix-cortex-a53-843419 option. This workaround is applied at link time. Enabling the workaround will cause GCC to pass the relevant option to the linker. It can be explicitly disabled during compilation by passing the -mno-fix-cortex-a53-843419 option. Conversely, --disable-fix-cortex-a53-843419 will disable the workaround by default. The workaround is disabled by default if neither of --enable-fix-cortex-a53-843419 or --disable-fix-cortex-a53-843419 is given at configure time.

To enable Branch Target Identification Mechanism and Return Address Signing by default at configure time use the --enable-standard-branch-protection option. This is equivalent to having -mbranch-protection=standard during compilation. This can be explicitly disabled during compilation by passing the -mbranch-protection=none option which turns off all types of branch protections. Conversely, --disable-standard-branch-protection will disable both the protections by default. This mechanism is turned off by default if neither of the options are given at configure time.


amdgcn-*-amdhsa

AMD GCN GPU target.

Instead of GNU Binutils, you need to install LLVM and copy bin/llvm-mc to amdgcn-amdhsa/bin/as, bin/lld to amdgcn-amdhsa/bin/ld, bin/llvm-objdump to amdgcn-amdhsa/bin/objdump, bin/llvm-nm to amdgcn-amdhsa/bin/nm, and bin/llvm-ar to both bin/amdgcn-amdhsa-ar and bin/amdgcn-amdhsa-ranlib. The LLVM version is required for the assembler (llvm-mc) and linker (lld); however, for the others, the respective GNU Binutils counterpart can be used instead. While all mentioned programs are required when building GCC, the installed GCC compiler only needs the assembler and linker; nm, ar, and ranlib are required when installing gcc-nm, gcc-ar, and gcc-ranlib.

The required version of LLVM depends on the devices that you want to support. As the list of ISAs is long, GCC by default only builds a subset of the supported ISAs as multilib; use --with-multilib-list= to tailor the built multilibs. Note that mixing ISAs in the same binary is not supported and gives a linker error.

By default, multilib support is built for gfx908, gfx90a, gfx9-generic, gfx9-4-generic, gfx10-3-generic, and gfx11-generic, which covers all supported archs. The default multilib configuration requires LLVM 20 or newer. LLVM 13.0.1 or LLVM 14 can be used by specifying a --with-multilib-list= that only lists GFX9 or GFX10-3 devices, while LLVM 15 is required for GFX 11 device and gfx1036. At least LLVM 16 is required for gfx1150 and gfx1151, LLVM 18 for gfx942, LLVM 19 for the generic gfx9-generic, gfx10-3-generic, and gfx11-generic targets and for gfx1152, while LLVM 20 is required for gfx950, gfx1153, and gfx9-4-generic.

The supported ISA architectures are listed in the GCC manual. The generic ISA targets gfx9-generic, gfx10-3-generic, and gfx11-generic reduce the number of required multilibs but note that gfx9-generic does not include gfx908 or gfx90a, that linking specific ISA code with generic code is currently not supported, and that only ROCm 6.4.0 or newer is able to execute generic code.

Use Newlib (4.6.0 or newer).

To run the binaries, install the HSA Runtime from the ROCm Platform, and use libexec/gcc/amdhsa-amdhsa/version/gcn-run to launch them on the GPU.


arc-*-elf32

Use ‘configure --target=arc-elf32 --with-cpu=cpu --enable-languages="c,c++"’ to configure GCC, with cpu being one of ‘arc600’, ‘arc601’, or ‘arc700’.


arc-linux-uclibc

Use ‘configure --target=arc-linux-uclibc --with-cpu=arc700 --enable-languages="c,c++"’ to configure GCC.


arm-*-eabi

ARM-family processors.

Building the Ada frontend commonly fails (an infinite loop executing xsinfo) if the host compiler is GNAT 4.8. Host compilers built from the GNAT 4.6, 4.9 or 5 release branches are known to succeed.


avr

AVR 8-bit microcontrollers. These are used in embedded applications. There are no standard Unix configurations. See AVR Options in the main manual for the list of supported MCU types.

Use ‘configure --target=avr --enable-languages="c,c++"’ to configure GCC.

Further installation notes and other useful information about AVR tools can also be obtained from:


Blackfin

The Blackfin processor, an Analog Devices DSP. See “Blackfin Options” in the main manual

More information, and a version of Binutils with support for this processor, are available at https://sourceforge.net/projects/adi-toolchain/.


CRIS

CRIS is a CPU architecture in Axis Communications systems-on-a-chip, for example the ETRAX series. These are used in embedded applications.

See “CRIS Options” in the main manual for a list of CRIS-specific options.

Use ‘configure --target=cris-elf’ to configure GCC for building a cross-compiler for CRIS.


DOS

Please have a look at the binaries page.

You cannot install GCC by itself on MSDOS; it will not compile under any MSDOS compiler except itself. You need to get the complete compilation package DJGPP, which includes binaries as well as sources, and includes all the necessary compilation tools and libraries.


epiphany-*-elf

Adapteva Epiphany. This configuration is intended for embedded systems.


*-*-freebsd*

FreeBSD using the ELF file format with DWARF 2 debugging.

We recommend bootstrapping against the latest GNU Binutils or the version found in the devel/binutils port. This also has been known to enable additional features and improve overall testsuite results.

Ada and D (or rather their respective libraries) are broken on FreeBSD/i386. This also affects building 32-bit libraries on FreeBSD/amd64, so configure with --disable-multilib there in case you are building one of these front ends.

Go (or rather libgo) is generally broken on FreeBSD.


ft32-*-elf

The FT32 processor. This configuration is intended for embedded systems.


h8300-hms

Renesas H8/300 series of processors.


hppa64-hp-hpux11*

Only the 64-bit ‘hppa’ target is supported on HP-UX. Support for 32-bit ‘hppa’ was discontinued in GCC 13.

We require using gas on all hppa platforms. It may be helpful to configure GCC with the --with-as=… option to ensure that GCC can find GAS.

The DCE thread library is not supported, so --enable-threads=dce does not work.

Currently, there are no precompiled binaries for 64-bit HP-UX.

Binutils and other required tools can be built using the HP tools. Then, the GCC distribution can be built. This is challenging due to the many dependencies.


*-*-linux-gnu

Versions of libstdc++-v3 starting with 3.2.1 require bug fixes present in glibc 2.2.5 and later. More information is available in the libstdc++-v3 documentation.