gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep Make not adding -fblocks


From: David Chisnall
Subject: Re: GNUstep Make not adding -fblocks
Date: Tue, 15 Feb 2011 16:10:33 +0000

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

David

On 15 Feb 2011, at 16:02, Nicola Pero wrote:

> If you can provide the configure check, we can add it to gnustep-make's 
> configure.
> Making it general, so that it may one day work with other compilers too, 
> would be
> appreciated.
> 
> It should all be fairly easy, but if you provide me with the appropriate 
> configure check,
> I can do the gnustep-make tweaking.
> 
> It would be good to do this before the new release of gnustep-make, so that 
> it becomes
> part of it. :-)
> 
> Thanks
> 
> -----Original Message-----
> From: "David Chisnall" <address@hidden>
> Sent: Tuesday, 15 February, 2011 13:03
> To: "GNUstep Developer" <address@hidden>
> Subject: GNUstep Make not adding -fblocks
> 
> I've just noticed this, since I usually add the flag explicitly:
> 
> GNUstep make is not adding -fblocks to OBJCFLAGS even when configured with 
> clang and libobjc2 , which means that we are getting the ugly 
> GCC-compatible-work-around code in NSRegularExpression.m, instead of the 
> simple code that uses blocks, and people using blocks in their code are going 
> to get a compiler error instead of having it work as they would expect.
> 
> David
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnustep-dev
> 
> 
> 
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnustep-dev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]