Chapter 2.  Red Hat Developer Toolset 3.0 Release

This chapter serves as an overview of Red Hat Developer Toolset 3.0. It sums up its main features and changes, and provides a list of known issues.

2.1. Changes in Red Hat Developer Toolset 3.0

2.1.1. New Component: ltrace

Red Hat Developer Toolset 3.0 adds ltrace as a new component. ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and records both the dynamic library calls called by the executed process and the signals received by the executed process. ltrace can also intercept and print system calls executed by the process. For more information, see Red Hat Developer Toolset User Guide.

2.1.2. Other Changes

For detailed information on changes in Red Hat Developer Toolset 3.0, see Red Hat Developer Toolset User Guide.

2.2. Features

2.2.1. Main Features

The Red Hat Developer Toolset version of the GNU Compiler Collection (GCC) provides the following features:
  • Link-time optimization (LTO) has been improved in a number of ways, so that it is faster, consumes less memory, and generates smaller object files.
  • Inter-procedural analysis (IPA) has been improved, and speculative devirtualization optimization has been added.
  • Support for profiling code has been made more reliable.
  • The Intel AVX-512 target architecture is now supported, as well as a number of new Intel microarchitectures.
  • A new pragma, #pragma GCC ivdep, has been added.
  • Support for C11 has been improved, and ISO C11 atomics, generic selections, and thread-local storage are now supported.
  • A subset of the functionality of C++11 auto is now provided in GNU C through a new extension, __auto_type.
  • The C and C++ compilers now support the OpenMP 4.0 specification.
  • The g++ compiler offers improved support for various features of the C++ standard, including generic lambdas, variable-length arrays, and digit separators.
  • The C++ runtime library C++11 support has been improved and now includes experimental support for the upcoming ISO C++ standard, C++14.
  • GCC now adds support for Cilk+, an extension to the C and C++ languages for parallel programming.
The version of the GNU Debugger (GDB) included in Red Hat Developer Toolset provides the following new features:
  • Python scripting support has been enhanced in a number of ways.
  • Several new commands and enhancements in GDB/MI have been added.
  • Support for the CTF (Common Trace Format) has been added.
  • The btrace record target has been enhanced in a number of ways.
  • The remote protocol and GDBserver, the GDB remote stub, have been enhanced in a number of ways.
Additionally, the Red Hat Developer Toolset version of binutils provides these features:
  • The objcopy utility now supports wildcards for section names in command line options.
  • The AVX-512 (512-bit Advanced Vector Extensions) are now supported.
For a full list of changes and features introduced in this release, see Red Hat Developer Toolset User Guide.

2.2.2. Other Features

C++ Compatibility

Objects compiled with Red Hat Developer Toolset 2.1 and 3.0 in C++98 mode (the default mode) are compatible with each other, and with objects compiled with the Red Hat Enterprise Linux system compilers in C++98 mode. Objects compiled in C++11 mode (that is, with -std=c++11) are compatible with all of the above C++98 objects, but are not guaranteed to be compatible with C++11 objects compiled with a different major version of the compiler. That is, if some C++11 objects previously compiled with Red Hat Developer Toolset 2.1 are rebuilt with Red Hat Developer Toolset 3.0, all C++11 objects should be rebuilt. For the same reasons, C++11 objects built with this release of Red Hat Developer Toolset may need to be rebuilt to be compatible with objects built by future releases of Red Hat Developer Toolset or Red Hat Enterprise Linux.
C++ Compatibility Matrix

Figure 2.1. C++ Compatibility Matrix

For more information on features in this release, see the Main Features chapter in the Red Hat Developer Toolset User Guide. For a complete list of components, see the Red Hat Developer Toolset Components table.

2.3. Known Issues

