nickclifton (nickclifton) wrote,
nickclifton
nickclifton

GNU Toolchain Update, April 2009

Hi Guys,

Well this has been a very active month.  The wording for the exception to the GPLv3 was finally settled with the FSF and so almost all of the remaining GPLv2 files in the GCC source tree have now been updated.  This has also meant that the gcc 4.4 branch now generated a full release (see http://gcc.gnu.org/gcc-4.4) and that the mainline is once again open for all kinds of new features, enhancements and patches.

Perhaps the most interesting of these new features is the recently added support for adding plugins to gcc.  Enabled with the command line option:

    -fplugin=<name>

 Which loads the file <name>.so into gcc, and assuming that it conforms to the Plugin API, then arguments can be passed to it via:

    -fplugin-arg-<name>-<key>=<value>.

The plugin has access to all of the internals of GCC and can do pretty much whatever it wants.  Which makes it potentially quite dangerous, but also very useful for developers who want to add functionality without changing the code of gcc itself.  For more information see:

     http://gcc.gnu.org/wiki/plugins

    
Other new features that have been added to the mainline gcc code  include:
 
    * Support for the Intel Atom processor.

    * The "--save-temps" command line switch has been extended so that
       it has a variant called "--save-temps=obj".  What this does is
       to place the saved temporary files into the directory component
       of the path name specified for the "-o" command line option.

       The reason for this is to cope with the situation where multiple
       instances of gcc are being run concurrently with similarly named
       source files.  For example:

         gcc --save-temps -o outdir1/foo.o indir1/foo.c &
         gcc --save-temps -o outdir2/foo.o indir2/foo.c &

       With the normal version of the --save-temps option the temporary
       files from both compilations (foo.i and foo.s) will be placed
       into the current directory, overwriting each other.  But with:

         gcc --save-temps=obj -o outdir1/foo.o indir1/foo.c &
         gcc --save-temps=obj -o outdir2/foo.o indir2/foo.c &
     
       The temporary files from the first compilation will be placed
       into the outdir1 directory and the temporary files from the
       second compilation will be placed into the outdir2 directory.


    * A new command line option "-fexcess-precision=<style>" has been
      added which allows control over the excess precision on machines
      where floating-point registers have more precision than the IEEE
      float and double types and the processor does not support
      operations rounding to those types.  By default:
     
        -fexcess-precision=fast
   
      is in effect; this means that operations are carried out in the
      precision of the registers and that it is unpredictable when
      rounding to the types specified in the source code takes place.
      When compiling C, if:

        -fexcess-precision=standard

      is specified then excess precision will follow the rules
      specified in ISO C99; in particular, both casts and assignments
      cause values to be rounded to their semantic types (whereas
      "-ffloat-store" only affects assignments).


 Meanwhile in binutils land a few new features have been added.  Anthony Green has contributed a port to a new processor (moxie).  See:
 
    http://moxielogic.org/blog

for more information.

The linker has a new command line option:

    --warn-alternate-em

 which will make it produce a warning message if it detects an ELF binary containing an unexpected number in the e_machine field of the ELF header.  These alternate values, as they are known, usually indicate an out of date binary that may not conform to the latest ABI for the particular processor concerned.

That's it for now, but expect more changes, especially in the compiler, over the coming months.

Cheers
  Nick
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 0 comments