LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   how to specify the compiler when configure? (https://www.linuxquestions.org/questions/ubuntu-63/how-to-specify-the-compiler-when-configure-407388/)

baosheng 01-24-2006 09:27 AM

how to specify the compiler when configure?
 
after I runned
apt-get install gcc
the default version of gcc is 4.0

then i typed
apt-get install gcc-3.4
to install gcc 3.4

Coz the gcc 4.0 can miscompile many code, I want to specify the compiler as gcc3.4
how can I do when compile?

thanks

Matir 01-24-2006 10:52 AM

Most programs will honor the CC environmental variable as pointing to the C Compiler. So, for example, if your gcc-3.4 is /usr/bin/gcc-3.4 (don't know if it is), do:
Code:

CC=/usr/bin/gcc-3.4 make


All times are GMT -5. The time now is 12:47 AM.