gcc component, valgrind component
The devtoolset-3-gcc-debuginfo and devtoolset-3-valgrind-debuginfo packages conflict with the corresponding packages from the base Red Hat Enterprise Linux system or from other versions of Red Hat Developer Toolset. Consequently, if conflicting debuginfo packages are installed, attempts to install Red Hat Developer Toolset 3.0 can fail with a transaction check error message similar to the following examples:
file /usr/lib/debug/usr/lib64/ from install of gcc-base-debuginfo-4.8.2-16.el7.x86_64 conflicts with file from package devtoolset-3-gcc-debuginfo-4.9.0-6.2.el7.x86_64
file /usr/lib/debug/usr/lib64/ from install of gcc-debuginfo-4.8.2-16.el7.x86_64 conflicts with file from package devtoolset-3-gcc-debuginfo-4.9.0-6.2.el7.x86_64
file /usr/lib/debug/usr/lib64/ from install of gcc-debuginfo-4.8.2-16.el7.x86_64 conflicts with file from package devtoolset-3-gcc-debuginfo-4.9.0-6.2.el7.x86_64
file /usr/src/debug/valgrind-3.9.0/include/vki/vki-linux.h from install of devtoolset-3-valgrind-debuginfo-1:3.9.0-8.3.el7.x86_64 conflicts with file from package valgrind-debuginfo-1:3.9.0-6.el7.x86_64
To work around the problem, manually uninstall the conflicting debuginfo packages prior to installing Red Hat Developer Toolset 3.0.
gcc component
The devtoolset-2-libtsan-devel package from Red Hat Developer Toolset 2 conflicts with Red Hat Developer Toolset 3.0 due to a dependency on the libtsan package. Consequently, if the conflicting package is installed, an attempt to install Red Hat Developer Toolset 3.0 fails with the following error message:
Error: Package: devtoolset-2-libtsan-devel-4.8.2-15.1.el6.x86_64
Requires: libtsan = 4.8.2-15.1.el6
Removing: libtsan-4.8.2-15.1.el6.x86_64 (@<dts-2-repo>)
libtsan = 4.8.2-15.1.el6
Updated By: libtsan-4.9.1-10.el6.x86_64
libtsan = 4.9.1-10.el6
To work around this problem, uninstall the devtoolset-2-libtsan-devel package prior to installing Red Hat Developer Toolset 3.0.
Note that devtoolset-2-libtsan-devel is not a part of the devtoolset-2-toolchain metapackage or the main devtoolset-2 metapackage. To install devtoolset-2-libtsan-devel, the user needs to refer to it explicitly by name or by a wildcard. There is neither a conflict between devtoolset-2-toolchain and devtoolset-3-toolchain, nor a conflict between devtoolset-2 and devtoolset-3, so most users should not be affected by the described problem.
valgrind component
The default Valgrind gdbserver support (--vgdb=yes) can cause certain register and flags values to be not always up to date due to optimizations done by the Valgrind core. The gdb utility is therefore unable to show certain parameters or variables of programs running under Valgrind. To workaround this problem use the --vgdb=full parameter. Note that programs can run slower under Valgrind when this parameter is used.
valgrind component
valgrind must be rebuilt without Red Hat Developer Toolset's gcc installed, or it will be used in preference to Red Hat Enterprise Linux system gcc. The binaries shipped by Red Hat are build using system gcc. For any testing, Red Hat Developer Toolset's gdb should be used.
elfutils component
Rebuilding of elfutils from source is possible only using the base Red Hat Enterprise Linux toolchain. An attempt to recompile elfutils using Red Hat Developer Toolset will fail.
oprofile component
OProfile provides access to performance monitoring hardware only on physical machines. If you are using OProfile on a virtual machine guest, you need to force OProfile to use the timer mechanism with the following command:
~]$ opcontrol --deinit; modprobe oprofile timer=1
oprofile component
To allow OProfile to use the hardware performance units on Red Hat Enterprise Linux 6, you need to disable watchdog timers with the following command:
~]$ echo 0 > /proc/sys/kernel/nmi_watchdog
binutils component
Under certain circumstances, printing out information from an Executable Linking Format (ELF) file by using the eu-readelf utility fails with the following error message:
invalid CIE reference in FDE
To work around this problem, use the "-Wl,--traditional-format" option when linking the object files in the GNU Compiler Collection (GCC). Alternatively, use the "-flto -fno-fat-lto-objects" option for generating all object files.
eclipse component
Under certain circumstances, on some Red Hat Enterprise Linux 6.5 systems, the perf utility returns improperly formatted data when the report command is run to show the number of samples for each symbol (the -n option) using a particular field separator (the -t option) for columns. This problem has been addressed by a bug fix to the underlying perf utility in kernel-2.6.32-421.el6. Also, on 32-bit Intel architecture, the reported sample values are incorrect and appear to have underflown. As a consequence, the Eclipse Perf plug-in parses the data incorrectly and either does not report any samples captured, or displays them improperly.
gdb component
This release of GDB includes new implementation of dynamic types, the Variable Length Array (VLA) patches. Fortran slices and sub-matrices were implemented on top of the previous VLA implementation. This support has not been ported in time for Red Hat Developer Toolset 3.0 release of GDB. Consequently, Fortran slices and sub-matrices, for example, expressions like a(2,2:3), a(1,2:), a(:,:), or a(:), are not supported in this release although they were supported in previous Red Hat Developer Toolset releases. To work around this problem:
  • Either print the whole array a and filter slices and sub-matrices out of the text output manually or by a script.
  • Or create a new variable only for debugging purposes and assign to it the intended slice or sub-matrix in the Fortran program being debugged. This requires the program's recompilation for the next debugging session.

