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

NAKAMURA Takumi geek4civic at gmail.com
Tue Jan 8 20:40:03 PST 2013


Could we enhance it to detect also broken gccs?

2013/1/9 Dmitri Gribenko <gribozavr at gmail.com>:
> 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>*/
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list