Wednesday, December 28, 2011

Toolchains

When trying to work with compiling big projects, sooner or later you will need to have multiple versions of C++ /GCC etc utilities.

One way to do this is :


update-alternatives --remove-all gcc
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 44
--slave /usr/bin/g++ g++ /usr/bin/g++-4.4
--slave /usr/bin/gcov gcov /usr/bin/gcov-4.4
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 46
--slave /usr/bin/g++ g++ /usr/bin/g++-4.6
--slave /usr/bin/gcov gcov /usr/bin/gcov-4.6

And then choose which GCC you want to use like this: update-alternatives --config gcc

No comments:

Post a Comment