Closed llvmbot closed 14 years ago
Treating this as fixed, we are only missing -MG and -MQ, both of which are slightly icky, and neither of which anyone has asked for.
Looks like a separate issue; can you file as a new bug with a simple test case?
Seems there's still some issues with -MM:
GCC's output:
game_evaluator.o: game_evaluator.c bungie_net_player.h \ ../common/metaserver_common_structs.h ../common/cseries.h \ ../common/platform.h bungie_net_order.h ../room_new/games.h
clang's output:
game_evaluator.o: game_evaluator.c /bungie_net_player.h \ ../common/metaserver_common_structs.h ../common/cseries.h \ ../common/platform.h /bungie_net_order.h ../room_new/games.h
Notice how clang incorrectly starts bungie_net_player.h and bungie_net_order.h with a "/" as if those headers were at "/" (they're not - they're in the current directory and #include'd normally).
The include flags passed are: -I./ -I../common -I../utils -I../room_new
Those two headers are at "./"
it works for freebsd make depend. (tested with clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/trunk 68030M)
-M and -MM fixed here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090330/014751.html
I'm keeping this bug open, but please remove the block(s) if it works.
Incremental improvement here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090323/014748.html
Still missing -M and -MM most notably.
This is also needed for clang to work with ccache:
"/usr/lib/ccache/gcc" "-DHAVE_CONFIG_H" "-I." "-I../../../clamav-devel/libltdl" "-I.." "-DLT_CONFIG_H=
To use clang with ccache it is enough to create a symlink: sudo ln -s /usr/bin/ccache /usr/lib/ccache/clang And add /usr/lib/ccache to the PATH (before /usr/bin or /usr/local/bin).
ccache doesn't recover from the missing file errors though, so you'll need to clear the cache (ccache -C) after each attempt to use clang with ccache (otherwise it caches the result, i.e. the missing file and the error).
Yes. It seems like FreeBSD's mkdep(1) just uses -M.
I believe -M and -MM are our main missing features.
Which specific feature does freebsd require?
It seems this issue affects both FreeBSD's `make buildworld' and compilation of Perl.
Bug llvm/llvm-project#3959 has been marked as a duplicate of this bug.
Extended Description
clang is still missing various things needed for full dependency file generation support.
Change -M options to be sane and force driver to convert -M to the sane set.
Support -M, -MG, -MM, -MQ.
Some corner cases differ vs gcc. For example:
ddunbar@lordcrumb:tmp$ rm -f foo && xcc -S -MD -MF foo -m32 -o y -x c /dev/null; cat foo y.o: /dev/null ddunbar@lordcrumb:tmp$ rm -f foo && gcc -S -MD -MF foo -m32 -o y -x c /dev/null; cat foo y: /dev/null
ddunbar@lordcrumb:tmp$ rm -f foo && xcc -E -MD -MF foo -m32 -o y -x c /dev/null; cat foo cat: foo: No such file or directory ddunbar@lordcrumb:tmp$ rm -f foo && gcc -E -MD -MF foo -m32 -o y -x c /dev/null; cat foo null.o: /dev/null