<div dir="ltr"><div><span style="font-size:12.8px">As --version output, your native target triple is:  x86_64-unknown-linux-gnu, & for cross-compilation need to check the build make file settings.</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">try with </span><span style="font-size:12.8px">x86_64-unknown-linux-gnu, for linux-X86 target.</span></div><div><span style="font-size:12.8px"><br></span></div><div><div><span style="font-size:12.8px"><b>This is related to llvm 3.9.0,</b></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">  if (LLVM_NATIVE_ARCH MATCHES "i[2-6]86")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH X86)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH STREQUAL "x86")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH X86)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH STREQUAL "amd64")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH X86)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH STREQUAL "x86_64")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH X86)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "sparc")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH Sparc)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "powerpc")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH PowerPC)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "aarch64")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH AArch64)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "arm64")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH AArch64)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "arm")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH ARM)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "mips")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH Mips)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "xcore")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH XCore)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "msp430")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH MSP430)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "hexagon")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH Hexagon)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "s390x")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH SystemZ)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "wasm32")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH WebAssembly)</span></div><div><span style="font-size:12.8px">elseif (LLVM_NATIVE_ARCH MATCHES "wasm64")</span></div><div><span style="font-size:12.8px">  set(LLVM_NATIVE_ARCH WebAssembly)</span></div><div><span style="font-size:12.8px">else ()</span></div><div><span style="font-size:12.8px">  message(FATAL_ERROR "Unknown architecture ${LLVM_NATIVE_ARCH}")</span></div><div><span style="font-size:12.8px">endif ()</span></div><div><span style="font-size:12.8px"><br></span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 15, 2016 at 12:07 AM, Rail Shafigulin via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 12, 2016 at 2:38 PM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On 12 March 2016 at 11:51, Rail Shafigulin via llvm-dev<br>
<span><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> I tried every possible combination of --target I could think of but nothing<br>
> worked. Would you mind helping me out?<br>
<br>
</span>First, 64-bit x86 is "x86_64", and 32-bit is "i386" in the triple. For<br>
ARM you'd probably want "thumbv8" or "aarch64". Also, "eabi" is only a<br>
thing on ARM targets, try "gnu" for x86.<br>
<br>
Cheers.<br>
<span><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><div class="gmail_extra"><br></div>Hi Tim.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks for the response. I tried the x86 suggestion but it didn't work. Clearly I'm doing something wrong, but I don't know what exactly. I would really appreciate your help in this. Here is the command line I'm using</div><div class="gmail_extra"><br></div><div class="gmail_extra">clang -S test.c -o test.sse2.x86_64.s --target=x86_64-pc-linux-gnu -mfloat-abi=hard -mcpu=k8 -mfpu=SSE2 -fslp-vectorize-aggressive -fslp-vectorize-aggressive -fslp-vectorize -fvectorize -fno-lax-vector-conversions -O3</div><div class="gmail_extra"><br></div><div class="gmail_extra">Here is the response that I get:</div><div class="gmail_extra"><br><div class="gmail_extra">clang-3.5: warning: argument unused during compilation: '-mfloat-abi=hard'</div><div class="gmail_extra">clang-3.5: warning: argument unused during compilation: '-mcpu=k8'</div><div class="gmail_extra">clang-3.5: warning: argument unused during compilation: '-mfpu=SSE2'</div><div class="gmail_extra">error: unable to create target: 'No available targets are compatible with this triple, see -version for the available targets.'</div><div class="gmail_extra"><br></div><div class="gmail_extra">clang --version command produces the following result:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">clang version 3.5.0 </div><div class="gmail_extra">Target: x86_64-unknown-linux-gnu</div><div class="gmail_extra">Thread model: posix</div></div><div><br></div><div>test.c is attached to this email. </div><div><br></div><div>So what am I doing wrong?</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div>Rail Shafigulin<br></div>Software Engineer <br>Esencia Technologies<br></div></div></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>