diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2014-04-04 15:49:23 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2014-04-04 15:49:23 +0000 |
commit | 8fb9488054ecce8ec2fdd03713a658949d6ab38e (patch) | |
tree | 64c3b660173245667f1e14b65cb8dd0b2dba589b /contrib | |
parent | 453efe588dab5a780c868cba57c1d25b5f6aca0c (diff) | |
download | src-8fb9488054ecce8ec2fdd03713a658949d6ab38e.tar.gz src-8fb9488054ecce8ec2fdd03713a658949d6ab38e.zip |
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
Notes
Notes:
svn path=/head/; revision=264121
Diffstat (limited to 'contrib')
-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 6dd6e18b6e0d..6b65cdf55571 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__"); |