This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Darwin, c*, ObjC* 1/2] Implement Darwin CFStrings.


Hi Paolo,

On 19 Oct 2010, at 10:06, Paolo Bonzini wrote:

On 10/19/2010 10:48 AM, IainS wrote:
Hi,
CFStrings are a c-family target-specific addition on Darwin (they might
be useful to GNUstep, but we decided to delay that consideration for
present).
They've been present in the system since the start of Darwin and using
them has become a requirement if we are to parse system headers on
Darwin10.


The changes need to be applied as one commit - hence one email.

however to make review easier I've split the patch into files that
involve build system changes ...
... and the remainder which are under Mike's area (the bulk of the text).
Although this patch is based on examination of the apple local 'trunk'
branch, I had to make significant modifications (i.e. it is technically
covered by the merging pre-approval, but Mike might wish to cast a quick
eye over it).


checked on {powerpc,i686}-darwin9, x86_64-darwin10, i686-darwin8,
x86_64-unknown-linux, and a cross to cris-elf
(really mostly relevant to the test-suite changes in part 2).

OK for trunk?
Iain

=== Build system Changes

It turns out that, whilst we have the capability to add files
selectively for cfamily per target, this does not extend to gt- files and
therefore, to apply the patch I need approval for the following build
mechanism change:


gcc:

* config.gcc (target_cfamily_gtfiles): New var, target_cfamily_gtfiles
add darwin-cfstrings.c.
c_target_objs, cxx_target_objs add darwin-cfstrings.o.
* c-config-lang.in (gtfiles): Add target_cfamily_gtfiles.


gcc/cp:

* cp/config-lang.in (gtfiles): Add target_cfamily_gtfiles.

gcc/objc:

* objc/config-lang.in (gtfiles): Add target_cfamily_gtfiles.

gcc/objcp:

* objcp/config-lang.in (gtfiles): Add target_cfamily_gtfiles.

thanks for the quick review.


That's okay. However I think it's better to make most of the implementation language-independent, since it already is.

Hm. I thought about this, but could not see any real way in which this could be made use of in Fortran as things stand... (this might change when fortran gets objects)
.. I guess it's easier to see how it might apply to Java.


This is especially important for LTO, and also removes the need for the weak symbol hack. What remains is then small enough that it can be put in darwin-c.c.

The test-suite changes incorporate cfstring ObjC torture tests, which include basic lto and whopr checks (which pass for darwin). I haven't done multi-file versions yet.


FWIW, there is currently no target-specific additions file defined for Java (although there is one for Fortran).

If Mike is also OK with this as it is, I'd prefer to leave as is for now - in the absence of any mechanism to test it on Fortran & Java.

cheers,
Iain


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]