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

Eric Christopher echristo at gmail.com
Tue Jan 8 21:10:44 PST 2013


At that point I'd want an m4 macro somewhere that encapsulates all of it.

-eric


On Tue, Jan 8, 2013 at 8:40 PM, NAKAMURA Takumi <geek4civic at gmail.com>wrote:

> 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
> >
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130108/99ff0c04/attachment.html>


More information about the llvm-commits mailing list