[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUstep Make not adding -fblocks
From: |
Richard Frith-Macdonald |
Subject: |
Re: GNUstep Make not adding -fblocks |
Date: |
Wed, 16 Feb 2011 14:57:13 +0000 |
On 15 Feb 2011, at 16:10, David Chisnall wrote:
> I am no good at autoconf, but as a simple test, you can try this file:
>
> void(^block)(void) = ^(void) {};
>
> $(CC) -c block.c
>
> This may Just Work⢠- it will on OS X with both clang and Apple gcc. If so,
> that's great. If not (exit code from the compiler is not 0), then try:
>
> $(CC) -c block.c -fblocks
>
> If this works, then add -fblocks to CFLAGS and OBJCFLAGS (and maybe CXXFLAGS).
>
> Did you take a look at the exception test I sent you a mail about?
I can't see that in my email archive ... mybe I accidentally deleted it, or
perhaps it was a private email to Nicola.
> It seems that the configure script is testing whether exceptions work, then
> deciding that, even though they do, it won't let you use them because it
> doesn't like the version of GCC that you have.
That may well be the case ... because we don't just need to check that we can
throw/catch exceptions, we also need to check that we can set a handler for
uncaught exceptions, and it may well have been a lot easier to just test for
the version of gcc which added support for that to the runtime than to check to
see what really happens.
So, a good test for exception support would check both that the compiler
generates exception code and that the runtime supports setting a handler for
uncaught exceptions (and that both actually work).
I seem to remember hacking some sort of test into the base config scripts, but
I don't recall whether it was actually what I'd call a good one.