-
-
Save qrealka/34b5e1aeb92d1bb0c54c5d54fad8a993 to your computer and use it in GitHub Desktop.
My compiler alternatives
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Cleanup old alternatives | |
| update-alternatives --remove-all gcc | |
| update-alternatives --remove-all g++ | |
| update-alternatives --remove-all cc | |
| update-alternatives --remove-all c++ | |
| # Add GCC versions | |
| update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 10 | |
| update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20 | |
| update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++4.9 10 | |
| update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20 | |
| # Add Clang versions | |
| update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.7 10 | |
| update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 20 | |
| update-alternatives --install /usr/bin/clang clang /usr/bin/clang-4.0 30 | |
| update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.7 10 | |
| update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 20 | |
| update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-4.0 30 | |
| # Add compilers | |
| update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 | |
| update-alternatives --install /usr/bin/cc cc /usr/bin/clang 40 | |
| update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 | |
| update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| update-alternatives --set cc /usr/bin/gcc | |
| update-alternatives --set c++ /usr/bin/g++ | |
| update-alternatives --set cc /usr/bin/clang | |
| update-alternatives --set c++ /usr/bin/clang++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # GCC | |
| update-alternatives --set gcc /usr/bin/gcc-4.9 | |
| update-alternatives --set g++ /usr/bin/g++-4.9 | |
| update-alternatives --set gcc /usr/bin/gcc-5 | |
| update-alternatives --set g++ /usr/bin/g++-5 | |
| # Clang | |
| update-alternatives --set clang /usr/bin/clang-4.0 | |
| update-alternatives --set clang++ /usr/bin/clang++-4.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment