LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   difference between "CC" and "CROSS_COMPILE" in Makefile (https://www.linuxquestions.org/questions/linux-newbie-8/difference-between-cc-and-cross_compile-in-makefile-4175481474/)

georgewhr 10-20-2013 03:36 AM

difference between "CC" and "CROSS_COMPILE" in Makefile
 
When I cross-compile arm Linux kernel,sometimes I do"make ARCH=arm CC=arm-linux-gcc" and it works, but sometimes I have to do "make ARCH=arm CROSS_COMPILE=arm-linux-". So just wonder whats the difference between them

pan64 10-21-2013 01:40 AM

CC is used to define the c compiler itself. CROSS_COMPILE looks like a prefix for me. So sometimes you can use CC=$(CROSS_COMPILE)gcc - or find it inside the makefile.
In general CROSS_COMPILE is more generic and should be used instead of the other one.


All times are GMT -5. The time now is 06:31 AM.