You have two options to use new version of gcc on SCC:
1) You should be able to build a custom linux that has new version of gcc, or using sccKit 126.96.36.199 which uses buildroot 2011.11 and comes with kernel 3.1.4 that its default cross-gcc seems to be gcc-4.4.6.
2) You could generate a new version of gcc by using crosstool-ng.
Hopefully, this reply help you.
First of all, you need to install Crosstool-ng, and you could download from this website:
You could tracking those instructions which found in this tutorials to understand how to build cross-compiler:
Other way, I attached the configuration file (I got it from Isaías and modified it) for crosstool-ng 1.11.3, that will build a 4.4.6 toolchain with C/C++ and fortran. It works and you could just download it and copy the contents of file and place it in the .config file under your crosstool-ng working directory and instruct crosstool-ng to build the compiler by using ./ct-ng build.
BTY, the .config file is already existing in crosstool directory, just you need modified it.
Do not hesitate to ask more questions.
CCgcc-4.4.6.config.rtf 9.2 K
Thanks again for your very helpful post. I was able to run crosstool-ng and generate a new 4.4.6 gcc. However, I run into the peculiar problem of gcc not being able to locate the libraries and supporting programs it generated. When I type './gcc -print-search-dirs', the listed search directories include the generated library directories from crosstool-ng. However, it still seems unable to find these files. To test, when I run gcc on a Hello World program hello.c, I get the error:
gcc: error trying to exec 'cc1': execvp: No such file or directory
even though cc1 is reported as being searched for by gcc with that previous command. When I do a gcc hello.c -v, it does not show that it's looking for includes in the right directories. Strangely enough, adding the location to PATH doesn't help either.
Is there an easy or proper way to get the location associations right, or do I have to do everything manually?
I don't know exactly why you got at this error, but I think there is mistake when you use this compiler.
If you could posting the procedure of compile your code and the message error.
Any way, I attached picture that contained the procedure of test the compiler and you could follow it and check your code.
1. Add your new compiler to your Path by using:
export PATH=$PATH:/(directory of cross compiler)/build/install/i586-unknown-linux-gnu/bin
2. To be sure the compiler in your Path:
3. to compile your code use i586-unknown-linux-gnu-gcc or i586-unknown-linux-gnu-g++
4. You could also find in attached file the output of run hello world program.
BTY, the program run in MCPC and SCC.
Thanks for the reply, but I figured it out! I was simply using the wrong binary, located a deep build directory in crosstool-ng. I now realize that I'm supposed to use i586-unknown-linux-gnu-gcc. Everything works perfectly now.
Thanks for all of your help! I'll let you know if I have more questions.
just as an addition, I posted a HOWTO on building gcc 4.6.1 as part of the sccKit build process here: (Bug #436, Comment #30): http://marcbug.scc-dc.com/bugzilla3/show_bug.cgi?id=436#c30