[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] avr-gcc packages for multiple versions

From: Volker Kuhlmann
Subject: [avr-gcc-list] avr-gcc packages for multiple versions
Date: Thu, 12 Jan 2012 21:08:21 +1300

This is a far too late announcement of avr-gcc packages for gcc versions
4.3.6, 4.5.3, 4.6.2, and some version of 4.7. The main reason for this
is to be able to test newer avr-gcc versions without destroying bridges
behind. Obviously the main focus is on 4.6.2, but the other versions
popped out of the build process at little extra cost.

Every package includes:
* Vanilla gcc for avr target with no further patches applied.
* Packages for all gcc versions can be installed in parallel, and in
  parallel with the already existing avr-gcc 4.3.3 available with (or
  for) the Arduino IDE.
* A script is added called run-avr-gcc-XXX, with XXX being the 3-digit
  version number (or longer for 4.7). This prepends the compiler
  location to the PATH before running its arguments, which allows to
  simply call avr-gcc etc. from Makefiles and to switch version by
  selecting the wrapper script of choice.
* Compiled for /opt/cross/avr, but will also compile for /usr (tested)
  so things can be moved to /usr once the binutils and avr-libc can also
  be compiled for /usr (avr-gcc must stay in the same prefix as the
  binutils). The location in /opt is not convenient.

Running e.g. 
   run-avr-gcc-462 arduino
has the expected (and intended) effect of causing the Arduino IDE to use
the new compiler. No other change to the Arduino installation is

   run-avr-gcc-462 eclipse
doesn't quite work because the eclipse avr-plugin does something (not)
smart with PATH. It is possible to change a tool path in the plugin (and
a bunch of other discovery settings) to make things work, but it's not
as straightforward. I have been in contact with the plugin author and
the ball is still in my court (sorry).

Given that I've had a bit of time playing with these packages I can say:

* The code produced by 4.6.2 is always shorter than the one from 4.3.3.

* Using LTO with 4.6.2 further reduces code size, but around 1% is
almost negligible. It's possible that I need to upgrade binutils for LTO
to work properly (documentation is a bit inconclusive). So far I have
2.19.1, with an amount of patches unknown to me.

* So for I have not seen any malfunction of my avr progam(s) due to the
compiler version, so I venture to say that 4.6.2 is ready for prime
time. Thanks muchly Johann for all your work!!

The maintainer of this repository agreed to add the packages, so they
are available here:


For vastly different systems it might be necessary to recompile the
source package, which I expect to work for a lot more systems than those
for which the binary packages are made, with only minor tweaks -
probably installing the prerequisite packages.

Happy programming,


Volker Kuhlmann
http://volker.dnsalias.net/     Please do not CC list postings to me.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]