<div class="gmail_quote">On Fri, Jun 8, 2012 at 8:05 PM, Tom Stellard <span dir="ltr"><<a href="mailto:thomas.stellard@amd.com" target="_blank">thomas.stellard@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>On Fri, Jun 08, 2012 at 01:06:20PM +0700, Chatsiri Ratana wrote:<br>
> Hello All,<br>
><br>
> I'm compile example file extension name .cl with Clang in order to check<br>
> the Libclc can using with the Clang, but represent error as below.  That<br>
> comand line copy from file name compile-test.sh in openclc project and add<br>
> file <a href="http://cos.cl" target="_blank">cos.cl</a> for compiling in suffix of command line.<br>
><br>
> [chatsiri@maeka libclc]$ clang -ccc-host-triple nvptx--nvidiacl<br>
> -Iptx-nvidiacl/include -Igeneric/include -Xclang -mlink-bitcode-file<br>
> -Xclang nvptx--nvidiacl/lib/builtins.bc -include clc/clc.h test/<a href="http://cos.cl" target="_blank">cos.cl</a><br>
> In file included from <built-in>:127:<br>
> In file included from <command line>:1:<br>
> generic/include/clc/clc.h:2:2: error: Implementation requires<br>
> cl_clang_storage_class_specifiers extension!<br>
> #error Implementation requires cl_clang_storage_class_specifiers extension!<br>
>  ^<br>
> 1 error generated.<br>
><br>
<br>
</div></div>You need to to define cl_clang_storage_class_specifiers when compiling<br>
your code.  Try adding -Dcl_clang_storage_class_specifiers to your<br>
compile flags.<br></blockquote><div> </div><div>Hello Tom,</div><div>   </div><div>   I try to compile source code in test directory of libclc project, but source code cannot compile with flag "
<b style="font-family:'Bitstream Vera Sans Mono','Courier New',monospace;font-size:12px;line-height:16px;white-space:pre-wrap">-ccc-host-triple nvptx--nvidiacl</b><span style="line-height:16px;text-align:left;font-size:12px;white-space:pre-wrap;font-family:'Bitstream Vera Sans Mono','Courier New',monospace">". See result below</span></div>
<div><span style="line-height:16px;text-align:left;font-size:12px;white-space:pre-wrap;font-family:'Bitstream Vera Sans Mono','Courier New',monospace"><br></span></div><div><font face="Bitstream Vera Sans Mono, Courier New, monospace"><span style="font-size:12px;line-height:16px;white-space:pre-wrap"><b>$ clang -ccc-host-triple nvptx--nvidiacl  -Iptx-nvidiacl/include -Igeneric/include -Xclang -mlink-bitcode-file -Xclang nvptx--nvidiacl/lib/builtins.bc -include clc/clc.h -Dcl_clang_storage_class_specifiers test/<a href="http://fabs.cl">fabs.cl</a> -S -o fabs.ptx
error: unable to create target: 'No available targets are compatible with this triple, see -version for the available targets.'
1 error generated.</b></span></font></div><div><b style="font-size:12px;line-height:16px;white-space:pre-wrap;font-family:'Bitstream Vera Sans Mono','Courier New',monospace"><br></b></div><div><b style="font-size:12px;line-height:16px;white-space:pre-wrap;font-family:'Bitstream Vera Sans Mono','Courier New',monospace">I check clang version in order to change target for compile code agains.</b></div>
<div><font face="Bitstream Vera Sans Mono, Courier New, monospace"><span style="font-size:12px;line-height:16px;white-space:pre-wrap"><b>
$ clang --version
clang version 3.2 (trunk 158000)
Target: x86_64-unknown-linux-gnu
Thread model: posix</b></span></font></div><div style="text-align:left"><font face="Bitstream Vera Sans Mono, Courier New, monospace"><span style="font-size:12px;line-height:16px;white-space:pre-wrap"><b> </b></span></font></div>
</div><div><div style="text-align:left"><span style="line-height:16px;font-size:12px;white-space:pre-wrap;font-family:'Bitstream Vera Sans Mono','Courier New',monospace">The command line specify the target architecture with "</span><b style="font-family:'Bitstream Vera Sans Mono','Courier New',monospace;font-size:12px;line-height:16px;white-space:pre-wrap">x86_64-unknown-linux-gnu" </b><span style="line-height:16px;font-size:12px;white-space:pre-wrap;font-family:'Bitstream Vera Sans Mono','Courier New',monospace">for creating backend code "</span><span style="background-color:rgb(255,255,255);font-family:'Bitstream Vera Sans Mono','Courier New',monospace;font-size:12px;line-height:16px;white-space:pre">fabs.ptx". Why clang throws an error? See on link here [</span><a href="https://gist.github.com/2916095" target="_blank">https://gist.github.com/2916095</a>].</div>
<div><br></div><div>Best Regards,</div><div>Chatsiri Rattana.</div>
<div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-Tom<br>
<br>
<br>
> Best Regards,<br>
> Chatsiri Rattana<br>
<br>
> _______________________________________________<br>
> Libclc-dev mailing list<br>
> <a href="mailto:Libclc-dev@pcc.me.uk" target="_blank">Libclc-dev@pcc.me.uk</a><br>
> <a href="http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev" target="_blank">http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev</a><br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>:--------------------------------------------------------<br><a href="http://about.me/chatsiri.ratana" target="_blank">http://about.me/chatsiri.ratana</a><br>