[LLVMbugs] [Bug 8312] New: clang doesn't handle -M/-MF properly
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Oct 6 00:29:40 PDT 2010
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: unassignedclangbugs at nondot.org
ReportedBy: nicholas at mxc.ca
CC: llvmbugs at cs.uiuc.edu, daniel at zuster.org
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.
More information about the llvm-bugs
mailing list