Appendix A. Sourcery G++ Lite Release Notes
Prev |  | Next

## Appendix A. Sourcery G++ Lite Release Notes

This appendix contains information about changes in this release of Sourcery G++ Lite for ARM GNU/Linux. You should read through these notes to learn about new features and bug fixes.

## A.1. Changes in Sourcery G++ Lite for ARM GNU/Linux

This section documents Sourcery G++ Lite changes for each released revision.

### A.1.1. Changes in Sourcery G++ Lite 2011.03-41

Variable Length Array (VLA) alignment bug. A compiler bug that resulted in incorrectly aligned variable length arrays (VLA) in leaf functions has been fixed.

Cortex-R5 support. Sourcery G++ now includes support for ARM Cortex-R5 processors. To compile for these processors, use `-mcpu=cortex-r5`.

Inline assembly and volatile fields. A bug has been fixed that caused the compiler to incorrectly reject inline `asm` statements referring to volatile class/struct fields with errors such as `error: output number 1 not directly addressable`.

Fixed-point arithmetic support. Experimental compiler support has been added for fixed-point arithmetic on ARM, as described in the draft ISO/IEC technical report TR 18037. Specialized instructions defined in recent architecture versions for performing saturating arithmetic, etc. are used when available, but are not a prerequisite for using the new language features. See Section 3.10, “Fixed-Point Arithmetic” for further details.

C++ constructor bug fix. A compiler bug has been fixed that caused incorrect code for C++ constructors for some class hierarchies that use virtual inheritance and include empty classes. At runtime, the incorrect constructors resulted in memory corruption or other errors.

Thumb debug information fix. A compiler bug that resulted in incorrect debug information for Thumb code has been fixed. The incorrect information prevented single stepping through some code.

Internal compiler error with pointer casting. A compiler bug has been fixed that caused internal compiler errors when accessing double-word memory locations with casted pointers under ARM mode.

Unaligned access support. The compiler now generates more efficient code for accessing packed data structures and for copying small blocks of unaligned data when targeting architectures that permit unaligned word/halfword accesses. This feature can be controlled by the `-munaligned-access` and `-mno-unaligned-access` options, and is enabled by default for ARMv6 processors and above, except for ARMv6-M.

Internal compiler error under Thumb mode. A compiler bug has been fixed that caused internal compiler errors when generating Thumb code.

EGLIBC version 2.13. Sourcery G++ Lite for ARM GNU/Linux now includes EGLIBC version 2.13 library which is based on GNU C Library version 2.13. For more information about changes, see `http://www.eglibc.org/news#eglibc_2_13`.

### A.1.2. Changes in Sourcery G++ Lite 2011.03-18

GCC fixes for `-fstrict-volatile-bitfields`. GCC now honors `-fstrict-volatile-bitfields` when a bitfield is not declared volatile initially, but an object including bit fields is cast to volatile. Also, a bug was fixed that caused incorrect code to be generated for some stores to volatile bit fields when `-fstrict-volatile-bitfields` is enabled.

Compiler optimization improvements. The compiler has been enhanced with a number of optimization improvements, including:

- Smaller and faster code for compound conditionals.
- Removal of superfluous sign and zero extensions.
- Improved code for multiply-and-accumulate operations on ARM.

Internal compiler error with NEON intrinsics. A compiler bug has been fixed that caused internal compiler errors when using certain NEON intrinsics.

GCC version 4.5.2. Sourcery G++ Lite for ARM GNU/Linux is now based on GCC version 4.5.2.

GCC code generation bug for casts to `volatile` types. A compiler bug has been fixed that sometimes caused incorrect code for references to pointers to types with `volatile` casts.

Incorrect optimization fix. An optimizer bug that in rare cases caused incorrect code to be generated for complex AND and OR expressions containing redundant subexpressions has been fixed.

Incorrect C++ warning fixed. A bug in GCC has been fixed that caused spurious warnings about lambda expressions in C++ code that does not use them.

GCC fixes for NEON in big-endian mode. Several compiler bugs have been fixed that could lead to incorrect code when using NEON in big-endian mode. The problems only manifested when using the auto-vectorizer (enabled by default at the `-O3` optimization level) with the `-mvectorize-with-neon-quad` option.

GCC fix for thread-local storage. A compiler optimization bug has been fixed that affected accesses to thread-local storage. The bug resulted in assembler errors of the form `symbol `.LPIC2' is already defined`.

Incorrect code for built-in comparison functions. A bug has been fixed that sometimes caused GCC's built-in comparison functions, such as `__builtin_isgreaterequal`, to incorrectly raise exceptions when invoked on unordered floating-point arguments.

C++ exception handling. A defect in the implementation of the EH-ABI specification has been fixed. The defect affected the catching of pointer types in code generated by the ARM RealView® compiler but using the Sourcery G++ runtime libraries. The fix also retains backward compatibility with existing GCC-compiled code.

