We got the problem, the bug is in icecc, not in gcc. The problem is that icecc consumes "-o x/y.o". original command: gcc -c -MD x/y.c -o x/y.o preprocess locally: gcc -E -MD x/y.c --> It generates y.d into the current directory.