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
Sourcery G++ includes copies of run-time libraries that have been built with optimizations for different target architecture variants or other sets of build options. Each such set of libraries is referred to as a multilib. When you link a target application, Sourcery G++ selects the multilib matching the build options you have selected.
Each multilib corresponds to a sysroot directory
that contains the files that should be installed on the target system.
The sysroot contains the dynamic linker used to run your applications
on the target as well as the libraries.
Refer to the section called “Using Sourcery G++ Lite on GNU/Linux Targets” for instructions
on how to install and use these support files on your target GNU/Linux
system.
You can find the sysroot directories provided with Sourcery G++ in the
arm-none-linux-gnueabi/libc
directory of your installation.
In the tables below, the dynamic linker pathname is given relative
to the corresponding sysroot.
The following library configurations are available in Sourcery G++ Lite for ARM GNU/Linux.
ARMv5T - Little-Endian, Soft-Float, GLIBC | |
---|---|
Command-line option(s): | default |
Sysroot subdirectory: | ./ |
Dynamic linker: | lib/ld-linux.so.3 |
ARMv4T - Little-Endian, Soft-Float, GLIBC | |
---|---|
Command-line option(s): | -march=armv4t |
Sysroot subdirectory: | armv4t/ |
Dynamic linker: | lib/ld-linux.so.3 |
ARMv7-A Thumb-2 - Little-Endian, Soft-Float, GLIBC | |
---|---|
Command-line option(s): | -mthumb -march=armv7-a |
Sysroot subdirectory: | thumb2/ |
Dynamic linker: | lib/ld-linux.so.3 |
A given multilib may be compatible with additional processors and build options beyond those listed above. However, even if a particular set of command-line options produces code compatible with one of the provided multilibs, those options may not be sufficient to identify the intended library to the linker. For example, on some targets, specifying only a processor option on the command line may imply architecture features or floating-point support for compilation, but not for library selection. The details of the mapping from command-line options to multilibs are target-specific and quite complex. Therefore, it is recommended that your link command line include exactly the options listed in the tables above for your intended target multilib. In some cases, you may need to supply different options for linking than for compilation.
If you are uncertain which multilib is selected by a particular set of
command-line options, GCC can tell you if you invoke it with the
-print-multi-directory
option in addition to your
other build options. For example:
> arm-none-linux-gnueabi-gcc -print-multi-directory options...
The output of this command is a directory name for the multilib, which you can look up in the tables given previously.