Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Apr 2014 15:49:23 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264121 - in head: contrib/gcc sys/sys
Message-ID:  <201404041549.s34FnNQd060953@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Fri Apr  4 15:49:23 2014
New Revision: 264121
URL: http://svnweb.freebsd.org/changeset/base/264121

Log:
  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

Modified:
  head/contrib/gcc/c-cppbuiltin.c
  head/sys/sys/param.h

Modified: head/contrib/gcc/c-cppbuiltin.c
==============================================================================
--- head/contrib/gcc/c-cppbuiltin.c	Fri Apr  4 15:31:57 2014	(r264120)
+++ head/contrib/gcc/c-cppbuiltin.c	Fri Apr  4 15:49:23 2014	(r264121)
@@ -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__");

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Fri Apr  4 15:31:57 2014	(r264120)
+++ head/sys/sys/param.h	Fri Apr  4 15:49:23 2014	(r264121)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1100016	/* Master, propagated to newvers */
+#define __FreeBSD_version 1100017	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404041549.s34FnNQd060953>