GCC bug where accesses to volatile structure fields are optimized away. A bug has been fixed where accesses to volatile fields of a structure were sometimes incorrectly optimized away if the structure instance was defined as non-volatile.

Internal compiler error fixes. Two bugs have been fixed that caused compiler crashes in rare cases. The first bug involved code with multiple comparison operations, and the second one involved `char` to `int` conversion.

Thumb-2 assembler validation fix. The assembler now correctly rejects Thumb-2 `ADD`, `ADDS`, `SUB`, and `SUBS` instructions that have an invalid shift operand. Previously, invalid shift values were accepted and generated unpredictable instructions.

Objdump fix for multiple input files. The Objdump utility did not produce correct disassembly when processing multiple input files. This has been fixed.

`popen` bug fix. GLIBC's `popen` function no longer causes a deadlock situation when invoked from more than one thread.

`strstr` and `strcasestr` bug fixes. A problem has been fixed that caused GLIBC's `strstr` and `strcasestr` functions to return wrong results on certain inputs.

Linux kernel headers update. Linux kernel header files have been updated to version 2.6.38.

Improved GDB startup times when debugging remote targets . GDB has been enhanced to reduce the startup times when working with remote targets via GDBServer, especially when the target uses a large number of shared libraries.

### A.1.3. Changes in Sourcery G++ Lite 2010.09-50

GCC fix for duplicated symbols. A GCC optimizer bug that caused multiple definitions of local symbols has been fixed. Code affected by the bug was rejected by the assembler.

NEON code generation fix. A GCC bug has been fixed that resulted in an assembler error `VFP/Neon double precision register expected`.

Static data size improvement at `-Os`. When optimizing for size, the compiler no longer implicitly adds padding bytes to align static and local arrays on word boundaries. This fixes static data size regressions introduced since GCC 4.4. The additional alignment is still used when optimizing for speed.

New `-fstrict-volatile-bitfields` option. The compiler has a new option, `-fstrict-volatile-bitfields`, which forces access to a volatile structure member using the width that conforms to its type. This option is enabled by default to conform to the ARM EABI. Refer to the GCC manual for details.

Internal compiler error fixes. A bug has been fixed that caused the compiler to crash on code containing a `typedef` alias for `__builtin_va_list` with option `-femit-struct-debug-baseonly`. This bug affected compiling the Linux kernel. A second bug has been fixed that caused a crash when compiling code using C99 variable-length arrays. Additionally, a compiler crash on code using 64-bit integer multiplications with NEON vectorization enabled has also been fixed.

NEON narrowing-move instructions. The compiler now supports narrowing-move instructions when auto-vectorizing for NEON. Loops accessing arrays of `char` or `short` values are now more likely to be vectorized.

Improved support for atomic memory builtins. The compiler support for built-in atomic memory access operations on ARMv7 targets has been improved. These builtins are documented in the GCC manual.

Improved thread-local storage access. Sourcery G++ Lite now implements the TLS Descriptor access model, which provides faster access to thread-local storage from shared libraries and position-independent executables. This GCC option, which is enabled by default, additionally requires support from the dynamic loader. Code built with older versions of Sourcery G++ continues to work with the included loader. For more information, refer to Section 3.5, “Target Dynamic Loader Requirements”.

Linker debug information fix. A bug in linker processing of debug information has been fixed. The bug sometimes prevented the Sourcery G++ debugger from displaying source code if the executable was linked with the `--gc-sections` option.

Absolute branch bug fixes. A bug that caused the assembler to crash on a branch to an absolute address has been fixed. Linker handling of the resulting relocations has also been improved. Previously this caused an invalid switch to ARM mode on ARMv7-M devices.

`VMOV` instruction bug fix. A bug that caused the assembler to incorrectly reject certain valid immediate operands for the `VMOV` instruction has been fixed.

### A.1.4. Changes in Sourcery G++ Lite 2010.09-29

Changes to Sourcery G++ version numbering. Sourcery G++ product and Lite toolchains now uniformly use a version numbering scheme of the form 2011.03-41. The major and minor parts of the version number, in this case 2011.03, identify the release branch, while the final component is a build number within the branch. There are also new preprocessor macros defined by the compiler for the version number components so that you may conditionalize code for Sourcery G++ or particular Sourcery G++ versions. Details are available in the Sourcery G++ Knowledge Base.

GCC fix for reference to undefined label. A bug in the optimizer that caused GCC to emit references to undefined labels has been fixed.

Precision improvement with vectorization enabled. The GCC auto-vectorizer no longer uses NEON floating-point instructions unless the `-funsafe-math-optimizations` option (implied by `-ffast-math`) is specified. This is because NEON hardware does not fully support the IEEE 754 standard for floating-point arithmetic. In particular, very small quantities may be flushed to zero.

Alignment attributes. A bug has been fixed that caused the compiler to ignore alignment attributes of C++ static member variables where the attribute was present on the definition, but not the declaration.

