I wish to test existing software with gcc 6, to ensure that it will work when the transition takes place.

  • How can I install gcc 6? Is there a ppa available?
  • Can I just do a "CC=gcc-6 make" ?

Thanks

share|improve this question
    
You can refer(askubuntu.com/questions/623350/…) though it is about gcc-5 but you can start looking in that direction. – Ashu Mar 15 '16 at 16:42
2  

Looks like there is a gcc 6 package available for Xenial Xerus in the Toolchain test builds PPA:

Publishing details

Published on 2016-09-04 

Changelog
gcc-6 (6.2.0-3ubuntu11~16.04) xenial; urgency=medium

  * Build for 16.04 LTS.

 -- Matthias Klose <email address hidden>  Sun, 04 Sep 2016 14:19:52 +0200

Install the PPA and the compiler as follows:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-6 g++-6

This installed nicely on my Xenial system:

andrew@athens:~$ gcc-6 --version | head -n 2
gcc-6 (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901
Copyright (C) 2016 Free Software Foundation, Inc.
andrew@athens:~$ 

Note that this does not make gcc 6 your default compiler and this is probably best at the moment until this most recent version matures a little...

References:

share|improve this answer
    
Awesome answer. Roughly how often does this ppa updates? GCC 6.2 has been out for over a week. Is that the timescale one should expect updates, or more like 1-1.5 months? – Meteorhead Aug 31 '16 at 7:43
    
@Meteorhead Looks like some work for the next Ubuntu release: launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/… – andrew.46 Aug 31 '16 at 22:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.