patch: fix build of libcxxabi with gcc

Saleem Abdulrasool compnerd at compnerd.org
Wed Mar 4 18:47:51 PST 2015


On Wed, Mar 4, 2015 at 4:38 PM, Nick Lewycky <nlewycky at google.com> wrote:

> The attached patch resolves a few issues building libcxxabi with gcc:
>
>  - GCC doesn't support #pragma mark, only Apple GCC and clang. Wrap the
> pragma mark's in #if 0 to make gcc ignore them but xcode still see them.
>

Really?  That is rather amusing.  WFM.  I had tried to pacify the build
with -Wno-unknown-pragmas, but that was deemed to be too heavy a hammer.


>  - Wrap a bunch of "#pragma clang" lines in #ifdef __clang__.
>

Hmm..I wonder if we should wrap this in a macro.  Yes, you can't use
#pragma, but you can use _Pragma.  However, that is unrelated to this
change, which strictly improves things.


>  - Pacify gcc's -Wparenthesis in a case where it's quite reasonable.
>

Reasonable.


> Please review!
>

Thanks for fixing this.  LGTM.


> Nick
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>


-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150304/b6b97e2b/attachment.html>


More information about the cfe-commits mailing list