Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run make command by using specific gcc compiler?

Tags:

c++

makefile

I have to run make command using specific version gcc compiler (using gcc-4.1 because after that versions will give deprecated method warnings or errors).. Now, there are several versions of gcc installed in the server. Can anybody help, how can I run it (make command) to a specific version gcc compiler (means on gcc-4.1).

like image 872
Arpssss Avatar asked Oct 26 '25 15:10

Arpssss


1 Answers

You can do:

CC=gcc-4.1 make

That will fill the $(CC) variable of your make. Also, you can write:

make CC=gcc-4.1
like image 145
Diego Sevilla Avatar answered Oct 29 '25 06:10

Diego Sevilla



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!