?

Log in

No account? Create an account

Previous Entry | Next Entry

November 2011 GNU Toolchain Update

Hi Guys,

  There is a lot to report this month:

  * GCC now has support for transactional memory.  It is enabled via a new command line option: -fgnu-tm, and it is currently only supported on x86 architectures.  (This may change in the future).

    The support implements and tracks the Linux variant of Intel's Transactional Memory ABI specification document.  Currently this is at revision 1.1, (May 6 2009).  For more information see:

      http://software.intel.com/en-us/articles/intel-c-stm-compiler-prototype-edition/

    This is  potentially a very important new feature.  Transactional memory support can lead to faster and less buggy multi-threaded programs, and could especially help speed up operating system kernels.

  * Two new ports have been contributed to the GCC and BINUTILS projects:

    - The Adapteva Epiphany processor.

    - The Renesas RL78 processor.
   
  * The binutils 2.22 release will be happening next week.  In the meantime development has continued on the mainline sources and in particular a change has been made to the ARM port of GAS:
   
    Previously GAS would generate the (deprecated) R_ARM_PLT32 relocation for branches and function calls that use the PLT table.  After 2.22 GAS will now generate either the R_ARM_CALL or R_ARM_JUMP24 relocations, if the target ARM architecture supports them.
   
  * A couple of new options have been added to the CPP library which can be accessed from the gcc command line:

      -fdebug-cpp    This option is for debugging GCC and the preprocessor.  It must be used with -E and it dumps debugging information about the location maps for each token in the -E output.  The information dumped is as follows:

       P:</file/path>;
       F:</includer/path>;
       L:<line_num>;
       C:<col_num>;
       S:<system_header?>;
       M:<map_address>;
       E:<macro_expansion?>,
       loc:<location>

      -ftrack-macro-expansion[=<level>]   Tracks the locations of tokens across macro expansions. This allows the compiler to emit diagnostics about the current macro expansion stack when a compilation error occurs in a macro expansion.

     Using this option makes the preprocessor and the compiler consume more memory.  The <level> parameter can be used to choose the level of precision of token location tracking thus decreasing the memory consumption if necessary.  A level of 0 de-activates the option. A level of 1 tracks tokens locations in a degraded mode for the sake of minimal memory overhead.  In this mode all tokens resulting from the expansion of an argument of a function-like macro have the same location.  A level of 2 tracks tokens locations completely. This is the default.

  * A new warning option has been added to GCC:     

     -Wzero-as-null-pointer-constant

       This issues a Warning when a literal '0' is used as null pointer constant.  This can be useful to facilitate the conversion to using nullptr in C++11.

       Personally I am really glad to see this option as it really bugs me when 0 is used instead of NULL (or nullptr or whatever).  It does work, but it rankles.  Many years ago I worked on a compiler where the NULL pointer was not equal to 0 (and in fact address 0 contained valid memory that could be used by the program).  That taught me to distinguish between 0 and NULL, and to see the two misused today just ticks me off.

  * Several new target specific options have been added as well.  Here are a few that might be of interest:

      The ARM compiler now supports -mcpu=native, -mtune=native and-march=native.  These work in a similar way to the normal  -mcpu=, -mtune= and -march= options, except that the compiler will try to auto-detect the CPU of the build machine.  At present, this feature is only supported on Linux, and not all architectures are recognised.  If the auto-detect is unsuccessful the option has no effect.

      The I386 compiler now supports "btver1" and "bdver1" as arguments to the -march= command line option.  "btver1" is for AMD Family 14h cores and "bdver1" is for AMD 15h cores.

  * The upcoming ISO C++0x standard has been renamed to ISO C++11, and so all of the g++ options that used to refer to c++0x now use c++11.  (The old names are still supported for backwards compatibility, but will not be shown in --help output, etc).

    The C++11 draft is still experimental, and may change in incompatible ways in future releases.

  * Part of the support for the ISO C++11 standard includes support for its memory models.  This has lead to the creation of a couple of new command line options:
 
      -Winvalid-memory-model      This issues a warning when an atomic memory model parameter is known to be outside the valid range.

      -finline-atomics     Inline __atomic operations when a lock free instruction sequence is available.

    Plus a new set of builtin functions with the __atomic prefix.  These are similar to the __sync prefixed builtins which already exist in GCC, but they also take a memory model parameter.

    For more information see:
   
      http://gcc.gnu.org/wiki/Atomic/GCCMM/AtomicSync,GCC wiki on atomic synchronization

Cheers
  Nick

Comments

( 1 comment — Leave a comment )
petdance
Nov. 22nd, 2011 05:21 am (UTC)
Holy crap does -Wzero-as-null-pointer-constant make me happy.

Thanks!
( 1 comment — Leave a comment )

Profile

Deep Thought
nickclifton
nickclifton

Latest Month

November 2015
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Page Summary

Powered by LiveJournal.com
Designed by chasethestars