[LLVMbugs] [Bug 6936] New: clang -E -P -C -include doesn't work

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 25 02:56:55 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=6936

           Summary: clang -E -P -C -include doesn't work
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu
            Blocks: 4068


Command-line:
  clang -E -MD -MF arch/x86/kernel/acpi/realmode/.wakeup.lds.d  -nostdinc
-isystem /usr/local/bin/../lib/clang/1.0/include
-I/home/edwin/builds/linux-2.6/arch/x86/include -Iinclude  -include
include/generated/autoconf.h -D__KERNEL__   -P -C -P -C -Ux86_64 -D__ASSEMBLY__
-DLINKER_SCRIPT -o arch/x86/kernel/acpi/realmode/wakeup.lds
arch/x86/kernel/acpi/realmode/wakeup.lds.S


Output:
/*
 * Automatically generated C config: don't edit
 * Linux kernel version: 2.6.34-rc5
 * Sun Apr 25 12:54:09 2010
 */# 1 "<built-in>" 2

Which makes ld reject the linker script (# 1 is outside comment).

Small testcase:
$ touch empty.S
$ cat >foo.h <<EOF
/*
 * Automatically generated C config: don't edit
 * Linux kernel version: 2.6.34-rc5
 * Sun Apr 25 12:54:09 2010
 */
EOF

$ clang -E -P -C -include foo.h empty.S
/*
 * Automatically generated C config: don't edit
 * Linux kernel version: 2.6.34-rc5
 * Sun Apr 25 12:54:09 2010
 */# 1 "<built-in>" 2

$ gcc -E -P -C -include foo.h empty.S
/*
 * Automatically generated C config: don't edit
 * Linux kernel version: 2.6.34-rc5
 * Sun Apr 25 12:54:09 2010
 */

-- 
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