diff options
author | pfg <pfg@FreeBSD.org> | 2014-04-04 15:49:23 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-04-04 15:49:23 +0000 |
commit | 661056080ae190bbb31aa0e0edc95bbc87c25989 (patch) | |
tree | 64c3b660173245667f1e14b65cb8dd0b2dba589b /contrib/gcc | |
parent | 041f9bbdd2d945b6a162b9ec1772c5ab37bb373d (diff) | |
download | FreeBSD-src-661056080ae190bbb31aa0e0edc95bbc87c25989.zip FreeBSD-src-661056080ae190bbb31aa0e0edc95bbc87c25989.tar.gz |
gcc: define __block when block support is enabled
This mimics the behaviour in clang and lets us build cleanly
the libdispatch port on platforms where the base gcc is still
the default compiler.
Bump __FreeBSD_version for ports.
Tested by: theraven
MFC after: 3 days
Diffstat (limited to 'contrib/gcc')
-rw-r--r-- | contrib/gcc/c-cppbuiltin.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/gcc/c-cppbuiltin.c b/contrib/gcc/c-cppbuiltin.c index 6dd6e18..6b65cdf 100644 --- a/contrib/gcc/c-cppbuiltin.c +++ b/contrib/gcc/c-cppbuiltin.c @@ -504,7 +504,10 @@ c_cpp_builtins (cpp_reader *pfile) /* APPLE LOCAL begin blocks */ /* APPLE LOCAL radar 5868913 */ if (flag_blocks) - cpp_define (pfile, "__BLOCKS__=1"); + { + cpp_define (pfile, "__block=__attribute__((__blocks__(byref)))"); + cpp_define (pfile, "__BLOCKS__=1"); + } /* APPLE LOCAL end blocks */ if (optimize_size) cpp_define (pfile, "__OPTIMIZE_SIZE__"); |