[cfe-dev] Compiling clang with llvm-gcc

Shantonu Sen ssen at apple.com
Wed Sep 30 06:07:04 PDT 2009


This is a known issue with the version of llvm-gcc in Snow Leopard. It  
was fixed in llvm trunk with <http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090803/083744.html 
 >

You have a few options
1) Compile llvm/clang as 32-bit binaries by specifying --target/-- 
host/--build as i686-apple-darwin10
2) Disable optimization for clang, or at least PPMacroExpansion.cpp
3) As you note, use the LLVM 2.6 release candidate or trunk to build  
llvm-gcc, and then use that to build llvm/clang

Shantonu

Sent from my MacBook

On Sep 30, 2009, at 4:30 AM, Jean-Daniel Dupas wrote:

> Hello,
>
> I'm compiling clang with llvm-gcc-4.2 on Snow Leopard (i686-apple-
> darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5646)
> (LLVM build 2118)).
> clang and llvm are compiled as a 64 bit binaries (x86_64).
>
> When building a debug version, it works well, but when I build without
> assert and optimized, clang is badly broken. It often crashes and this
> is  the 'make test' result:
>
> --- Running clang tests for x86_64-apple-darwin10.0.0 ---
> [..]
>   Expected Passes    : 1496
>   Expected Failures  : 15
>   Unexpected Failures: 118
>
> Unexpected failures append in many test sections  (Analyze, Codegen,
> Frontend, Preprocess, Sema, etc…).
>
> Is it a known issue  ? Is there any chance it works better if I
> compile llvm-gcc myself using a newer codebase ?
>
> Thanks
>
> -- Jean-Daniel
>
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090930/79249658/attachment.html>


More information about the cfe-dev mailing list