<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>We do the same in FreeBSD, e.g. simply return LLVM_DEFAULT_TARGET_TRIPLE.  Now, in theory 'i586' is incorrect, as 'i386' means the *architecture*, not the CPU, but in practice it is used all over the place anyway. :-)</div><div><br></div><div>-Dimitry</div><div><br></div><div><div>On Aug 5, 2013, at 15:44, Kal Conley <<a href="mailto:kcconley@gmail.com">kcconley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">I figured out the normalization is done in llvm::sys::getDefaultTargetTriple. Changing the implementation to simply return LLVM_DEFAULT_TARGET_TRIPLE fixes the problem. I'm still not clear on why this normalization is done. Would it make sense to add a configure option to disable this normalization for cases where the target is known?<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/2 Kal Conley <span dir="ltr"><<a href="mailto:kcconley@gmail.com" target="_blank">kcconley@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div>Hi,<br></div>I am trying to build clang as a cross compiler and I am having some trouble getting it working. I configured clang with cmake options:<br><br>cmake ../llvm-3.3 -DCMAKE_BUILD_TYPE=Release -DLLVM_DEFAULT_TARGET_TRIPLE=i586-XXX-linux-gnu -DDEFAULT_SYSROOT=/usr/i586-XXX-linux-gnu/sys-root -DLLVM_TARGETS_TO_BUILD=X86<br>

<br></div>But clang -v reports:<br><br>Target: i386-XXX-linux-gnu<br><br></div>So clang is canonicalizing the i586 into i386. This is causing clang to fail to find all the gnu cross tools with names /usr/bin/i586-XXX-linux-gnu-*<br>

Is there any good reason for this canonicalization? Does it make sense to disable it? What is the best way about solving this issue?<br><br></div>Thanks!<span class="HOEnZb"><font color="#888888"><br></font></span></div>
<span class="HOEnZb"><font color="#888888">-Kal<br></font></span></div>
</blockquote></div><br></div>
_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></body></html>