summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2014-04-04 15:49:23 +0000
committerpfg <pfg@FreeBSD.org>2014-04-04 15:49:23 +0000
commit661056080ae190bbb31aa0e0edc95bbc87c25989 (patch)
tree64c3b660173245667f1e14b65cb8dd0b2dba589b /contrib/gcc
parent041f9bbdd2d945b6a162b9ec1772c5ab37bb373d (diff)
downloadFreeBSD-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.c5
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__");
OpenPOWER on IntegriCloud