Introduction
The GNU Toolchain is a collection of programming tools produced by the GNU Project. The tools are often packaged together due to their common use for developing software applications, operating systems, and low level software for embedded systems.
This blog is part of a regular series covering the latest changes and improvements in the components that make up this Toolchain. Apart from the announcement of new releases however, the features described here are at the very bleeding edge of software development in the tools. This does mean that it may be a while before they make it into production releases, although interested parties can always build their own copies of the toolchain in order to try them out.
New Releases:
GDB 7.11
Diving right in, this release brings many new features and enhancements to the debugger, including:
- Per-inferior thread numbers. (Thread numbers are now per inferior instead of being global).
- Users can specify breakpoint locations using a more explicit syntax (named "explicit location").
- When hitting a breakpoint or receiving a signal while debugging a multi-threaded program, the debugger now shows which thread triggered the event.
- Record btrace now supports non-stop mode.
- Various improvements on AArch64 GNU/Linux:
- Multi-architecture debugging support.
- Displaced stepping.
- Tracepoint support added in GDBserver.
- Kernel-based threads support on FreeBSD.
GLIBC 2.23
Not to be outdone the GLIBC team have also announced a major new release of the GNU C Library. Full details can be found in the archived mail annoucncement.
But if you don't feel like reading everything, here are some highlights:
- Unicode 8.0.0 Support
- getaddrinfo now detects certain invalid responses on an internal netlink socket.
- A defect in the malloc implementation could result in the unnecessary serialization of memory allocation requests across threads. The defect is now corrected. Users should see a substantial increase in the concurrent throughput of allocation requests for applications which used to trigger this bug. Affected applications typically create and destroy threads
frequently. - There is now a --disable-timezone-tools configure option for disabling the building and installing of the timezone related utilities (zic, zdump, and tzselect).
- The obsolete header <regexp.h> has been removed. Programs that require this header must be updated to use <regex.h> instead.
- Optimized string, wcsmbs and memory functions for IBM z13.
New features:
Compiler
In GCC-land, work on getting the code ready for the GCC 6 branch continues at a furious pace. Some new features have made it in over the last couple of months, however. Here are the details:
- Initial support for the C++ Extensions for Concepts Technical Specification, ISO 19217 (2015), has been added to G++. This allows code like this:
template <class T> concept bool Addable = requires (T t) { t + t; };
template <Addable T> T add (T a, T b) { return a + b; }
- The new GCC warning option -Wnonnull-compare can be used to generate a warning when comparing a variable with the nonnull attribute against null.
- The -Wunused-const-variable option has been extended. A setting of -Wunused-const-variable=1 only generates warnings about unused static const variables in the main compilation unit, and not in headers. A setting of -Wunused-const-variable=2 also warns about unused static const variables in non-system header files. This second setting corresponds to the old -Wunused-const-variable behaviour but it must now be explicitly requested since in C++ it is not an error and in C it might be hard to clean up all headers involved.
- The -fshort-double command line option has now been deprecated.
- The ARC backend of GCC now supports a -mfpu= command line option to select the type of floating point operations that can be used.
- A GCC enhancement was made a while ago, but I totally failed to report on it. Fortunately reader David Wolfherd pointed this out to me, so here is the news:
The inline assembler feature in GCC now has the ability to specify the flags set in the condition code register as part of the output of the asm. This helps the compiler as it can now use that information to improve the code that it generates after the inline asm.
For more details see: https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#FlagOutputOperands and: http://developers.redhat.com/blog/2016/02/25/new-asm-flags-feature-for-x86-in-gcc-6/
Linker & Assembler
There are also some changes to report in the binutils:
- The binutils for ELF based targets can now handle commons as either the STT_COMMON or STT_OBJECT type. A configure time option can select the default, and command line options to ld, gas and objcopy can be used to specify exactly which type should be used.
- The LD linker now supports a couple of new features:
- The command line option -z noreloc-overflow in the x86-64 ELF linker to disable relocation overflow check.
- The command line options -z nodynamic-undefined-weak in the x86 ELF linker can be used to avoid generating dynamic relocations against undefined weak symbols in executable.
- The GAS assembler can now set ELF section flags and types via numeric values. This allows extra or unusual bits in these fields to be set.
- GAS for x86 targets now also supports a command line option of -mfence-as-lock-add=yes which encodes the lfence, mfence and sfence opcodes as lock addl $0x0, (%[re]sp).
- The ARC port of GAS now supports assembly-time relaxation.
Newlib C library
Last but not least, there is a new feature in newlib as well:
- Newlib now supports the clog10 and clog10f math functions.
Closing Notes
That's it for this report... back in two months time. Meanwhile, I have a minor plug: some other Red Hat developers have written blogs about new features that will be in the upcoming GCC 6 release. So if you are interested in what will happen, please see:
http://developers.redhat.com/blog/2016/02/23/upcoming-features-in-gcc-6/
and:
http://developers.redhat.com/blog/2016/02/26/gcc-6-wmisleading-indentation-vs-goto-fail/
Last updated: September 19, 2023