`naked` attribute semantics. The `naked` function attribute now also implies the `noinline` and `noclone` attributes. This fixes bugs resulting from invalid optimizations of functions with this attribute.

Stack corruption bug fix. A bug in GCC has been fixed that caused stack corruption in functions with the `interrupt` attribute.

GCC bug fix for push multiple instruction generation. A bug has been fixed that caused GCC to generate incorrect push multiple instructions, causing an assembler warning `register range not in ascending order`.

Thumb-2 internal compiler error fix. A bug has been fixed that caused the compiler to crash when compiling Thumb-2 code using 64-bit integer arithmetic.

Compiler optimization improvements. The compiler has been enhanced with a number of optimization improvements, including:

- More efficient assignment for structures containing bitfields.
- Better code for initializing C++ arrays with explicit element initializers.
- Improved logic for eliminating/combining redundant comparisons in code with nested conditionals.
- Better selection of loop variables, resulting in fewer temporaries and more efficient register usage.
- More optimization of references to globals in position-independent code.
- Various Thumb code generation improvements.
- Better code when constant addresses are used as arguments to inline assembly statements.
- Better code for copying small constant strings.
- Improved tuning for Cortex-M4 processors.
- Cortex-A9 specific tuning for VFP and NEON instructions.
- Use of more NEON features.

Preprocessor symbols for floating-point calling convention. Built-in preprocessor symbols `__ARM_PCS` and `__ARM_PCS_VFP` are now defined to indicate the current floating-point calling convention.

GCC version 4.5.1. Sourcery G++ Lite for ARM GNU/Linux is now based on GCC version 4.5.1. For more information about changes from GCC version 4.4 that was included in previous releases, see `http://gcc.gnu.org/gcc-4.5/changes.html`.

C++ locale support. The C++ standard library now includes locale support.

New `-Wdouble-promotion` warning option. The compiler has a new option, `-Wdouble-promotion`, which enables warnings about implicit promotions of `float` values to `double`. This option is useful when compiling code for processors (such as ARM Cortex-M4) that have hardware support for single-precision floating-point arithmetic only, where unintentional use of double precision results in dramatically slower code.

Linker bug fix. A bug that caused the linker error `relocation truncated to fit: R_ARM_THM_JUMP24` when linking some Thumb-2 applications has been fixed.

Assembler PC-relative store fix. A bug that caused the assembler to reject some valid PC-relative store instructions has been fixed. It now issues a warning instead for architectures where these instructions are deprecated.

ARMv7-A linker bug fix. A bug in the linker support for `--fix-cortex-a8`, which is enabled by default when linking ARMv7-A objects, has been fixed. Programs affected by the bug sometimes crashed with segmentation fault or illegal instruction errors.

Smaller C++ programs with `-g`. An assembler bug has been fixed that caused unnecessary references to exception-handling routines from C++ programs when debug information is enabled. For programs that do not otherwise use exceptions, this change results in smaller code size.

Additional validation in the assembler. The assembler now diagnoses an error, instead of producing an invalid object file, when directives such as `.hidden` are missing operands.

Assembler PC-relative load fix. An assembler bug that caused the assembler to reject some references to global symbols has been fixed. This bug affected Thumb instructions of the form `ldr r0, `symbol``.

Strip bug fix. A bug in the `strip` and `objcopy` utilities, which resulted in stripped object files that the linker could not recognize, has been fixed.

Binutils update. The binutils package has been updated to version 2.20.51.20100809 from the FSF trunk. This update includes numerous bug fixes.

More efficient process creation functions. The `system` and `popen` functions provided by GLIBC have been improved to require less memory when memory overcommit is disabled in the Linux kernel.

Optimized string and memory functions. The performance of GLIBC's string and memory functions, including `strstr` and `memmem`, have been significantly improved for large inputs.

Linux kernel headers update. Linux kernel header files have been updated to version 2.6.35.2.

Improved support for debugging RealView® C++ programs . GDB has been enhanced to handle some debug information contained in binaries produced by the ARM RealView® compiler. Formerly, GDB sometimes crashed on programs which use C++ templates. Another bug has been fixed that caused GDB to fail to place breakpoints in binaries produced by the ARM RealView® compiler when the source file location for the breakpoint was specified as an absolute pathname.

GDB update. The included version of GDB has been updated to 7.2.50.20100908. This update adds numerous bug fixes and new features, including improved C++ language support, a new command to save breakpoints to a file, a new convenience variable `$_thread` that holds the number of the current thread, among many other improvements.

GDB crash fix. A bug has been fixed that caused GDB to crash on launch if the environment variable `CYGPATH` is set to a program that does not exist or cannot be executed.

### A.1.5. Changes in Older Releases

For information about changes in older releases of Sourcery G++ Lite for ARM GNU/Linux, please refer to the Getting Started guide packaged with those releases.

Prev |  | Next
6.3. Manuals for GNU Toolchain Components | Home | Appendix B. Sourcery G++ Lite Licenses