I probably dont have icecc configured correctly but the behavior seems inconsistent depending on if i compile with 'arm-linux-gnueabihf-gcc' or 'arm-linux-gnueabihf-gcc-4.9'.
I have created symlinks in /usr/local/icecream:
@jetson1:~$ ls -l /usr/local/icecream
total 29384
lrwxrwxrwx 1 root root 14 Aug 4 18:06 arm-linux-gnueabihf-g++ -> /usr/bin/icecc
lrwxrwxrwx 1 root root 14 Aug 7 16:09 arm-linux-gnueabihf-g++-4.9 -> /usr/bin/icecc
lrwxrwxrwx 1 root root 14 Aug 4 18:06 arm-linux-gnueabihf-gcc -> /usr/bin/icecc
lrwxrwxrwx 1 root root 14 Aug 7 16:10 arm-linux-gnueabihf-gcc-4.9 -> /usr/bin/icecc
lrwxrwxrwx 1 root root 14 Aug 4 16:51 g++ -> /usr/bin/icecc
lrwxrwxrwx 1 root root 14 Aug 4 16:51 gcc -> /usr/bin/icecc
And I have this on the path:
@jetson1:~$ echo $PATH
/usr/local/icecream:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
But the behavior is different depending on how I call the compiler:
@jetson1:~$ /usr/local/icecream/gcc --version
gcc (Ubuntu/Linaro 4.9.2-0ubuntu1~14.04) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@jetson1:~$ /usr/local/icecream/arm-linux-gnueabihf-gcc --version
arm-linux-gnueabihf-gcc (Ubuntu/Linaro 4.9.2-0ubuntu1~14.04) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@jetson1:~$ /usr/local/icecream/arm-linux-gnueabihf-gcc-4.9 --version
ICECC[28899] 16:51:11: icecream seems to have invoked itself recursively!
I've verified that arm-linux-gnueabihf-gcc-4.9 is in /usr/bin so is on the path after /usr/local/icecream:
@jetson1:~$ ls -l /usr/bin | grep gcc-4.9
lrwxrwxrwx 1 root root 7 Apr 7 2014 arm-linux-gnueabihf-gcc -> gcc-4.9
lrwxrwxrwx 1 root root 7 Nov 4 2014 arm-linux-gnueabihf-gcc-4.9 -> gcc-4.9
-rwxr-xr-x 1 root root 552736 Nov 4 2014 gcc-4.9
The system is ubuntu14.04 with icc version 1.0.1 (this is on an intel jetson dev board).
Does anyone know if this is expected behavior, or the details of how icecc figures out the 'real' compiler?
The issue does not seem to be present if I call simply 'arm-linux-gnueabihf-gcc-4.9' from the shell:
@jetson1:~$ which arm-linux-gnueabihf-gcc-4.9
/usr/local/icecream/arm-linux-gnueabihf-gcc-4.9
@jetson1:~$ arm-linux-gnueabihf-gcc-4.9 --version
arm-linux-gnueabihf-gcc-4.9 (Ubuntu/Linaro 4.9.2-0ubuntu1~14.04) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@jetson1:~$ $(which arm-linux-gnueabihf-gcc-4.9) --version
ICECC[28912] 16:54:38: icecream seems to have invoked itself recursively!
This is causing some issues in a cmake based project because it seems that cmake tries to use the full path of the compiler. If I specify 'CC=arm-linux-gnueabihf-gcc-4.9 cmake ... ' then what shows up in CMakeCache.txt is '/usr/local/icecream/arm-linux-gnueabihf-gcc-4.9'.