<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"> Hello£¬<br><br>What option should be added in the clang command to compile linux device driver£¨from .c to .bc£©?<br>Typically we need a makefile to compile a module. But I just want a simple command line.<br><br>I tried <b>"clang -O3 -emit-llvm hello.c -c -o hello.bc "</b> but  errors occurred saying<br>fatal error: 'linux/init.h' file not found<br>#include <linux/init.h><br>         ^<br>1 error generated<br>Then I was taught to add -D or -I option so that clang can find the linux kernel head file. But I still dont know <br>how exactly the command like......All I want to know is a clang command line that can compile a helloworldmodule.c into helloworldmodule.bc.<br><br>Please give me some suggestion. <br>Any help would be appreciated!<br><br><div>--<br><div>
<div>
<div><font color="#c0c0c0" size="2">
<div><font color="#c0c0c0"><font size="3">  <span style="COLOR: #000000">          ×£ºÃ£¡</span></font></font></div><span style="COLOR: #000000">
<div> </div>
<div><font size="3">  Õç¿­</font></div>
<div>
<div><font color="#c0c0c0"><font size="3">------------------------------------------------------------------------------------------------------</font></font></div></div>
<div><font color="#c0c0c0"><font size="3">2012-04-12</font></font></div></span></font></div>
<div><font color="#c0c0c0"><font size="3">------------------------------------------------------------------------------------------------------</font></font></div>
<div><font color="#c0c0c0"><font size="3">Name: Õç¿­(ZhenKai)<br>Homepage:http://www.renren.com/262729393</font></font></div>
<div><font color="#c0c0c0"><font size="3">Email: </font><a href="mailto:zhenkaixd@126.com" target="_blank" _listener="1901"><font color="#0066cc" size="3">zhenkaixd@126.com</font></a><font size="3"> or <a href="mailto:846227103@qq.com">846227103@qq.com</a></font></font></div>
<div><font color="#c0c0c0" size="3">TEL: 15810729006(Beijing)<br>Address: Room I-406, Central Building, Tsinghua University, Beijing, China. 100084.</font></div></div></div></div></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>