patch: fix build of libcxxabi with gcc
Nick Lewycky
nlewycky at google.com
Wed Mar 4 18:57:01 PST 2015
On 4 March 2015 at 18:47, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> 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.
>
David Majnemer pointed out to me in person that I could also use _Pragma
for the #pragma mark too, defining it to nothing for GCC and _Pragma for
Clang.
Unfortunately I can't test that. I'm going to check this in as is now, but
these review comments should be acted upon.
>
>> - 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/2349eb9e/attachment.html>
More information about the cfe-commits
mailing list