[cfe-dev] Fix libcxx build with gcc

Petteri Räty betelgeuse at gentoo.org
Tue May 31 12:54:25 PDT 2011


On 05/31/2011 04:23 PM, Howard Hinnant wrote:
> On May 31, 2011, at 3:41 AM, Fletcher, John P wrote:
> 
>> I am trying to figure out how to build libc++ on Linux (Ubuntu 10.4
>> 64 bit). As far as I can see lib/buildit is only set up to work on
>> Apple.  What is the triple needed?  What else needs to be defined?
> 
> I believe people are using the default case in the TRIPLE switch for
> linux.  However I don't have a linux box myself, so I'm not
> positive.
> 
> The generic algorithm is to compile everything in src, with a pointer
> to the include directory for includes.  src is only one directory
> deep (trying to keep things simple).
> 
> Howard

I have been compiling libcxx with clang++ and it has worked on Gentoo. I
have taken a look at the buildit script and agree with Howard that
defining a triple shouldn't be needed as it's only used for OS X
specific detections. You should however note that libcxx has plenty of
__APPLE__ defines so basic things like hello world are currently broken
on Linux:

http://llvm.org/bugs/show_bug.cgi?id=8992

Regards,
Petteri




More information about the cfe-dev mailing list