<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Clang ignores include path arguments when compiling assembly files"
href="http://llvm.org/bugs/show_bug.cgi?id=16022">16022</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang ignores include path arguments when compiling assembly files
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Driver
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>landeholm@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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: <a href="http://sourceware.org/binutils/docs-2.17/as/I.html">http://sourceware.org/binutils/docs-2.17/as/I.html</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>