[llvm-commits] [PATCH] Configure: if we compile with clang, check that it is not broken

Eric Christopher echristo at gmail.com
Tue Jan 8 20:15:45 PST 2013


This works for me. Thanks for the patch and have at.

-eric


On Tue, Jan 8, 2013 at 7:34 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:

> Hello,
>
> Some linux distibutions (for example, Mageia 2, Fedora 17) ship Clang
> that is essentially broken for the end user.  Clang can not find or
> compile libstdc++ headers.
>
> The issue is that our configure prefers clang over gcc, thus selecting
> a broken Clang when a working GCC is available.
>
> The attached patch detects the issue by compiling a simple program.
> If it does not compile -- configure stops with an error suggesting the
> user to select a different compiler.
>
> Unfortunately, my autoconf skills are not good enough to implement a
> better strategy -- to find the first *working* compiler.  But the
> current patch to reject a broken compiler is a strict improvement.
>
> Edward Diener tested this on affected platforms. [1]
>
> Please review.  My biggest concern is about including cxxabi.h
> unconditionally.
>
> Dmitri
>
> [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-January/057716.html
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130108/43e23401/attachment.html>


More information about the llvm-commits mailing list