gcc 4?

Tim Frost timfrost at xtra.co.nz
Wed Nov 23 03:09:20 UTC 2005


On Tue, 2005-11-22 at 21:01 -0500, 'Forum Post wrote:
> same here. but for compiling modules to work with the default ubuntu
> kernel, is there a better way to switch the default compiler from
> gcc-4.0 to gcc-3.4 than simply exporting CC=gcc-3.4?
> 

No.  The use of shell variables is the standard way to tell the Unix
make program to use a particular compiler.  It applies for *all* Unix
variants.

However, there are two ways to do it:
1: export the variable then run the build:
     export CC=gcc-3.4
     make

2: A single line, which sets CC for just the make command:
     CC=gcc-3.4 make


Method 1 leaves the variable set for all commands run from the same
shell, until you change it or exit the shell.



Tim





More information about the ubuntu-users mailing list