Has anybody tried building gcc using clang/llvm as the first stage compiler? Tia Reed
On Fri, Sep 21, 2012 at 04:34:35PM -0700, reed kotler wrote:> Has anybody tried building gcc using clang/llvm as the first stage compiler?On FreeBSD we build gcc 4.2 with clang when clang is the system compiler. The build process differs from the normal gcc build process so the final gcc is built directly with clang. We do compile gcc without -Werror because clang generates a lot of warnings (presumably a modern gcc would as well). --- Brooks -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120921/9805b7ce/attachment.sig>
On 09/21/2012 04:34 PM, reed kotler wrote:> Has anybody tried building gcc using clang/llvm as the first stage > compiler? > > Tia > > ReedI tried this and it seems to work. Just: export CC=<bin for clang> and then when you run configure for gcc, it will use clang for the first stage. There were some warnings but the results several phase bootstrapped gcc seemed to work.
On 2012-09-21 16:34 , reed kotler wrote:> Has anybody tried building gcc using clang/llvm as the first stage > compiler?Works fine with Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0) Target: x86_64-pc-linux-gnu Thread model: posix Build with: $ CXX=clang++ CC=clang ../src/configure $ make -j Diego.