LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   GCC change (https://www.linuxquestions.org/questions/programming-9/gcc-change-464853/)

bandrei 07-17-2006 09:10 AM

GCC change
 
hi,

I'm trying to compile a program under gcc-2.95 instead of the gcc-3.3.5 I have.
I tried CC=gcc-2.95 but the version of the gcc doesn't change.
Anyone knows how could I compile using the 2.95?

thanks

Bandrei

Matir 07-17-2006 11:23 AM

Does your makefile use the $CC environment variable? Some may have 'gcc' hardcoded.

taylor_venable 07-17-2006 11:57 AM

Quote:

Originally Posted by Matir
Some may have 'gcc' hardcoded.

If this turns out to be the case, you can try aliasing gcc in your shell to point to the version you want to use. I think this would overcome that problem.

Also, if the program uses a ./configure script, you could try passing it a --with-gcc=/path/to/old/gcc option.

bandrei 07-18-2006 10:02 AM

In the end I used
alias gcc=gcc-2.95
and it worked well.

thanks a lot

Matir 07-18-2006 10:23 AM

Glad you got it working, and thanks for posting your solution so that it may help others in the future!


All times are GMT -5. The time now is 08:57 PM.