# Use latest gcc for builds



## 00negative (Jul 25, 2011)

I have looked for a while and not found a write up on how to setup and use the latest GCC for a build. Can anyone point me in the right direction?

I am building in Fedora 17 and have successfully compiled both from aosp source and cyanogen 10.1 source for the toro device so I have a current setup that I know works just trying to expand my knowledge.


----------



## JBirdVegas (Jun 11, 2011)

Have you ran into issues before?

I don't know about Fedora but apt-get will allow you to downgrade if needed.

I'm pretty sure mine is up to date with the stable branch. I can build without any problems. What version are you trying to use? What do you have?


----------



## 00negative (Jul 25, 2011)

JBirdVegas said:


> Have you ran into issues before?
> 
> I don't know about Fedora but apt-get will allow you to downgrade if needed.
> 
> I'm pretty sure mine is up to date with the stable branch. I can build without any problems. What version are you trying to use? What do you have?


Maybe I am just confused it has been compiling fine but if I run gcc -v in Fedora it says I have 4.7.2 but the kernel that it compiles with the ROM says it uses 4.6.x if I check it in the phone settings after I install the ROM. Do I have to do something special to compile the kernel with the newer GCC version?


----------



## marcusant (Jan 19, 2012)

JBirdVegas said:


> Maybe I am just confused it has been compiling fine but if I run gcc -v in Fedora it says I have 4.7.2 but the kernel that it compiles with the ROM says it uses 4.6.x if I check it in the phone settings after I install the ROM. Do I have to do something special to compile the kernel with the newer GCC version?


The ROM compiles using the GCC included with AOSP that is intended for use with Android compiling. I would just stick to it.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## 00negative (Jul 25, 2011)

marcusant said:


> Fedora uses yum. Google how to downgrade via yum
> 
> Sent from my Galaxy Nexus using Tapatalk 2
> 
> ...


I don't need to downgrade my builds are working currently.

As far as sticking with what it uses how does that answer my question or help me learn anything new? Doesn't explain to me where it's calling for it or how to change it if I wanted to?


----------



## marcusant (Jan 19, 2012)

00negative said:


> I don't need to downgrade my builds are working currently.
> 
> As far as sticking with what it uses how does that answer my question or help me learn anything new? Doesn't explain to me where it's calling for it or how to change it if I wanted to?


AOSP directory/prebuilt

I'm pretty sure the newer GCCs need some patches to the ROM to make them compile correctly

Sent from my Galaxy Nexus using Tapatalk 2


----------

