[LLVMbugs] [Bug 16022] New: Clang ignores include path arguments when compiling assembly files

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 15 17:24:07 PDT 2013


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

            Bug ID: 16022
           Summary: Clang ignores include path arguments when compiling
                    assembly files
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: landeholm at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I am using the llvm/clang trunk from last week.

To reproduce:

    mkdir /tmp/test
    cd /tmp/test
    mkdir baz
    echo -e "\n" > baz/bar.s
    echo -e ".include \"bar.s\"\n.global main\nmain: hlt\n" > foo.s


GCC has no problem following the .include and successfully creates a "working"
binary:

    gcc foo.s -I/tmp/test/baz -o a.out
    ./a.out
  Segmentation fault (core dumped)


Clang on the other hand fails miserably to understand the -I argument:

    clang foo.s -I/tmp/test/baz -o a.out
clang-3.4: warning: argument unused during compilation: '-I /tmp/test/baz'
foo.s:1:10: error: Could not find include file 'bar.s'
.include "bar.s"


Unfortunately this makes clang useless when compiling assembly code with
.include statements.

Also see specification here: http://sourceware.org/binutils/docs-2.17/as/I.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130516/083a0ee7/attachment.html>


More information about the llvm-bugs mailing list