Chapter 3. Sourcery G++ Lite for ARM GNU/Linux

Abstract

This chapter contains information about using Sourcery G++ Lite on your target system. This chapter also contains information about changes in this release of Sourcery G++ Lite. You should read this chapter to learn how to best use Sourcery G++ Lite on your target system.

Table of Contents

Using Sourcery G++ Lite for ARM GNU/Linux
Target Kernel Requirements
Compiling for ARMv4t systems
NEON SIMD Code
Sourcery G++ Lite Release Notes
Changes in Sourcery G++ Lite 2007q3-51
Changes in Sourcery G++ Lite 2007q3-33
Changes in Sourcery G++ Lite 2007q1-21
Changes in Sourcery G++ Lite 2007q1-10
Changes in Sourcery G++ Lite 2007q1-3
Changes in Sourcery G++ Lite 4.1-37
Changes in Sourcery G++ Lite 4.1-34
Changes in Sourcery G++ Lite 4.1-33
Changes in Sourcery G++ Lite 4.1-31
Changes in Sourcery G++ Lite 4.1-29
Changes in Sourcery G++ Lite 4.1-28
Changes in Sourcery G++ Lite 4.1-27
Changes in Sourcery G++ Lite 4.1-23
Changes in Sourcery G++ Lite 4.1-21
Changes in Sourcery G++ Lite 4.1-19
Changes in Sourcery G++ Lite 4.1-18
Changes in Sourcery G++ Lite 4.1-16
Changes in Sourcery G++ Lite 4.1-15
Changes in Sourcery G++ Lite 4.1-13
Changes in Sourcery G++ Lite 4.1-9
Changes in Sourcery G++ Lite 4.1-8
Changes in Sourcery G++ Lite 4.1-4
Changes in Sourcery G++ Lite 4.1-1

Using Sourcery G++ Lite for ARM GNU/Linux

Target Kernel Requirements

The GNU C library supplied with Sourcery G++ Lite uses the new EABI-based kernel syscall interface. This means applications compiled with Sourcery G++ Lite require at least a 2.6.16 kernel with EABI syscalls enabled.

Compiling for ARMv4t systems

By default Sourcery G++ Lite generates Linux binaries that require an ARMv5 or later CPU. To build applications or libraries capable of running on ARMv4t CPUs, use the -march=armv4t command-line option.

Runtime libraries suitable for ARMv4t systems are supplied in the armv4t subdirectory.

Code compiled for ARMv4t is ABI compatible with ARMv5 code. Code and binaries compiled for different architectures may be mixed freely.

Caution

There are several other ways to tell the compiler to generate ARMv4t code. However -march=armv4t must be used when linking to ensure the correct libraries and startup code are selected.

NEON SIMD Code

Sourcery G++ Lite contains preliminary support for automatic generation of NEON SIMD vector code. Autovectorization is a compiler optimization where loops involving normal integer or floating-point code are transformed into loops that use NEON SIMD instruction to process several data elements at once.

To enable generation of NEON vector code specify -ftree-vectorize -mfpu=neon -mfloat-abi=softfp. -mfpu=neon also enables generations of VFPv3 scalar floating-point code.

Sourcery G++ Lite also contains preliminary support for manual generation of NEON SIMD code using C intrinsic functions. These intrinsics, the same as those supported by the ARM RVCT compiler, are defined in the arm_neon.h header and are documented in the 'ARM NEON Intrinsics' section of the GCC manual. The options -mfpu=neon -mfloat-abi=softfp must be specified to use these intrinsics; -ftree-vectorize is not required.

NEON support is still under active development. It has not been subject to extensive testing, and may not yet take full advantage of all the features provided by the NEON architecture.