Other Notes

  • Red Hat Developer Toolset primarily aims to provide a compiler for development of user applications for deployment on multiple versions of Red Hat Enterprise Linux. Operating system components, kernel modules and device drivers generally correspond to a specific version of Red Hat Enterprise Linux, for which the supplied base OS compiler is recommended.
  • Red Hat Developer Toolset 3.0 supports C, C++ and Fortran development only. For other languages, please invoke the system version of GCC available on Red Hat Enterprise Linux.
  • Red Hat Developer Toolset 3.0 Valgrind contains experimental support for some AVX2 instructions.
  • Building an application with Red Hat Developer Toolset 3.0 on Red Hat Enterprise Linux (for example: Red Hat Enterprise Linux 7) and then executing that application on an earlier minor version (such as Red Hat Enterprise Linux 6.5.z) may result in runtime errors due to differences in non-toolchain components between Red Hat Enterprise Linux releases. Users are advised to check compatibility carefully. Red Hat only supports execution of an application built with Red Hat Developer Toolset on the same, or a later, supported release of Red Hat Enterprise Linux than the version used to build that application.
  • All code in the non-shared library libstdc++_nonshared.a in Red Hat Developer Toolset 3.0 is licensed under the GNU General Public License v3 with additional permissions granted under Section 7, described in the GCC Runtime Library Exception version 3.1, as published by the Free Software Foundation.
  • The compiler included in Red Hat Developer Toolset emits newer DWARF debugging records than previous compilers available on Red Hat Enterprise Linux. These new debugging records improve the debugging experience in a variety of ways, particularly for C++ and optimized code. However, certain tools are not yet capable of handling the newer DWARF debug records. To generate the older style debugging records, use the options -gdwarf-2 -gstrict-dwarf or -gdwarf-3 -gstrict-dwarf.
  • Some newer library features are statically linked into applications built with Red Hat Developer Toolset to support execution on multiple versions of Red Hat Enterprise Linux. This adds a small additional security risk as normal Red Hat Enterprise Linux errata would not change this code. If the need for developers to rebuild their applications due to such an issue arises, Red Hat will signal this via a security erratum. Developers are strongly advised not to statically link their entire application for the same reasons.
  • Note that error messages related to a missing libitm library when using the -fgnu-tm option require the libitm package to be installed. You can install the package with the following command:
    yum install libitm
  • The ccache utility can be used with GCC included in Red Hat Developer Toolset by setting your environment correctly. For example:
    ~]$ scl enable devtoolset-3 '/usr/lib64/ccache/gcc -c foo.c'
    Alternatively, you can create a shell with the Red Hat Developer Toolset version of GCC as the default compiler:
    ~]$ scl enable devtoolset-3 'bash'
    After you have created the shell, run the following two commands:
    ~]$ export PATH=/usr/lib64/ccache${PATH:+:${PATH}}
    ~]$ gcc -c foo.c
  • Because the elfutils libraries contained in Red Hat Developer Toolset 3.0 are linked to a client application statically, caution is advised when passing handles to libelf, libdw, and libasm data structures to external code and when passing handles received from external code to libelf, libdw, and libasm.
    Be especially careful when an external library, which is linked dynamically against the system version of elfutils, is passed a pointer to a structure that comes from the Red Hat Developer Toolset 3.0 version of elfutils (or vice versa).
    Generally, data structures used in the Red Hat Developer Toolset 3.0 version of elfutils are not compatible with the Red Hat Enterprise Linux system versions, and structures coming from one should never be touched by the other.
    In applications that use the Red Hat Developer Toolset 3.0 libraries, all code that was linked against the system version of the libraries should be recompiled against the libraries included in Red Hat Developer Toolset 3.0.
  • elfutils EBL, a library used internally by libdw, was amended not to open back ends dynamically. Instead, a selection of back ends is compiled in the library itself: Intel x86 (i386), AMD64 / Intel 64 (x86_64), Intel Itanium, and IBM System z. Some functionality may not be available if the client wishes to work with ELF files from architectures other than those mentioned above.
  • With the Red Hat Developer Toolset 3.0 release, you can now use Valgrind's libmpiwrap wrapper with either the openmpi package or the compat-openmpi compatibility package. When using Valgrind on Red Hat Enterprise Linux 6, specify whether you want to use the openmpi or compat-openmpi package by updating the LD_PRELOAD environment variable.
    To use the openmpi package with the libmpiwrap wrapper, update LD_PRELOAD as follows:
    LD_PRELOAD=/opt/rh/devtoolset-3/root/usr/lib64/valgrind/ /usr/lib64/openmpi/bin/mpirun valgrind ./mpi-hello
    Where mpi-hello is compiled with the appropriate mpicc compiler.
    To use the compat-openmpi package with the libmpiwrap wrapper, update LD_PRELOAD as follows:
    LD_PRELOAD=/opt/rh/devtoolset-3/root/usr/lib64/valgrind/ /usr/lib64/compat-openmpi/bin/mpirun valgrind ./mpi-hello
    Where mpi-hello is compiled with the appropriate mpicc compiler.
    To test that the above works as expected and the MPI calls are intercepted by the wrapper, set the environment variable MPIWRAP_DEBUG to verbose.
  • Some packages managed by the scl utility include privileged services that require sudo. The system sudo clears environment variables and so Red Hat Developer Toolset includes its own sudo shell script, wrapping scl enable. This script does not currently parse or pass normal sudo options, only sudo COMMAND ARGS .... In order to use the system version of sudo from within a Red Hat Developer Toolset-enabled shell, please use the /usr/bin/sudo binary.
  • Red Hat Developer Toolset 3.0 includes GCC 4.9, which adds support for Cilk+, an extension to the C and C++ languages for parallel programming. A new runtime library, libcilkrts, is included in this release to support the feature. The libcilkrts library will be a part of the gcc-libraries package in the future Red Hat Enterprise Linux releases but the package is not included in all supported Red Hat Enterprise Linux releases. To enable dynamic linkage of binaries and libraries built with Red Hat Developer Toolset 3.0 GCC using Cilk+ features on supported Red Hat Enterprise Linux releases that do not contain libcilkrts, install the shared library from Red Hat Developer Toolset 3.0 with such binaries or libraries.
  • The Eclipse OProfile plug-in in Red Hat Developer Toolset 3.0 uses the OProfile utility from this Software Collection (the devtoolset-3-oprofile packages) by default. The plug-in does not support the usage of the OProfile utility included in the base Red Hat Enterprise Linux 6.4 or Red Hat Enterprise Linux 6.5 system (the oprofile packages).
  • Intel have issued erratum HSW136 concerning TSX (Transactional Synchronization Extensions) instructions. Under certain circumstances, software using the Intel TSX instructions may result in unpredictable behavior. TSX instructions may be executed by applications built with Red Hat Developer Toolset GCC under certain conditions. These include use of GCC's experimental Transactional Memory support (-fgnu-tm) when executed on hardware with TSX instructions enabled. The users of Red Hat Developer Toolset are advised to exercise further caution when experimenting with Transaction Memory at this time, or to disable TSX instructions by applying an appropriate hardware or firmware update.
  • The Eclipse SWT graphical library on Red Hat Enterprise Linux 7 uses GTK 3.x. Eclipse Dark Theme is not yet fully stable on GTK 3.x, so this theme is considered a Technology Preview and not supported. For more information about Red Hat Technology Previews, see