Fix libcxx build with gcc

include/__config only defines _ATTRIBUTE() for clang, the attached patch adds it for gcc.

- Justin

fix_gcc.patch (318 Bytes)

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?


Dr John P. Fletcher Tel: (44) 121 204 3389 (direct line), FAX: (44) 121 204 3678
Chemical Engineering and Applied Chemistry (CEAC),
Associate Dean - External Relations,
School of Engineering and Applied Science (EAS),
Aston University, Aston Triangle, BIRMINGHAM B4 7ET U.K.


Committed revision 132334.


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).


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: