There have been a lot of new developments with the GNU toolchain over the last month. Here are the highlights:
* GCC now requires a C++ compiler in order to build. This is an important step in the project to clean up the gcc internals, and make them more accessible to new programmers:
* GCC can now generate warning messages about suspicious uses of the C library memory access functions (memset, memcpy, etc) when they use the sizeof operator. Enabled via the -Wsizeof-pointer-memaccess command line option, the warning detects uses like this:
memset (ptr, 0, sizeof (ptr));
memcpy (&foo, ptr, sizeof (&foo));
This warning is also enabled by -Wall.
* The hot and cold function attributes can now also be applied to labels. Hot labels tell the compiler that the execution path following the label is more likely than any other execution path, and cold labels convey the opposite meaning. These attributes can be used in cases where __builtin_expect cannot be used, for instance with a computed goto or asm goto.
* The x86 backend of GCC now supports CPUs based on AMD Family 16h cores with x86-64 instruction set support. This includes the MOVBE, F16C, BMI, AVX, PCL_MUL, AES, SSE4.2, SSE4.1, CX16, ABM, SSE4A, SSSE3, SSE3, SSE2, SSE, MMX and 64-bit instruction set extensions. This is enabled via:
* The MIPS backend to gcc now supports a -mno-float command line option. This is equivalent to -msoft-float, but additionally asserts that the program being compiled does not perform any floating-point operations. This option is presently supported only by some bare-metal MIPS configurations, where it may select a special set of libraries that lack all floating-point support (including, for example, the floating-point printf formats).
* The 2.23 binutils branch has been created. I'll say more about what is in 2.23 when it is actually released next month.
* Support for the 64-bit ARM architecture has been accepted into the binutils sources. (Both the mainline and the 2.23 branch). GCC support has not yet been contributed to the mainline, although there is a branch where the patches are being staged (aarch64-branch).
* Linker scripts can now define hidden symbols using the HIDDEN directive, like this:
HIDDEN(_etext = .);