But compiling, with the new version, programs which use libraries compiled with the old version is likely to give errors.
This means that the link with the highest priority will become the default.
Ubuntu does not typically release new toolchains for their stable versions, instead newer toolchains are made available in a PPA (Personal Package Archive) “https://launchpad.net/~ubuntu-toolchain-r/ archive/test“ to use the repository we can use the $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 60 --slave /usr/bin/g g /usr/bin/g -4.7 $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g g /usr/bin/g -4.6 As a default when we install new alternatives they are added to a group (in this case gcc) in automatic mode.
Rather than cross my fingers and hope it doesnt blow up again, I thought I would ask if anyone knows how to correctly update the toolchain.
I can't answer your question wrt how to update from GCC 4.8 to 4.9.
(GCC 4.5.3-4 is also offered in the gcc4 package, but the Cygwin 1.7.x devel area does not offer GCC 4.6 or later).
This article describes how to upgrade your Cygwin GCC installation to a more recent version (e.g., 4.6.1).
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
sudo update-alternatives --remove gcc /usr/bin/gcc-4.6 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 60 --slave /usr/bin/g g /usr/bin/g -4.7 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g g /usr/bin/g -4.6sudo update-alternatives --config gcc There are 2 choices for the alternative gcc (providing /usr/bin/gcc) Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/gcc-4.7 60 auto mode 1 /usr/bin/gcc-4.6 40 manual mode 2 /usr/bin/gcc-4.7 60 manual mode Press enter to keep the current choice[*], or type selection number: 0gcc --version gcc (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc.