<div dir="ltr">This works for me. Thanks for the patch and have at.<div><br></div><div style>-eric</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 8, 2013 at 7:34 AM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Some linux distibutions (for example, Mageia 2, Fedora 17) ship Clang<br>
that is essentially broken for the end user.  Clang can not find or<br>
compile libstdc++ headers.<br>
<br>
The issue is that our configure prefers clang over gcc, thus selecting<br>
a broken Clang when a working GCC is available.<br>
<br>
The attached patch detects the issue by compiling a simple program.<br>
If it does not compile -- configure stops with an error suggesting the<br>
user to select a different compiler.<br>
<br>
Unfortunately, my autoconf skills are not good enough to implement a<br>
better strategy -- to find the first *working* compiler.  But the<br>
current patch to reject a broken compiler is a strict improvement.<br>
<br>
Edward Diener tested this on affected platforms. [1]<br>
<br>
Please review.  My biggest concern is about including cxxabi.h unconditionally.<br>
<br>
Dmitri<br>
<br>
[1] <a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-January/057716.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-January/057716.html</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
</font></span></blockquote></div><br></div>