16 Commits

Author SHA1 Message Date
pfg
9c8bbe6849 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
kan
cadd557b2c FreeBSD uses unchanged versions of this files. 2007-05-19 02:12:21 +00:00
kan
f8dd8336e3 Stock files. 2005-06-03 03:50:42 +00:00
kan
a8af68176b Use stock GCC versions on these files. 2004-07-28 03:36:15 +00:00
kan
a084c35ceb No FreeBSD-local changes in these files. 2003-11-07 03:05:29 +00:00
kan
d6bc06101f Stock files. 2003-08-22 03:10:47 +00:00
kan
4e7ac24200 FreeBSD uses stock versions of these GCC files. 2003-07-11 04:00:23 +00:00
kan
bb9b382fea Update HEAD with stock GCC 3.2.2 release files. 2003-02-10 05:57:03 +00:00
obrien
d3c00e65a3 Use pure stock files. 2002-12-04 16:31:48 +00:00
kan
beeedde8dd Use the stock 3.2.1-prerelease file.
Approved by:	obrien
2002-09-17 04:14:38 +00:00
obrien
03d718bf25 Use the stock (3.1) file. 2002-05-09 21:24:44 +00:00
obrien
e638c832dc 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
obrien
83aa1e1aef 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
obrien
c4b74a1764 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
89f7f39c2e 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
d4691e641b 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