Commit Graph

16 Commits

Author SHA1 Message Date
Pedro F. Giffuni
5bfc7db451 gcc: Add support for Apple's Block extension
Block objects [1] are a C-level syntactic and runtime feature. They
are similar to standard C functions, but in addition to executable
code they may also contain variable bindings to automatic (stack)
or managed (heap) memory. A block can therefore maintain a set of
state (data) that it can use to impact behavior when executed.

This port is based on Apple's GCC 5646 with some bugfixes from
Apple GCC 5666.3. It has some small differences with the support
in clang, which remains the recommended compiler.

Perhaps the most notable difference is that in GCC that __block
is not actually a keyword, but a macro. There will be workaround
for this issue in a near future. Other issues can be consulted in
the clang documentation [2]

For better compatiblity with Apple's GCC and llvm-gcc some related
fixes and features from Apple have been included. Support for the
non-standard nested functions in GCC is now off by default.

No effort was made to update the ObjC support since FreeBSD doesn't
carry ObjC in the base system, but some of the code crept in and
was more difficult to remove than to adjust.

Reference:
[1]
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html
[2]
http://clang.llvm.org/compatibility.html#block-variable-initialization

Obtained from:	Apple GCC 4.2
MFC after:	3 weeks
2014-01-05 00:43:28 +00:00
Alexander Kabaev
9d6b9560a8 FreeBSD uses unchanged versions of this files. 2007-05-19 02:12:21 +00:00
Alexander Kabaev
31a119f3ed Stock files. 2005-06-03 03:50:42 +00:00
Alexander Kabaev
f246de45e2 Use stock GCC versions on these files. 2004-07-28 03:36:15 +00:00
Alexander Kabaev
3697be5590 No FreeBSD-local changes in these files. 2003-11-07 03:05:29 +00:00
Alexander Kabaev
d586a2745c Stock files. 2003-08-22 03:10:47 +00:00
Alexander Kabaev
b2bcf6753d FreeBSD uses stock versions of these GCC files. 2003-07-11 04:00:23 +00:00
Alexander Kabaev
d79e61dc75 Update HEAD with stock GCC 3.2.2 release files. 2003-02-10 05:57:03 +00:00
David E. O'Brien
21da7e2bd7 Use pure stock files. 2002-12-04 16:31:48 +00:00
Alexander Kabaev
f40fb3f3fd Use the stock 3.2.1-prerelease file.
Approved by:	obrien
2002-09-17 04:14:38 +00:00
David E. O'Brien
ea73da804b Use the stock (3.1) file. 2002-05-09 21:24:44 +00:00
David E. O'Brien
e743a6a21f Use the stock 3.1-snap file now.
I do not think our rev 1.2 changes are needed any longer.
2002-02-01 19:10:11 +00:00
David E. O'Brien
cd6526700d Merge our changes - this brings rev 1.2 (fix stabs ordering for a.out)
into GCC 2.95.1.
1999-10-26 08:47:58 +00:00
David E. O'Brien
54e4f442da Fix conflicts. This brings rev 1.2 (fix stabs ordering for a.out) into
EGCS 1.1.2.
1999-08-28 07:19:03 +00:00
Peter Wemm
178576c62f Put the function stabs in traditional order on a.out, or gdb doesn't see
function local variables.
1998-03-08 11:54:04 +00:00
Peter Wemm
a4cd5630b0 Import of unmodified (but trimmed) gcc-2.7.2. The bigger parts of the
non-i386, non-unix, and generatable files have been trimmed, but can easily
be added in later if needed.

gcc-2.7.2.1 will follow shortly, it's a very small delta to this and it's
handy to have both available for reference for such little cost.

The freebsd-specific changes will then be committed, and once the dust has
settled, the bmakefiles will be committed to use this code.
1996-09-18 05:35:50 +00:00