http://llvm.org/bugs/show_bug.cgi?id=8312
Summary: clang doesn't handle -M/-MF properly
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Driver
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
There's a couple problems with the handling of the -MF flag. Let's compare with
gcc 4.2:
$ gcc-4.2 hello.c -M -MF hello.d -c -o hello.o
$ file hello.d hello.o
hello.d: ASCII text
hello.o: empty
$ rm hello.d hello.o
$ clang hello.c -M -MF hello.d -c -o hello.o
clang: warning: argument unused during compilation: '-MF hello.d'
clang: warning: argument unused during compilation: '-c'
$ llvm-commit/Debug+Asserts/bin/clang hello.c -MF hello.d -o hello.o
$ file hello.d hello.o
hello.d: ERROR: cannot open `hello.d' (No such file or directory)
hello.o: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically
linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
I see two problems:
- GCC requires either -M or -MM whenever -MF is specified. Clang forbids them.
- Clang doesn't respect both -c and -M at the same time.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs